看看目录 '/dangwei' 是否对用户 'LILIZONG\ASPNET' 开了权限

解决方案 »

  1.   

    web.config连接如下!<?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/>
    <connectionStrings>
      <add name="dangweiConnectionString" connectionString="Data Source=LILIZONG;Initial Catalog=dangwei;Integrated Security=True"
       providerName="System.Data.SqlClient" />
      <add name="dangweiConnectionString2" connectionString="Data Source=LILIZONG;Initial Catalog=dangwei;Integrated Security=True"
       providerName="System.Data.SqlClient" />
      <add name="sqlconn" connectionString="server=LILIZONG;database=dangwei;uid=sa;"
       providerName="System.Data.SqlClient" />
      <add name="dangweiConnectionString3" connectionString="Data Source=LILIZONG;Initial Catalog=dangwei;Integrated Security=True"
       providerName="System.Data.SqlClient" />
      <add name="dangweiConnectionString4" connectionString="Data Source=LILIZONG;Initial Catalog=dangwei;Integrated Security=True"
       providerName="System.Data.SqlClient" />
     </connectionStrings>
    <system.web>
    <!-- 
                Set compilation debug="true" to insert debugging 
                symbols into the compiled page. Because this 
                affects performance, set this value to true only 
                during development.
            -->
    <compilation debug="true"/>
    <!--
                The <authentication> section enables configuration 
                of the security authentication mode used by 
                ASP.NET to identify an incoming user. 
            -->
    <authentication mode="Forms">
    <forms loginUrl="denglu.aspx"/>

    <!--
                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>
            -->
            </authentication>
    </system.web>
    <location path="security">
    <system.web>
    <authorization>
    <deny users="?"/>
    <deny users="*"/>
    </authorization>
    </system.web>
    </location>
    </configuration>
      

  2.   

    该处用的是name="dangweiConnectionString"这个连接!
      

  3.   

    看看目录 '/dangwei' 是否对用户 'LILIZONG\ASPNET' 开了权限
    ------------------------------
    用户"lilizong\aspnet"是什么意思呢?
      

  4.   

    直接把它改成sqlserver的账户连接试试.
      

  5.   

    问题解决啦,需要建立新的用户,包括本机和sql server服务器,
    具体方法可以看我博客.
    非常感谢大家的帮忙.