Visual Studio ASP.NET Dev server and IIS server
I just configured my web application to use IIS rather than ASP.NET dev server and I am getting some weird behavior.
http://localhost:49584/Templ开发者_开发问答ates/UI/Img/featured_area_bg.gif
http://localhost/NopCommerceStore/Templates/UI/Img/featured_area_bg.gifWhen I visit the first url, I the image, like it supposed to.
When I visit the second one, I get redirected to the login page. There is not config in the web.config that restricts any part of that path to a role or username. Even after I login when I get redirected, it still wont show.
Using Process Monitor, I was able to see the problems IIS is having. The result is shown below.
Path: F:\Development\Freelance\AWS\Store\NopCommerceStore\Templates\UI\Img\active_item.gif
Desired Access: Generic Read Disposition: Open Options: Sequential Access, No Buffering Attributes: RE ShareMode: Read, Write, Delete AllocationSize: n/a Impersonating: NT AUTHORITY\IUSRWhat are your authentication and authorization settings in web.config?
Try out following one.
<authorization>
<allow users="*"/>
<deny users="?"/>
</authorization>
精彩评论