Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable windows authentication on single location

I have a web application and I want to provide anonymous access to a couple of the web services in it so that we can access the web services from computers without a windows login on our network.

I've tried the stuff here Disable authentication on subfolder(s) of an ASP.NET app using windows authentication. I've done this:

<authentication mode="Windows" />
<authorization>
  <deny users="?" />
</authorization>

...

  <location path="Tests/QService.asmx">
    <system.web>
      <authorization>
        <allow users="?" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>

These both "work" in that they allow access to the web service for anonymous users. However, it seems that IIS still sends an authorization challange because when I access the service from a browser I get a box to enter my username and password. If I hit cancel I get access to the page anonymously. However, some of our clients don't handle this well and just fail because of the 401 return code.

Is there a way to completely disable the windows authentication on that single location such that IIS will not try and establish a windows authentication?

like image 728
tster Avatar asked Mar 07 '11 16:03

tster


People also ask

How do I turn off Windows Authentication in Web config?

Expand the computer name, then Sites, then Default Web Site, then click on the name of the desired site. Select Authentication. Set Windows Authentication to Disabled and set Basic Authentication to Enabled.

Does Windows Authentication use Active Directory?

Is Windows Authentication the same as Active Directory? No. You can use Windows Authentication even if your server is not a member of an Active Directory domain.

How do I turn off Windows Authentication in IIS?

On the taskbar, click Start, and then click Control Panel. In Control Panel, click Programs and Features, and then click Turn Windows Features on or off. Expand Internet Information Services, then World Wide Web Services, then Security. Select Windows Authentication, and then click OK.


1 Answers

You need to disable Windows Authentication on the Virtual Directory for that single location. Then you shouldn't be challenged.

like image 107
Russell McClure Avatar answered Sep 20 '22 17:09

Russell McClure