Change from SQL Express to SQLServer

 When I changed my database from SQL Express to SQL Server, my regular .NET application stops working with this error:



Server Error in '/' 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'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

After some research, I found out that we need to prepate the regular SQL database for use with ASP.NET applications. 

The command aspnet_regsql.exe needs to be run. However, it can't find it if you just run from the normal command line. 

The trick is to use Visual Studio Command Line Prompt, which save you the time of searching for the right location of the file.