response redirection not working - HELP!

O

ODAN

We are testing a ASP.NET application in Visual Studion 2003 and written in
C#. One of the pages that register new users on this application fails to
redirect to another page when the button is clicked. On the page there is a
button that has been code to save to database and also redirect to the login
page. When you fill out the form and click on this page, it saves the data
into the database but it does nothing after that, it just sits there on the
same page. We checked everytihng in the code and the web.config file. The
web applicaiton is working good on the development workstation (Win XP), but
not working on the server running Windows Server 2003 IIS6. Please help? Any
ideas?


try

{

if(Session["RegistrantID"]!=null)

{

divusername.Visible=false;

string registrantId=Session["RegistrantID"].ToString;

string userName=Session["username"].ToString();

if(WRTSPublic.DataAccess.DataAccess.UpdateRegistrantDetails(registrantId,userName,RegistantObj,dsCompenOrg,selectedCountiesArr))

{

Response.Redirect(TrainingURL,false);

}

}

else

{

if(WRTSPublic.DataAccess.DataAccess.InsertRegistrantDetails(RegistantObj,dsCompenOrg,selectedCountiesArr))

{

Response.Redirect(IntroductionURL,false);

}

}

}

catch(Exception ex)

{

ExceptionCatch.RegisterLog(ex.Message);

}

}
 
G

Guest

Hi,

Where did you declare the variables used in the Response.Redirect()? Also
try using Server.Transfer and see if that works.

Thanks
 
O

ODAN

The variables are in the web config; here is one of them:
<add key="TrainingURL" value="http://System/Training.aspx" />

We have actually gone as far as had coding the reponse.redirect
(http://Systemfullpath/Training.aspx) in the .cs file. It works on the
development workstation but not on the IIS6 server.



Sridhar said:
Hi,

Where did you declare the variables used in the Response.Redirect()?
Also
try using Server.Transfer and see if that works.

Thanks

ODAN said:
We are testing a ASP.NET application in Visual Studion 2003 and written
in
C#. One of the pages that register new users on this application fails
to
redirect to another page when the button is clicked. On the page there is
a
button that has been code to save to database and also redirect to the
login
page. When you fill out the form and click on this page, it saves the
data
into the database but it does nothing after that, it just sits there on
the
same page. We checked everytihng in the code and the web.config file. The
web applicaiton is working good on the development workstation (Win XP),
but
not working on the server running Windows Server 2003 IIS6. Please help?
Any
ideas?


try

{

if(Session["RegistrantID"]!=null)

{

divusername.Visible=false;

string registrantId=Session["RegistrantID"].ToString;

string userName=Session["username"].ToString();

if(WRTSPublic.DataAccess.DataAccess.UpdateRegistrantDetails(registrantId,userName,RegistantObj,dsCompenOrg,selectedCountiesArr))

{

Response.Redirect(TrainingURL,false);

}

}

else

{

if(WRTSPublic.DataAccess.DataAccess.InsertRegistrantDetails(RegistantObj,dsCompenOrg,selectedCountiesArr))

{

Response.Redirect(IntroductionURL,false);

}

}

}

catch(Exception ex)

{

ExceptionCatch.RegisterLog(ex.Message);

}

}
 
O

ODAN

Hi Sridhar,

We are having two different applications. One application is having
Forms Authentication and another one is having Windows Authentication. We
define the URL in web.config files of two application so that it would
redirect to each application without chaning in the code behind file. But
when we are giving Response.Redirect() method it is not redirecting to the
particular page in test server which is working in the development server.
Can you please guide us what would be the problem?

Regards,
Odan

Sridhar said:
Hi,

Where did you declare the variables used in the Response.Redirect()?
Also
try using Server.Transfer and see if that works.

Thanks

ODAN said:
We are testing a ASP.NET application in Visual Studion 2003 and written
in
C#. One of the pages that register new users on this application fails
to
redirect to another page when the button is clicked. On the page there is
a
button that has been code to save to database and also redirect to the
login
page. When you fill out the form and click on this page, it saves the
data
into the database but it does nothing after that, it just sits there on
the
same page. We checked everytihng in the code and the web.config file. The
web applicaiton is working good on the development workstation (Win XP),
but
not working on the server running Windows Server 2003 IIS6. Please help?
Any
ideas?


try

{

if(Session["RegistrantID"]!=null)

{

divusername.Visible=false;

string registrantId=Session["RegistrantID"].ToString;

string userName=Session["username"].ToString();

if(WRTSPublic.DataAccess.DataAccess.UpdateRegistrantDetails(registrantId,userName,RegistantObj,dsCompenOrg,selectedCountiesArr))

{

Response.Redirect(TrainingURL,false);

}

}

else

{

if(WRTSPublic.DataAccess.DataAccess.InsertRegistrantDetails(RegistantObj,dsCompenOrg,selectedCountiesArr))

{

Response.Redirect(IntroductionURL,false);

}

}

}

catch(Exception ex)

{

ExceptionCatch.RegisterLog(ex.Message);

}

}
 
O

ODAN

We found a solution to this problem. It was the smartnav. We disable the
smartnav before the reponse.redirect statement and voila, it works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top