开发者

ASP Authentication set to None and still prompting for login

开发者 https://www.devze.com 2023-03-18 17:10 出处:网络
Firstly I just want to say I\'m not an ASP developer, I\'m PHP through n through... So my problem is this, all of a sudden a client site has started prompting for users to be logged in when viewing p

Firstly I just want to say I'm not an ASP developer, I'm PHP through n through...

So my problem is this, all of a sudden a client site has started prompting for users to be logged in when viewing pages in a sub directory, when I download the web.config file I can see the authentication mode set to开发者_Go百科 "Windows" this would appear to be an issue but it was working up until now, so I set it to None and uploaded the file (there isn't a web.config in the sub directory, just the site root) and it continues to prompt me for the login.

Is there something I need to do to "refresh" the server or something? I've looked through the hosting control panel and can't find anything about anonymous access or restarting the server, its on a shared hosting account and the control panel is pretty below average

Any help is greatly appreciated!! I'm in a panic and the hosting company don't have ASP support on hand

Thanks, Mark


In the folder that you want anonymous access, just use the web.config authorization section to allow anonymous users:

<configuration>
  <system.web>
    <authorization>
      <allow users="*"/>
    </authorization>
  </system.web>
</configuration>

The * essentially means Everyone so it just saying that for the current directory, everyone is allowed access- you only need this in the web.config...nothing more.

If you are still receiving prompts after this, then the folder itself must have permissions at the operating centre level (NTFS permissions) which do not allow Anonymous access...Although you say the ASP support isn't at hand, I presume you can raise help tickets with them to enable this access?

Edit
I should add that this setting of authorization is different to setting an Authentication scheme (Windows Authentication, Forms Authentication etc). For example, you might have Forms Authentication for your website but specifically want anonymous access to a folder (like this case) so setting your authentication option isn't actually relevant.

0

精彩评论

暂无评论...
验证码 换一张
取 消