看看你的Webconfig里面是不是加了验证

解决方案 »

  1.   

    <?xml version="1.0"?>
    <!-- 
        Note: As an alternative to hand editing this file you can use the 
        web admin tool to configure settings for your application. Use
        the Website->Asp.Net Configuration option in Visual Studio.
        A full list of settings and comments can be found in 
        machine.config.comments usually located in 
        \Windows\Microsoft.Net\Framework\v2.x\Config 
    -->
    <configuration>
    <appSettings>
    <add key="nHibernateSession" value="tcp://localhost:8085"/>
    <add key="logger" value="tcp://localhost:8085/logger.rem"/>
    <add key="Authentication.AuthSvc" value="http://localhost/Authentication/AuthSvc.asmx"/>
    <add key="smtp" value="localhost"/>
    <add key="host" value="roxio.com/registration"/>
    <add key="emailtemplate.verification" value="~/templates/registration_confirmation.htm"/>
    <add key="emailtemplate.welcome" value="~/templates/registration_welcome.htm"/>
    <add key="emailtemplate.passwordrecover" value="~/templates/registration_passwordrecover.htm"/>
    </appSettings>
    <connectionStrings/>
    <system.web>
        <globalization 
               requestEncoding="utf-8"
               responseEncoding="utf-8"/>
        <machineKey validationKey="70DF5A9B3345A6AAC0ED13877933030A25E2ECD3AC75554F" decryptionKey="DF975C511A2DCEDCF6B264F66076F61B8F101EAF0EE085A4" validation="SHA1" decryption="AES"/>
        <membership defaultProvider="MyRoxioProvider">
          <providers>
            <add name="MyRoxioProvider" type="MyRoxio.Business.Membership.MyRoxioMembershipProvider"
                 passwordFormat="Hashed"/>
            <add name="SonicMembershipProvider"
                applicationName="AdminServices"
                enablePasswordRetrieval="false"
                enablePasswordReset="false"
                requiresQuestionAndAnswer="false"
                requiresUniqueEmail="true"
                passwordFormat="Hashed"
                type="SonicSecurityManagement.Membership.InternalMembershipProvider"/>
          </providers>
        </membership>    <pages enableEventValidation="false"/>
    <!-- 
                Set compilation debug="true" to insert debugging 
                symbols into the compiled page. Because this 
                affects performance, set this value to true only 
                during development.
            -->
    <authentication mode="Forms">
    </authentication>
        
    <authorization>
          <allow roles="Admin"/>
          <deny users="*"/>
    </authorization>    <roleManager enabled="true" defaultProvider="SonicRoleProvider">
          <providers>
            <add name="SonicRoleProvider" type="SonicSecurityManagement.Roles.InternalRoleProvider" applicationName="AdminServices"/>
          </providers>
        </roleManager>
        
    <customErrors defaultRedirect="~/error.aspx" mode="RemoteOnly"/>
    <compilation debug="true">
    <assemblies>
    <add assembly="System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
    </compilation>
    <!--
                The <authentication> section enables configuration 
                of the security authentication mode used by 
                ASP.NET to identify an incoming user. 
            -->
    <!--
                The <customErrors> section enables configuration 
                of what to do if/when an unhandled error occurs 
                during the execution of a request. Specifically, 
                it enables developers to configure html error pages 
                to be displayed in place of a error stack trace.        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
            -->
    </system.web>
    </configuration>
      

  2.   

    这就使web.config的内容了
    除了一个membership标签外。我没发现什么特别的地方啊
    可是我对membership不是很了解
    请各位帮帮忙
      

  3.   

    <authorization>
          <allow roles="Admin"/>
          <allow users="*"/>
    </authorization>试试看,没用2005
      

  4.   

    bill1315(apple) :
    你是让我怎么试呢?sorry, 没看懂
      

  5.   

    <allow users="*"/>
    其中*代表所有用户都可访问,2005我也没用过,你试试吧
      

  6.   

    你贴的web.config里有这一项呀,你可以改下:
    <authorization>
          <allow roles="Admin"/>
          <allow users="*"/>
    </authorization> 
    或者加上:
    <location path="webform.aspx">
    <system.web>
    <authorization>
    <allow users="*" />
    </authorization>
    </system.web>
    </location>
    webform.aspx就是你不想跳转login.aspx的页面