开发者

Asp.net Web Site Administration Tool with SqlCeMembership

开发者 https://www.devze.com 2023-03-18 18:48 出处:网络
I am developing an application in MVC 3. I installed this provider via Nuget . Basically, it allows to use any part of memberships, rules and profiles with a .sdf (compact) database.

I am developing an application in MVC 3.

I installed this provider via Nuget .

Basically, it allows to use any part of memberships, rules and profiles with a .sdf (compact) database.

I need the "Web Site Administration Tool" use this provider. But I can not use it.

Already checked the web.config and everything is ok.

When I open the "Web Site Administration Tool" on the Security I click test (any provider) and the error happens.

The following images.

Asp.net Web Site Administration Tool with SqlCeMembership

Error when clicking test

Asp.net Web Site Administration Tool with SqlCeMembership

"Could not establish a connection to the database. If you have not yet created the SQL Serv开发者_如何学Goer database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider."

Here part of my web.config

<authentication mode="Forms" />

<membership>
      <providers>
        <add 
          connectionStringName="SqlCeServices" 
          applicationName="/"
          enablePasswordRetrieval="false" 
          enablePasswordReset="true" 
          requiresQuestionAndAnswer="false"
          requiresUniqueEmail="true" 
          passwordFormat="Hashed" 
          writeExceptionsToEventLog="false"
          name="SqlCeMembershipProvider" 
          type="ErikEJ.SqlCeMembershipProvider, ErikEJ.SqlCeMembership" />
      </providers>
    </membership>
    <profile enabled="false">
      <providers>
        <clear />
        <add 
          name="SqlCeProfileProvider" 
          type="ErikEJ.SqlCeProfileProvider" 
          connectionStringName="SqlCeServices" 
          applicationName="/" />
      </providers>
    </profile>
    <roleManager>
      <providers>
        <add 
          connectionStringName="SqlCeServices" 
          applicationName="/"
          writeExceptionsToEventLog="false" 
          name="SqlCeRoleProvider" 
          type="ErikEJ.SqlCeRoleProvider, ErikEJ.SqlCeMembership" />
      </providers>
    </roleManager>

  <connectionStrings>
    <add name="SqlCeServices" connectionString="data source=|DataDirectory|\SqlCeAspnetdb.sdf" />
  </connectionStrings>


I did alittle research and found this forum post:

http://social.msdn.microsoft.com/Forums/is/sqlce/thread/8024acc3-8418-4891-875b-8626ce9ba376.

It seems that ASPNETDB.MDF doesnt support SQL Server Compact due to the reasons specified. Can you not use SQL Server Express?

0

精彩评论

暂无评论...
验证码 换一张
取 消