开发者

Authentication form problem

开发者 https://www.devze.com 2023-03-18 19:37 出处:网络
This is a section from my web.config: <authentication mode=\"Forms\"> <forms name=\".MyCookie\" loginUrl=\"~/Registration.aspx\" protection=\"All\" timeout=\"30\" path=\"/\">

This is a section from my web.config:

<authentication mode="Forms">
  <forms name=".MyCookie" loginUrl="~/Registration.aspx" protection="All" timeout="30" path="/">
    <credentials passwordFormat="MD5">
      <user name="user" password="ca064d0730abfeb09e383a0e82e65f73"/>
    </credentials>
  </forms>
</authentication>

  <authorization>
  <deny users="?"/>
  <allow users="*"/>
</authorization>

This is the section in Registration.aspx..that the form doesnt show when the user is anonym开发者_JAVA百科ous:

   <asp:Image ID="Image1" runat="server" ImageUrl="~/header.png" />

I dont understand why..But the picture is never shown :(


Add this in the web.config, in the configuration element:

<location path="header.png">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>
0

精彩评论

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