Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ASP.Net成员身份未访问我的Sql Server数据库_C#_Asp.net_Membership - Fatal编程技术网

C# ASP.Net成员身份未访问我的Sql Server数据库

C# ASP.Net成员身份未访问我的Sql Server数据库,c#,asp.net,membership,C#,Asp.net,Membership,我在数据库上运行了aspnet_regsql,我想在其中存储成员表。这是同一个数据库,我为我的工作负载存储了所有的表 但是,当我在我的站点上注册用户时,它会在表ASPNETDB中创建用户,而不是在SQLServer中创建的用户 <?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.micros

我在数据库上运行了aspnet_regsql,我想在其中存储成员表。这是同一个数据库,我为我的工作负载存储了所有的表

但是,当我在我的站点上注册用户时,它会在表ASPNETDB中创建用户,而不是在SQLServer中创建的用户

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <connectionStrings>
    <add name="HotelProjectConnectionString" connectionString="Data Source=KHAN-PC;Initial Catalog=HotelProject;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>

  <system.web>
    <roleManager enabled="true" />
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      </assemblies>
    </compilation>
  </system.web>
</configuration>

您必须在system.web标记下的web.config中指定成员资格提供者。检查


链接到引用。

您有多少sql实例?我遇到了类似的问题。明白了,我以前也看过!