전체 SQL Server 2005를 역할 공급자의 데이터 저장소로 사용하려고합니다.ASP.NET 역할 공급자 : sql express 대신 SQL Server를 사용합니까?
마법사를 사용하여 aspnetdb를 설치했습니다.
<roleManager enabled="true">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer"
applicationName="/MyApp"
type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>
이 같은 프로그램 역할을 만들 :
if (Roles.RoleExists("RoleName"))
Roles.CreateRole("RoleName");
내 응용 프로그램에서
나는 다음과 같이 내 역할 공급자를 구성한 다음 연결 문자열<connectionStrings>
<clear/>
<add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
추가 하지만 SQL 관리 스튜디오에서 내 aspnetdb를 확인할 때 테이블 aspnet_Roles에는 기록이없고 그 위치에 삽입되지 않은 역할이 있습니다.
이 단계에 문제가 있습니까? 아니면 누락 된 것이 있습니까?
감사합니다.
이 질문을 삭제 하시겠습니까? – Gumbo