I'm trying to setup a website with a virtual application that uses windows authentication in iis7. The strange thing is that when I create a new website that points directly to the bin directory, the windows authentication works correctly. When the app is put as a virtual application under the root, the windows authentication fails (in that it constantly prompts for credentials before throwing a 401).
I have windows authentication turned on for the virtual application as well as the root website.
In IIS7 (as independent website, working):
site:port
In IIS7 (as virtual app, not working):
site:port/WebAppA
Root, WebAppA (Virtual Application)
In web.config:
<location path="controllers">
<system.web>
<authentication mode="Windows" />
<authorization>
<allow roles="INTRANET\Domain Users" />
<deny users="*" />
</authorization>
</system.web>
</location>
<location path="index.html">
<system.web>
<authorization>
<allow roles="INTRANET\Domain Users" />
<deny users="*"/>
</authorization>
</system.web>
</location>
<system.web>
Not sure why it would work correctly in one configuration, but not as a virtual app.
I am not sure what you mean by virtual application ... IIS has "Virtual Directory" and "Application" but nothing like virtual application.
When you include a virtual directory such as root\\webapp1 ... try converting it into an application ... right click -> convert to application and see if that works.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.