View Single Post
  #1 (permalink)  
Old October 14th, 2007, 10:22 PM
mansharma_s mansharma_s is offline
Registered User
Join Date: Dec 2004
Location: Indore, MP, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default access C#.Net page as action of calssic ASP page


I am trying to access a .Net page form as action on a Classic ASP page (both are on different domains). The sequence of the page execution is as under:

1. Classic ASP Page that accepts User Name, Password and a token number. This page is submitting twice. On first submit the action of this page is itself. It Encrypts the values and place them in hidden controls and again submits it; this time the action of this page is a C# .Net Page.
2. C#.Net page Decrypts the values and verifies the User. If user is a valid user it generates a form in it (using JavaScript) and action of this generated page is again a classic ASP page.

When I open a new browser execute the classic ASP Page. The classic ASP page submitted twice (as planed to do so). Second submit action is C#.Net Page and I get the error on C#.Net page.

I am getting this Error on C#.Net page
   "Object reference not set to an instance of an object. "

The magic begins here. When I click on back Button of browser the classic ASP page gets submitted again (because it has the true condition for second submit) and this time it works fine and I got the expected results. After that If I continue with the same browser window for other user verification; it works fine through out. But again if I use a new browser window it gives the same error first time.

I have checked all controls names, values and form generation condtions; but not getting why it is happening. Please help me out.

Thanks & Regards