Last post Dec 16, 2016 08:39 AM by Jean Sun
Dec 13, 2016 01:04 PM|priteshmp|LINK
The settings I have on a server are messed up. In internet explorer when you 1st go the website the webpage isx redirected to a login page that does not exist. If I remove the login part from the url (the original url) I can then go onto the website with
no problem and data is displayed etc.
In Chrome I cannot do that it keeps redirecting me to the login.aspx page - this doesnt exist.
Im using identity impersonate = true and windows authentication.
Does anyone know why this is happening?
This is my web config part-
<compilation debug="true" targetFramework="4.5" />
<authentication mode="Windows" />
<identity impersonate="true" />
<allow users="?" />
Dec 14, 2016 02:57 AM|Jean Sun|LINK
It's strange that you are redirecting to the login page with windows authentication.
Is the form authentication enabled on your site?
And change the<allow user="?"> to <deny user="?" /> in your configuration.
<allow user="?" /> means that it will allow anonymous users to access your website.
<deny user="?" /> means that it will deny anonymous users to access your website.
You can find more about this in the following link.
Dec 14, 2016 09:12 AM|shivanand G N|LINK
<authorization> <deny users="?"/> //this will restrict anonymous user access
<location path="register.aspx"> //path here is path to your register.aspx page e.g. it could be ~/publicpages/register.aspx
<allow users="*"/> // this will allow access to everyone to register.aspx
Dec 14, 2016 09:16 AM|navneetmitawa|LINK
Clear your browser history and try again...May be possiblity browser cache create a problem.
Dec 15, 2016 12:23 PM|priteshmp|LINK
Hi gyus. Thanks for your suggestions.
this was a little weird. It turned out to be some webmatrix.data dll.
If I remove it the website starts functioning.
At the moment Im trying to find a way to remove them from the build.
Do you happen to know wghat the solution is for this? Do I have to upgrade asp.net, or remove a specific package/
Dec 16, 2016 08:39 AM|Jean Sun|LINK
I came across the
release notes on the ASP.NET MVC website. At the bottom, there’s a section called ‘Known issues‘, and one of the last issues reads:
There’s a known issue that causes Forms Authentication to always redirect unauthenticated users to ~/Account/Login, ignoring the forms authentication setting used in Web.config. The workaround is to add the following app setting.
<add key="autoFormsAuthentication" value="false" />