I'm searching for this, but I can't find it, yet I know that this can be done with an htaccess file, since this is what the screenshot below does.
I want to secure a folder behind a preset username and password. I can't create a Windows user since I do not own the server and we don't need an authentication form. We want to use the default authentication form of the browser.
How is this possible from the web.config?
This i what I have but it does not work
<system.web> 开发者_如何学运维
<authentication mode="Forms">
<credentials passwordFormat="Clear">
<user name="test" password="test" />
</credentials>
</authentication>
<authorization>
<allow users="test" />
<deny users="*" />
</authorization>
</system.web>
This is not possible with forms authentication.
There seems to be a third party library to use htaccess/htpasswd style directory access configuration on IIS:
http://www.helicontech.com/ape/
See also .htaccess or .htpasswd equivalent on IIS?
精彩评论