473,509 Members | 2,918 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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);

}

}
May 24 '06 #1
5 2122
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);

}

}

May 24 '06 #2
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" <Sr*****@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
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);

}

}

May 24 '06 #3
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" <Sr*****@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
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);

}

}

May 24 '06 #4
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

May 24 '06 #5
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" <ol****@hotmail.com> wrote in message
news:er****************@TK2MSFTNGP04.phx.gbl...
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);

}

}

May 27 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1952
by: gtea | last post by:
I am using response.redirec to do the url redirection on my login page. The login page is under http://myURL/test/dir1/login.aspx, when the user login successfully, the login page redirects the...
14
2953
by: tomer | last post by:
Clear DayHello, I have implemented a download manger in .NET that overrides Internet Explorer's bult-in download manager. I using HttpWebRequest/Response to download the files. All is working...
0
1093
by: Jack Wright | last post by:
Dear All, The following is the setting on IIS on a typical Client Server we are working on Authentication Methods Anonymous access (No user name/password required to access this resource.) ...
2
2844
by: Dr. Paul Caesar - CoullByte (UK) Limited | last post by:
Hi, I have created a Logout ASP.NET application using Forms Authentication. When a user logs out they get a confirmation page confirming logout and a button to click to return to the homepage....
13
2679
by: souissipro | last post by:
Hi, I have written a C program that does some of the functionalities mentionned in my previous topic posted some days ago. This shell should: 1- execute input commands from standard input,...
2
3395
plumpnation
by: plumpnation | last post by:
I have now got this bulky piece of script working, it reads the form correctly, which sends the request to the web service using SOAP. It conforms to their DTD and the web service then responds and...
1
1636
by: chandra.somesh | last post by:
I generally use Response.Redirect(url,false) for redirections. Is there a size constarint on the HTTP Response Location Header ? Also Is the behavior defined if we exceed this limit? In my...
0
993
by: CF | last post by:
Hi, I have made a Forms Authentication application, which is working good. Only problem that I have is with redirection. Here is my code: LdapAuthentication adAuth = new...
0
1392
by: nutso fasst | last post by:
Hello. IIS 4 website with a custom 404 error page WAS working OK, but at some point it wacked out. In the logs there were no 404 error responses. Instead, what were recorded were 200(OK)...
0
7136
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.