While installing SQL Server 2005, I unknowingly uninstalled the existing SQL Express(I dont know 2005/2008) , but then I installed sql express 2005. But now the membership api is not able to connect to the sql express database. When I run my application with the Visual Studio 2008 , and try to login into my application I am getting the following error ,
"Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed."
SQLExpress database file auto-creation error:
The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:
- If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. This is necessary because the web server account will automatically create the App_Data directory if it does not already exist.
- If the applications App_Data directory already exists, the web server account only requires read and write access to the applications App_Data directory. This is necessary because the web server account will attempt to verify that the Sql Server Express database already exists within the applications App_Data directory. Revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the Sql Server Express database already exists. This will cause an error when the provider attempts to create a duplicate of an already existing database. Write access is required because the web server accounts credentials are used when creating the new database.
- Sql Server Express must be installed on the machine.
- The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts.
Actually I am using ASP.NET MVC, and by default it has the membership functionality in the web application template, and that too is not working.
-
Try deleting the SQLExpress directory which should be at C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS directory.
Then restart your machine.
San : I was not able to find the path you specified, but I could find, C:\Users\Santosh\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS I have a vista machine, can I delete this??griegs : Unsure about that folder so maybe back it up beforehand.San : Its working now. Thank you very much. I deleted it and I also made one more setting which was given in the link provide by Rony. -
you need to change the settings of the sql server express service - refer here
0 comments:
Post a Comment