asp.net is not redirecting a page to proper login.aspx page for authentication.
-
In my Web.config file,authentication mode is "Form" and login url is "Login.aspx" which is in root directory.when i am calling a page which is in sub directory,then my page should automatically redirect to "Login.aspx" for authentication.but my problem is that instead of redirecting the page to "login.aspx" in root directory it searches in the same sub directory hence it does not get a file. But when i am working offline ie on local PC,i don't get this problem.when i have uploaded this project on server i face this problem. Thank u.
coolsatty
-
In my Web.config file,authentication mode is "Form" and login url is "Login.aspx" which is in root directory.when i am calling a page which is in sub directory,then my page should automatically redirect to "Login.aspx" for authentication.but my problem is that instead of redirecting the page to "login.aspx" in root directory it searches in the same sub directory hence it does not get a file. But when i am working offline ie on local PC,i don't get this problem.when i have uploaded this project on server i face this problem. Thank u.
coolsatty
-
In my Web.config file,authentication mode is "Form" and login url is "Login.aspx" which is in root directory.when i am calling a page which is in sub directory,then my page should automatically redirect to "Login.aspx" for authentication.but my problem is that instead of redirecting the page to "login.aspx" in root directory it searches in the same sub directory hence it does not get a file. But when i am working offline ie on local PC,i don't get this problem.when i have uploaded this project on server i face this problem. Thank u.
coolsatty
I believe your problem is a result of your file path being relative. Ensure that your configuration references the file from the website root. In your case,
~/login.aspx
should work. Hope that helps. :)--Jesse
"... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
-
In my Web.config file,authentication mode is "Form" and login url is "Login.aspx" which is in root directory.when i am calling a page which is in sub directory,then my page should automatically redirect to "Login.aspx" for authentication.but my problem is that instead of redirecting the page to "login.aspx" in root directory it searches in the same sub directory hence it does not get a file. But when i am working offline ie on local PC,i don't get this problem.when i have uploaded this project on server i face this problem. Thank u.
coolsatty
-
I think you may need to specify the entire path of where your login.aspx page is rather then just ~/login.aspx
I tried putting entire path but it still searches in sub directory.Is there any settings in IIS because here in my PC its working fine but at server(handled by third party)side i am getting this problem.
coolsatty