Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 3rd, 2008, 02:53 PM
Authorized User
 
Join Date: Jun 2007
Location: Amman, Amman, Jordan.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to naeem.net Send a message via Yahoo to naeem.net
Default Failed to generate a user instance of SQL Server

I spend tow weeks looking for an anwser to this problem but no luck. I have a simple ASP.NET 2.0 application which run correctly on my local machine.
But After uploading all files including web.config file on a Windows 2003 Server with SQLEXPRESS installed. I have this error. Please Help!!!!!!

Error Message

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.

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: 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.



Ali Naeem
__________________
Ali Naeem
Reply With Quote
  #2 (permalink)  
Old June 3rd, 2008, 04:01 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Assuming that you are running this as a real site in IIS this doesn't surprise me. The user account created for running sites will be significantly different from yours on your local machine.

You really should run the database on a real running instance of a database server (regular SQL Server 2005). Or you could run express but set up an attached database instead of using the dynamic attaching that express supports. Then change your connection string to point to the regular instance and database name instead of at the data file.

-Peter
compiledthoughts.com
Reply With Quote
  #3 (permalink)  
Old June 4th, 2008, 12:52 PM
Authorized User
 
Join Date: Jun 2007
Location: Amman, Amman, Jordan.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to naeem.net Send a message via Yahoo to naeem.net
Default

Hi peter, thanks for your reply.
O.K i will try to run the database from on real running instance.
The connection string that i used is:

<connectionStrings>
<add name="aafaqConnectionString1" connectionString="Data Source=.\SQLEXPRESS;Server=69.72.149.252;AttachDBF ilename='C:\Inetpub\vhosts\babylon-uni.com\httpdocs\App_Data\aafaq.mdf';Integrated Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=aafaq;AttachDBFilename='C:\Inetpub\vhosts\ babylon-uni.com\httpdocs\App_Data\aafaq.mdf';Integrated Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>

Is that correct?

Ali Naeem
Reply With Quote
  #4 (permalink)  
Old December 11th, 2009, 02:45 PM
Registered User
 
Join Date: Jul 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://crystalrepterrinfo.blogspot.c...stall-sql.html
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL user instance error ckerin BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 April 28th, 2008 12:30 AM
SQL Express User Instance...avoiding aspdewd SQL Server 2005 1 October 27th, 2007 10:12 PM
SQL Error Locating Server/Instance Specified cole C# 2005 0 September 18th, 2006 12:38 PM
Failed to copy objects from SQL server to SQL Serv monfu SQL Server 2000 4 December 4th, 2005 05:54 PM
SQL Server / Login failed for user 'NT AUTHORITY ElPato ASP.NET 1.0 and 1.1 Basics 2 November 14th, 2004 10:03 AM



All times are GMT -4. The time now is 06:53 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.