开发者

Is it possible to have a simple user-password authentication without having a login form?

开发者 https://www.devze.com 2023-04-12 16:42 出处:网络
I\'m searching for this, but I can\'t find it, yet I know that this can be done with an htaccess file, since this is what the screenshot below does.

I'm searching for this, but I can't find it, yet I know that this can be done with an htaccess file, since this is what the screenshot below does.

I want to secure a folder behind a preset username and password. I can't create a Windows user since I do not own the server and we don't need an authentication form. We want to use the default authentication form of the browser.

How is this possible from the web.config?

This i what I have but it does not work

<system.web>    开发者_如何学运维
    <authentication mode="Forms">
      <credentials passwordFormat="Clear">
        <user name="test" password="test" />
      </credentials>
    </authentication>
    <authorization>
      <allow users="test" />
      <deny users="*" />
    </authorization>
</system.web>

Is it possible to have a simple user-password authentication without having a login form?


This is not possible with forms authentication.

There seems to be a third party library to use htaccess/htpasswd style directory access configuration on IIS:

http://www.helicontech.com/ape/

See also .htaccess or .htpasswd equivalent on IIS?

0

精彩评论

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

关注公众号