Showing posts with label website. Show all posts
Showing posts with label website. Show all posts

Tuesday, March 27, 2012

Failed to generate a user instance of SQL Server??

I use VS2005 & sql2005express to create a website, but it cannot to display data.

When I run it, I got such errors:

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.

My web.config file:

<add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/>

When I change the User Instance=True to False, it works, but MSDN says it is not safe.

I searched the past threads, which writes "delete the folder C:\Documents and Settings\yy\Local Settings\Application Data\Microsoft\Sqlserver Data, it will work".

I try, but failed. What should I do??

have u resolved this error, I'm getting the same?

Friday, March 23, 2012

Failed to generate a user instance

I'm developing my website in my docs. Once I get a version that is stable I move it over to inetput/wwwroot. When I login to my site it says it failed to generate a user instance... for (Server)/aspnet. However, I have specified a username / password in my connection string. Any ideas?

<addname="tppConnection"connectionString="Server=(local)\SqlExpress;Database=theProductPad;User ID=username;Password=password;"providerName="System.Data.SqlClient"/>

Hi,

You may install the SQL Management Studio 2005 Express first, create an account named "YOUR PC\ASPNET".And then create a database for the use of YOURPC\ASPNET with the help of SQL Management Studio Express. Finally in your Visual Studio, create a connection to the new database you just created. Select "SQL Server" as service provider, ".\SQLEXPRESS" as data source, and you will find your new database name as well as four system databases under the "select database". Test your connection. It should work!

Thanks.

|||

I did all of that a long time ago. Everything works fine if I'm using windows login security. However, this app won't be hosted on my local machine. I created a user and can login to sql server management studio and access everything that I need. I'm getting the error when I try to connect to the db through running my app or when I'm in the server explorer and try to change the login to the user I created.

|||

Does anyone know what may be causing my site to use the default ASPNET user instead of the username/password in the connectionstring?

<add name="tppConnection" connectionString="Server=(local)\SqlExpress;Database=theProductPad;User ID=username;Password=password;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>

|||

I deleted the string above, added a datalist and created a new connection string by the same name with all appropriate credentials and saved it to the web.config file and everything seems to be working now.

Monday, March 19, 2012

Failed Login SQL Express

Everything works fine with the website I've created except i get a Login failed message every now and then

Failed Login is: NT AUTHORITY\NETWORK SERVICE

Is this to do with the maximum number of connections to the database?

how can i stop this from happening?

AusClans:

Is this to do with the maximum number of connections to the database?

Maybe, but probably not. That would be a different error message. What is the full exception message you get?

Don