Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - response redirection not working - HELP!

 
Thread Tools Search this Thread
Old 05-24-2006, 09:05 PM   #1
Default response redirection not working - HELP!


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
  Reply With Quote
Old 05-24-2006, 10:29 PM   #2
=?Utf-8?B?U3JpZGhhcg==?=
 
Posts: n/a
Default RE: response redirection not working - HELP!
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==?=
  Reply With Quote
Old 05-24-2006, 10:43 PM   #3
ODAN
 
Posts: n/a
Default Re: response redirection not working - HELP!
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
  Reply With Quote
Old 05-24-2006, 10:51 PM   #4
ODAN
 
Posts: n/a
Default Re: response redirection not working - HELP!
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
  Reply With Quote
Old 05-25-2006, 12:03 AM   #5
offwhite@gmail.com
 
Posts: n/a
Default Re: response redirection not working - HELP!
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
  Reply With Quote
Old 05-27-2006, 02:12 PM   #6
ODAN
 
Posts: n/a
Default Re: response redirection not working - HELP!
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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46