![]() |
|
|
|||||||
![]() |
ASP Net - response redirection not working - HELP! |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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.UpdateRegistra ntDetails(registrantId,userName,RegistantObj,dsCom penOrg,selectedCountiesArr)) { Response.Redirect(TrainingURL,false); } } else { if(WRTSPublic.DataAccess.DataAccess.InsertRegistra ntDetails(RegistantObj,dsCompenOrg,selectedCountie sArr)) { Response.Redirect(IntroductionURL,false); } } } catch(Exception ex) { ExceptionCatch.RegisterLog(ex.Message); } } ODAN |
|
|
|
|
#2 |
|
Posts: n/a
|
Hi,
Where did you declare the variables used in the Response.Redirect()? Also try using Server.Transfer and see if that works. Thanks "ODAN" wrote: > 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.UpdateRegistra ntDetails(registrantId,userName,RegistantObj,dsCom penOrg,selectedCountiesArr)) > > { > > Response.Redirect(TrainingURL,false); > > } > > } > > else > > { > > if(WRTSPublic.DataAccess.DataAccess.InsertRegistra ntDetails(RegistantObj,dsCompenOrg,selectedCountie sArr)) > > { > > Response.Redirect(IntroductionURL,false); > > } > > } > > } > > catch(Exception ex) > > { > > ExceptionCatch.RegisterLog(ex.Message); > > } > > } > > > =?Utf-8?B?U3JpZGhhcg==?= |
|
|
|
#3 |
|
Posts: n/a
|
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" <> wrote in message news:700AACCE-36D5-486C-969B-... > Hi, > > Where did you declare the variables used in the Response.Redirect()? > Also > try using Server.Transfer and see if that works. > > Thanks > > "ODAN" wrote: > >> 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.UpdateRegistra ntDetails(registrantId,userName,RegistantObj,dsCom penOrg,selectedCountiesArr)) >> >> { >> >> Response.Redirect(TrainingURL,false); >> >> } >> >> } >> >> else >> >> { >> >> if(WRTSPublic.DataAccess.DataAccess.InsertRegistra ntDetails(RegistantObj,dsCompenOrg,selectedCountie sArr)) >> >> { >> >> Response.Redirect(IntroductionURL,false); >> >> } >> >> } >> >> } >> >> catch(Exception ex) >> >> { >> >> ExceptionCatch.RegisterLog(ex.Message); >> >> } >> >> } >> >> >> ODAN |
|
|
|
#4 |
|
Posts: n/a
|
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" <> wrote in message news:700AACCE-36D5-486C-969B-... > Hi, > > Where did you declare the variables used in the Response.Redirect()? > Also > try using Server.Transfer and see if that works. > > Thanks > > "ODAN" wrote: > >> 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.UpdateRegistra ntDetails(registrantId,userName,RegistantObj,dsCom penOrg,selectedCountiesArr)) >> >> { >> >> Response.Redirect(TrainingURL,false); >> >> } >> >> } >> >> else >> >> { >> >> if(WRTSPublic.DataAccess.DataAccess.InsertRegistra ntDetails(RegistantObj,dsCompenOrg,selectedCountie sArr)) >> >> { >> >> Response.Redirect(IntroductionURL,false); >> >> } >> >> } >> >> } >> >> catch(Exception ex) >> >> { >> >> ExceptionCatch.RegisterLog(ex.Message); >> >> } >> >> } >> >> >> ODAN |
|
|
|
#5 |
|
Posts: n/a
|
Is authentication involved here? It sounds like it does not want to
leave the current page no matter what you do. You may want to try calling... FormsAuthentication.RedirectFromLoginPage You can find more here... http://msdn2.microsoft.com/en-US/lib...loginpage.aspx offwhite@gmail.com |
|
|
|
#6 |
|
Posts: n/a
|
We found a solution to this problem. It was the smartnav. We disable the
smartnav before the reponse.redirect statement and voila, it works. "ODAN" <> wrote in message news:erRHg%... > 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.UpdateRegistra ntDetails(registrantId,userName,RegistantObj,dsCom penOrg,selectedCountiesArr)) > > { > > Response.Redirect(TrainingURL,false); > > } > > } > > else > > { > > if(WRTSPublic.DataAccess.DataAccess.InsertRegistra ntDetails(RegistantObj,dsCompenOrg,selectedCountie sArr)) > > { > > Response.Redirect(IntroductionURL,false); > > } > > } > > } > > catch(Exception ex) > > { > > ExceptionCatch.RegisterLog(ex.Message); > > } > > } > > ODAN |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Different Ping response times | sandhyashyamsundar | Hardware | 1 | 07-07-2009 06:22 PM |
| Internet was working fine on laptop yesterday; today there is no internet connection | spulliam81 | General Help Related Topics | 0 | 09-21-2008 06:26 PM |
| (rumor) Toshiba Working With Microsoft On New Entertainment Xbox (360) with built-in HD-DVD | AirRaid | DVD Video | 6 | 10-21-2007 02:19 AM |
| usb ports not working | titoshauri | General Help Related Topics | 0 | 06-28-2007 03:56 PM |
| Working in IT? | Paul Kersey | A+ Certification | 6 | 07-06-2004 03:10 AM |