c# - Set Http Basic Authentication at the project level (web.config) -


any way this? i've seen every other config file referenced 1 (usually iis) need portable project. have 1 project need demo basic http authentication on ssl, , not have thought hard part.

put code in web.config file under system.web element:

 <security>   <authentication>    <anonymousauthentication enabled="false" />    <basicauthentication enabled="true" />   </authentication>  </security> 

bear in mind basic auth. must have been enabled on server (through turn on/off windows features)


Comments