redirection problem
-
I have created a web chat application, to get to the webchat user has to login using his username and password. When I was developing my application the redirection sometimes was working, and sometimes not, I didn't really know why, but I wasn't bothered about that then. Now I wanted to access my webpage by using IIS, I was following this tutorial: http://www.codeproject.com/KB/aspnet/IIS7ASPNet.aspx The login page is with this adress: http://localhost/Smiths1/Default.aspx and it should redirect me to: http://localhost/Smiths1/SmithChat.aspx?roomID=14 but I don't know why it redirects me to: http://localhost/Smiths1/Default.aspx?ReturnUrl=%2FSmiths1%2FSmithChat.aspx%3FroomID%3D14&roomID=14 and I can't get to the webchat (I still see the login page, but I assume it;s only because the name of it is Default.aspx). The instruction in login page looks like that:
Response.Redirect("SmithChat.aspx?roomID=14", true);
I don't know what causes whis "error", could someone help me please? -
I have created a web chat application, to get to the webchat user has to login using his username and password. When I was developing my application the redirection sometimes was working, and sometimes not, I didn't really know why, but I wasn't bothered about that then. Now I wanted to access my webpage by using IIS, I was following this tutorial: http://www.codeproject.com/KB/aspnet/IIS7ASPNet.aspx The login page is with this adress: http://localhost/Smiths1/Default.aspx and it should redirect me to: http://localhost/Smiths1/SmithChat.aspx?roomID=14 but I don't know why it redirects me to: http://localhost/Smiths1/Default.aspx?ReturnUrl=%2FSmiths1%2FSmithChat.aspx%3FroomID%3D14&roomID=14 and I can't get to the webchat (I still see the login page, but I assume it;s only because the name of it is Default.aspx). The instruction in login page looks like that:
Response.Redirect("SmithChat.aspx?roomID=14", true);
I don't know what causes whis "error", could someone help me please?You problem is not clear. please rephrase your question.
Cheers ! Abhijit Jana | MVP Web Site : abhijitjana.net | Follow Me @ twitter Don't forget to click "Good Answer" on the post(s) that helped you.
-
I have created a web chat application, to get to the webchat user has to login using his username and password. When I was developing my application the redirection sometimes was working, and sometimes not, I didn't really know why, but I wasn't bothered about that then. Now I wanted to access my webpage by using IIS, I was following this tutorial: http://www.codeproject.com/KB/aspnet/IIS7ASPNet.aspx The login page is with this adress: http://localhost/Smiths1/Default.aspx and it should redirect me to: http://localhost/Smiths1/SmithChat.aspx?roomID=14 but I don't know why it redirects me to: http://localhost/Smiths1/Default.aspx?ReturnUrl=%2FSmiths1%2FSmithChat.aspx%3FroomID%3D14&roomID=14 and I can't get to the webchat (I still see the login page, but I assume it;s only because the name of it is Default.aspx). The instruction in login page looks like that:
Response.Redirect("SmithChat.aspx?roomID=14", true);
I don't know what causes whis "error", could someone help me please? -
You problem is not clear. please rephrase your question.
Cheers ! Abhijit Jana | MVP Web Site : abhijitjana.net | Follow Me @ twitter Don't forget to click "Good Answer" on the post(s) that helped you.
I think I should start with showing you my code in the login page (I'm using prepared asp login component): public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { SmithChatDataContext data = new SmithChatDataContext(); var user = (from u in data.Users where u.Username == Login1.UserName && u.Password == Login1.Password select u).SingleOrDefault(); if (user != null) { e.Authenticated = true; Session["ChatUserID"] = user.UserID; Session["ChatUsername"] = user.Username; Response.Redirect("SmithChat.aspx?roomID=14", true); } else { e.Authenticated = false; } } } and when I run the page from the Visual Studio, it goes to the login page, when I'm trying to login - sometimes it redirects me to the webchat as it should, and sometimes the link after authentication looks like that: http://localhost:49786/Smiths/Default.aspx?ReturnUrl=%2FSmiths%2FSmithChat.aspx%3FroomID%3D14&roomID=14 and I'm still on the login page. I don't know what is wrong. Anyway, I tried to deploy my application using IIS, so I followed the tutorial which I mentioned about before, and my login page is accessible (http://localhost/Smiths1/Default.aspx) However, after authentication it stays on the login page and the link again looks like that: http://localhost/Smiths1/Default.aspx?ReturnUrl=%2FSmiths1%2FSmithChat.aspx%3FroomID%3D14&roomID=14
-
I have created a web chat application, to get to the webchat user has to login using his username and password. When I was developing my application the redirection sometimes was working, and sometimes not, I didn't really know why, but I wasn't bothered about that then. Now I wanted to access my webpage by using IIS, I was following this tutorial: http://www.codeproject.com/KB/aspnet/IIS7ASPNet.aspx The login page is with this adress: http://localhost/Smiths1/Default.aspx and it should redirect me to: http://localhost/Smiths1/SmithChat.aspx?roomID=14 but I don't know why it redirects me to: http://localhost/Smiths1/Default.aspx?ReturnUrl=%2FSmiths1%2FSmithChat.aspx%3FroomID%3D14&roomID=14 and I can't get to the webchat (I still see the login page, but I assume it;s only because the name of it is Default.aspx). The instruction in login page looks like that:
Response.Redirect("SmithChat.aspx?roomID=14", true);
I don't know what causes whis "error", could someone help me please?try this Response.Redirect("SmithChat.aspx?roomID=14", false);
-
try this Response.Redirect("SmithChat.aspx?roomID=14", false);