Showing posts with label vs2005. Show all posts
Showing posts with label vs2005. 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?

Monday, March 26, 2012

Failed to generate a user instance of SQL Server

Hi,

On my developer machine I don't have any problems with VS2005 and SQL Server 2005 Express. Now I should set up a server (Win2003Web) for a webhosting environment.
Every website has its own application pool with its own application pool user. Now if I try to connect to a db in my data directory I get the following error:

Failed to generate a user instance of SQL Server due to failure in

retrieving the user's local application data path. Please make sure the user has

a local user profile on the computer. The connection will be closed.

I already read the other threads about that subject but they didn't help me because I need to connect to the db with different application pool users.

Can somebody help me, please?!
Thanks, fabianOk, I think my problem is due to the fact that my application pool users haven't got a user profile and they aren't getting one because they can't login. I tried out to give one user the rights to login und afterwards i logged in. Since then the error is gone.
Is this the only solution to my problem? Do I must login with every new application pool user? I hope there's another solution .
I could create perhaps a directory in C:\Documents and...\ for the username but I don't think that would work?! Or create a user profile with a simple c# codesnipped (don't know if there's something like that)?

Any suggestions?

Failed to generate a user instance of SQL Server

Hi,

On my developer machine I don't have any problems with VS2005 and SQL Server 2005 Express. Now I should set up a server (Win2003Web) for a webhosting environment.
Every website has its own application pool with its own application pool user. Now if I try to connect to a db in my data directory I get the following error:

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

I already read the other threads about that subject but they didn't help me because I need to connect to the db with different application pool users.

Can somebody help me, please?!
Thanks, fabian
Ok, I think my problem is due to the fact that my application pool users haven't got a user profile and they aren't getting one because they can't login. I tried out to give one user the rights to login und afterwards i logged in. Since then the error is gone.
Is this the only solution to my problem? Do I must login with every new application pool user? I hope there's another solution .
I could create perhaps a directory in C:\Documents and...\ for the username but I don't think that would work?! Or create a user profile with a simple c# codesnipped (don't know if there's something like that)?

Any suggestions?

Friday, March 23, 2012

Failed to create Application Services Database for SQL Server

I have sql 2005 express installed with VS2005. I tried to install the service database using Aspnet_regsql.exe but always ended up with the same error:

Code Snippet

Setup failed.

Exception:
An error occurred during the execution of the SQL file 'InstallMembership.sql'. The SQL error number is -2 and the SqlException message is: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

-
Details of failure
-

SQL Server:
Database: [aspnetdb]
SQL file loaded:
InstallMembership.sql

Commands failed:

EXEC sp_addrolemember N'aspnet_Membership_BasicAccess', N'aspnet_Membership_FullAccess'
EXEC sp_addrolemember N'aspnet_Membership_ReportingAccess', N'aspnet_Membership_FullAccess'

SQL Exception:
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Web.Management.SqlServices.ExecuteFile(String file, String server, String database, String dbFileName, SqlConnection connection, Boolean sessionState, Boolean isInstall, SessionStateType sessionStatetype)


The database aspnetdb was always created with just 4 tables and 3 views.

Please can someone help me on this, thanks very much!

If the database still exists, the script might wait for the last database connection to close to be able to drop the database. Is there any DROp statement in the sql file ?

Jens K. Suessmeyer

http://www.sqlserver2005.de

Friday, March 9, 2012

Fail to run as job but success execute in VS2005

hi all,

please help,

i using Execute DTS 2000 Package Task to create a package.dtsx, and execute successful in VS2005

but when i created it as a job and it fail to run.

the package.dtsx is calling a package2000.dts, which having 2 steps to run.

i execute the job by step, and the i found that the 1st job is running successful but the 2nd job was fail.

may i know where can i found the error log? or any where to debug it?

please help......

thanks 1st.....

Hi Khin,

* Note that configuring log for SSIS will not provide the log for Individual steps run in the Execute DTS 2000 Package task.

* Configure a Separate log for the DTS file enclosed by opening it in DTS designer, right click -> Properties ->Logging -> <Give a file Path to Store this log file >.

Thanks

Subhash Subramanyam