i installed php on my windows server 2008-R2 and every thing is ok about that on iis.
i created a web site in iis (php) and put a simple script on it.
i went to permissions of that web site and removed all permissions except administrators.
now when i open that web site in browser a login window appears and i can login with administrator user’s info.
but this way does not work for an asp.net 4.0 web application on iis and i can not remove network service permission.mean by removing that i have an error when opens that web site in browser.
i want to learn how can we show default login window for an asp.net application in two ways :
- change permissions
- by c# codes
really appreciate for viewing and attention
You cannot remove Network Service permissions from the website because this is the identity under which asp.net runs. But this shouldn’t have any impact on remote login to the website.
The solution to making IIS authentication work nicely with asp.net depends on what kind of IIS authentication you are using…
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/9b619620-4f88-488b-8243-e6bc7caf61ad.mspx?mfr=true
This document has a lot of detail on how to make the various IIS authentication methods work with asp.net
http://msdn.microsoft.com/en-us/library/ee817643.aspx
One word of warning just in case… it sounds from above that you’re using the administrator login to secure your website. Many forms of authentication that IIS (or asp.net) implements don’t use encryption to send username/password to the server you could be broadcasting your administrator credentials to the world. You should always use an identity specific to the website and make sure that identity doesn’t have any sort of other permissions on the server.