asp.net - Browsing to home page generates 404 error -


i deployed asp.net application works within vs express web 2013 newly-created server (windows server 2008 r2, iis 7.5). browsing home page generates 404 error. detailed error information:

module: iis web core
notification: maprequesthandler
handler: staticfile
error code: 0x80070002
requested url: http://example.com/account/login?returnurl=%2fdefault.aspx
physical path: c:\example\account\login
logon method: anonymous
logon user: anonymous

of course, physical path c:\example\account\login not exist; c:\example\account\login.aspx.

my guess problem handler staticfile, how fix it?

check request url, has no .aspx extension

requested url: http://example.com/account/login?returnurl=%2fdefault.aspx

it seems redirects login page, perhaps have wrong value in web.config login page, must login.aspx, not login

it uses static file handler, because there no aspx extension.

update

put login.aspx in root. adjust web.config this:

what have is

<location path="account/login">     <system.web>       <authorization>         <allow users="*"/>       </authorization>     </system.web>   </location> 

it should this

<system.web>   <authentication mode="forms">     <forms loginurl="logon.aspx" name=".aspxformsauth">     </forms>   </authentication> <authorization></authorization> </system.web> 

here link might you: forms authentication


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -