2013-03-26 2 views
0

동일한 aspnetdb에서 여러 응용 프로그램을 실행하고 있습니다. 그들은 모두 동일한 MembershipProvider를 사용하고 있습니다. 때로는 프로필 속성에 "이상한 값"이 표시되기도합니다. 응용 프로그램이 다른 응용 프로그램의 데이터를 사용하는 것 같습니다.여러 개의 응용 프로그램과 하나의 aspnetdb, 프로필의 문제

이미 다른 ApplicationName 매개 변수를 사용하고 있습니다.

프로필에 대해 고유 한 데이터베이스를 사용하지 않고 응용 프로그램을 명확하게 구분할 수있는 방법이 있습니까?

답변

1

이 게시물은

http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_-property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx

<membership> 
      <providers> 
       <clear/> 
       <add name="AspNetSqlMembershipProvider" 
        type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
        connectionStringName="LocalSqlServer" 
        enablePasswordRetrieval="false" 
        enablePasswordReset="true" 
        requiresQuestionAndAnswer="true" 
    requiresUniqueEmail="false" 
        passwordFormat="Hashed" 
        maxInvalidPasswordAttempts="5" 
        minRequiredPasswordLength="7" 
        minRequiredNonalphanumericCharacters="1" 
        passwordAttemptWindow="10" 
        passwordStrengthRegularExpression="" 
        applicationName="/" 
       /> 
      </providers> 
     </membership> 

각 응용 프로그램에 대해 동일한 ConnectionString을 추가 필요에 유용하며, applicationName 속성에 다른 이름을 설정

관련 문제