Could Not Find Stored Procedure 'Dbo.Aspnet_Checkschemaversion'

Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'

Did you run aspnet_regsql.exe against WinHost.com's sql server?

aspnet_regsql.exe -S DBServerName -U DBLogin -P DBPassword -A all -d DBName

If you don't know where to run above command then you can simply run 'aspnet_regsql.exe' executable file.

In order to locate this file open your RUN Command Box by pressing Windows Key + r and put below command in that %windir%\Microsoft.NET\Framework\v4.0.30319 and Hit enter then find 'aspnet_regsql.exe' file. It will open a wizard that you can follow to resolve this error.

This error mostly occurs when you didn't enabled Roles in your asp.net mvc project At starting before aspnet identity table automatically created.

You will need to make sure you run this so that the tables and objects are created on WinHost.com's SQL server.

ASP.NET - Web.config login error Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'

Have you created the tables and stored procedures in your SQL-Server?

Have a look this link and execute aspnet_regsql.exe if you are using MS Sql-Server as DBMS.

When I use the Roles object I get an error of Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'

For MVC 5, you need to remove the roleManager tag, I think. I was using <roleManager> in my latest MVC 5 application and was getting the exact same error as you. As soon as I removed it, the error went away. I think this is because MVC uses a different role management approach.

A couple of other things: make sure you have the proper tables setup in your database. These are the tables you will need:

  • _MigrationHistory
  • AspNetRoles
  • AspNetUserClaims
  • AspNetUserLogins
  • AspNetUserRoles
  • AspNetUsers

You may not need all of these, depending on what you are doing. To get these setup properly, I (1) created a new project with the MVC 5 template, (2) ran the project locally (3) went through the registration process of a new user on the site and (4) looked in my local SQL server (LocalDb)\v11.0 and it had created a database there with all the tables I mention above. I then scripted those tables out and ran the scripts against my real database.

Then, in your application you should be able to call User and get access to methods like User.IsInRole("someRole");.

localhost cannot find stored procedure 'dbo.aspnet_CheckSchemaVersion'

Please provide UserID and Password to your connection string. Its not there in connection string.

Custom Role Provider Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. on [Authorize(Roles = Admin )] attribute

According to your web.config file, you are not using custom role provider.

Type should be type="CostaPropertyServices.Models.CustomRoleProvider, CostaPropertyServices"

<system.web>
<roleManager enabled="true" defaultProvider="CustomRoleProvider"
cacheRolesInCookie="true">
<providers>
<clear />
<add name="CustomRoleProvider"
type="CostaPropertyServices.Models.CustomRoleProvider"
connectionStringName="DefaultConnection"
applicationName="CostaPropertyServices" />
</providers>
</roleManager>

Could not find stored procedure dbo aspnet CheckSchemaVersion LOCAL HOST

You need to run aspnet_regsql from the Visual Studio Command Prompt to re-create the database stuff used by the built-in membership system.

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

The correct method of setting up the membership provider database is to run the asp.net reg tool. It can be found in the location below:

"C:\Windows\Microsoft.NET\Framework\<FrameworkVersion>\aspnet_regsql.exe"

More information
http://msdn.microsoft.com/en-us/library/x28wfk74(v=vs.100).aspx



Related Topics



Leave a reply



Submit