我怎样才能限制远程访问ELMAH?远程访问、ELMAH

2023-09-03 06:14:02 作者:哭过败过伤过何曾怕过

通过安装ELMAH我们开发的Web服务器。我们可以限制谁远程访问它?即使F c的用户名/密码,我们很难$ C $(哈希?),或者仅通过IP是什么呢?

With Elmah installed on our dev web server .. can we restrict who remotely accesses it? Even f we hardcode the username/passwords (hashed?) or is it only via IP?

推荐答案

有两种设定,一种是在< ELMAH>

There are two settings, one is in <elmah>:

<elmah>
    <security allowRemoteAccess="1"/>
</elmah>

另外就是,如果您允许远程访问,您可以使用&LT;地点&gt; 来控制谁访问它:

  <location path="elmah.axd">
    <system.web>
      <authorization>
        <allow roles="Administrator"/>
        <deny users="*"/>
      </authorization>
    </system.web>
  </location>

您可以只后,你把这个主web.config中&LT; /运行&GT; 标记

You can put this in the main web.config just after you </runtime> tag