blogengine.net for connecting SQl Server 2005

Apr 7, 2009 at 6:05 AM
Edited Apr 7, 2009 at 6:07 AM
While connecting with SQL Server 2005, i had changed web.config file.
While log in  with Username and password "admin" i am gettting error-

Server Error in '/BlogEngine.Web' Application.

Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.



Kindly help.
Coordinator
Apr 8, 2009 at 3:04 AM
That looks like you are using the ASP.Net provider for membership or roles. If you want to use the BlogEngine.Net for SQL Server providers, you'll need the membership and roles configured something like this:

<membership defaultProvider="LinqMembershipProvider">
  <providers>
    <clear/>
    <add name="LinqMembershipProvider" type="BlogEngine.SQLServer.LinqMembershipProvider, BlogEngine.SQLServer" passwordFormat="Hashed" connectionStringName="BE"/>
  </providers>
</membership>
<roleManager defaultProvider="LinqRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
  <providers>
    <clear/>
    <add name="LinqRoleProvider" type="BlogEngine.SQLServer.LinqRoleProvider, BlogEngine.SQLServer" connectionStringName="BE"/>
  </providers>
</roleManager>

Note that the real key is the "defaultProvider" attribute. That's what determines which provider is used. You likely have "SQLxxxProvider" there.