Environment: IIS7.5, .net 4.5
I want anonymous access to all of the pages except one. This one page must only be visible for users in my domain. This page should also automatically use users current windows domain account without asking him to enter it. If I use this setting in web.config/IIS:
authentication mode="Windows"
It asks for credentials for every page I try to open and when I enter my domain account I can see the page. So there are two problems with this. It did not restrict it just for one page and it did not use my windows account automatically. Is there any out of the box solution for this. Perhaps to allow anonymous access in ISS and use some attribute on the class to say it needs authentication?
You can allow anonymous access in IIS for the application folder, and set the authentication method to Integrated Windows authentication for just the page that you want to restrict.
How to configure Authentication in IIS
What browser type is prompting for credentials? In my experience Internet Explorer will automatically use windows accounts, but Firefox requires that I edit about:config:
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加