Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Thursday, March 29, 2012

Failed to Open Rowset Error in Crystal Reports

hello all,

i have developed a desktop application(software) inwhich used Crystal Reports 9. I am using Microsoft Developement Environment 2003 (Visual Studio 2003).The reports in this software runs well on my own system where i developed the software but when I install this software on the computer(client computer), the report does not open when the Generate Report button is clicked. This button click event fills the data using a simple query from databse(SQL Server 2000) and this error is displayed:

Failed to open Rowset.

The .Net Framework 1.1 is installed on the client computer before the software is installed and run.

I also include some merge modules in the setup of the project that I make. These merge modules are:

Crystal_Database_Access_enu2003.msm

Crystal_regwiz2003.msn

Crystal_Database_Access2003.msm

Crystal_managed2003.msm

Please help me to resolve this problem so that on the client computer the reports are displayed and data is shown.

Thanks in advance

hello all again,

I posted this problem yesterday and got no reply yet.

please help me solve this problem. I am in great need of this reporting software but don't know what is missing or wrong which is creating problem

Thanks all of you!

|||

Hi,

I have the exact problem. If some one can reply it will be great.

Thanx.

|||This sounds like a Crystal Reports issue. This forum is for questions regarding SQL Server Reporting Services.

Failed to open a rowset (Crystal Reports)

I am using Visual Studio .NET 2003 and the version of Crystal that comes with it. I have a problem that when a report is displayed and it doesn't have any data I receive the following error message "Failed to open a rowset" and only a blank screen is shown. I need at least the Header labels to show. How can I make it show at least the header labels.Ok, I figured it out. The stored procedure that runs the report gathers data into a temp table. If the there isn't any data it made the report error out. I rewrote the SP to not use a temp table and all is working well.|||hey,
i am having the same problem with Crystal reports.
i have a few Crystal Reports that were being used as stand-alone reports.
Now i would like to develop an application (WITHOUT including the reports into the application) that shows all the reports that are in a specific directory (done!), list all the report names in a listview (done), and when the user clicks on a reportname.... i want the application to open the report.

Currently i have the following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
'Dim report As ReportDocument = New ReportDocument
Dim ReportName As String
ReportName = Me.ListView1.SelectedItems(0).Text
report.Load(ConfigurationSettings.AppSettings("DirPath") & ReportName & ".rpt")
report.SetDatabaseLogon("testLogin", "testPassword")

Dim frm As New frmViewer
frm.Show()
End Sub

I rewrote the SP to not use a temp table and all is working well
how exactly was this done?

Thanks..... i hope you solve my problem!

Monday, March 26, 2012

Failed to generate a user instance of SQL Server

Hello Everyone,
I have instaled SQLExpress September on my Windows Server 2003 Standard.
and I work on a windows XP SP2 for development using Visual studio Web Edition (Beta2) which comes with sql server 2005 too.
I've built my application and tested it on my computer and everything went fine.
But When I copied the application to the server, it showed 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.

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

I've read alot of threads but it doesn't seem that any of them deals with my problem.

This is because of a known problem in Windows. See http://support.microsoft.com/default.aspx?scid=kb;en-us;896613 for more details.

Thanks

|||Dear Sir,
Thanks for your reply, but I'm using Windows server 2003 Web Edition on my server.|||

While I might be suggesting the obvious, but have you checked what the error suggests?

What account SQL Server is running under? If it is a user account, does it have a user profile?

If you create an app that just connects to a SQL Server instance, does it work?

|||

Q:have you checked what the error suggests?
A:what I wrote in the first message was what I got as a suggestion
Q:What account SQL Server is running under?
A:I connect using the administrator account.
Q:does it have a user profile?
A:To be honest with you,
Second, SQL Server connects using "Network Service"
The error suggests checking the local user profile, I've checked it, it only shows profile1.
Q:If it is a user account, does it have a user profile?
A:Yes its a user account,about user profile it has one, but do I need to do any extra configs especially for SQL express?
Q:If you create an app that just connects to a SQL Server instance, does it work?
A:when I create one through VS2005 and start it from VS it works fine, but when I copy it to the inetpub location it shows the error. strange!

Boris Bon thanks for trying to help, I appreciate it... Smile but still no solution

|||

Dennis,

The reason for the error your are seeing is that the account under which you are trying to create a user instance of SQL Express does not have a local profile on the server. The error message suggests verifying this.

To fix this you either need to locally login using that account or adjust your impersonation settings on the application or modify the connection string.

When you are working in VS you are using an account which does have a local profile, so this problem does not exist. When however, you copy the application to the Intepub folder you are starting to run application in a different user context, thus the problem.

Describe your application in greater detail. Is it ASP.NET app? Does it use impersonation? Is the IIS server on the same machine where you develop the application? How does you connection string look like? How do you change it when you move the application?

You misunderstood my previous questions.

Account SQL Server running under is not the same thing as the account you use to connect to SQL Server. Apparently, you are running SQL Server as NETWORK SERVICE. Next, profile1 looks like a hardware profile, not a user profile, what you need to check is User profiles on Advanced Tab of System properties.

You may also want to look in the error log to understand what account it tries to create a user instance under.

Boris.

|||

Well, I was able to solve my problem as follows:
I checked my IIS Application pool that my domain uses, it appeare that I it was using an account that doesn't have a local user profile, so I changed the Application pool Identity to local system and it started working...
Thanks for everyone that has been trying to help...

|||

i did try to change "IIS Admin" Windows service to run as administrator, which has a local user profile, but it still didn't work in my case (running iis on xp professional, IIS version 5.0)

Sorry, i am new to IIS and SQl server 2005, can anyone give further help on this issue? I really want to make my app. run on IIS, it ran ok on VS 2005 though.

Thanks in advance!

|||

Dear mw2005,

Do you have service pack 2 installed on your windows XP? its a requirement for working with SQL Server 2005, to view all the requirements:

http://www.microsoft.com/sql/editions/express/sysreqs.mspx

|||

Hi, DennisCIS,

Yes, I have xp SP2 installed, I had to install it first before I can install VWD 2005. I may have missed something, it didn't work for me.

Regards,

mw2005

|||

Anyone made it work under IIS 5.x + XP SP2 environment? or do I have to upgrade to Windows 2003 Server env.?

One interesting thing is that I changed my application to use "Local impersonation", the error of "Failed to generate a user instance of SQL Server ... " is gone, but I got the other error instead as follows, I still didn't make it run on IIS 5.x + XP SP2 environment, I ran out of ideas now, if anyone could give a helping hand, it'd be very much appreciated.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:

Line 13: SiteMapNode temp; Line 14: temp = SiteMap.CurrentNode.Clone(true); Line 15: Uri u = new Uri(e.Context.Request.Url.ToString()); Line 16: temp.Url += u.Query; Line 17: if (temp.ParentNode != null) {

Source File: c:\my_apps\test1\Global.asax Line: 15

|||Were you able to resolve this? I am running into the same problem. I am using the personal site starter kit for VS2005 Express running on PWS on XP sp2. Any assitance you can offer would be appreciated. Thanks. My email is: igaydos @. ptd dot net|||I had this problem with the Commerce Starter Kit, running XP SP2. I changed the connection strings for both the SQLExpress DBs by setting the User Instance=False (was true). This sorted it out for development... I'll probably get into trouble with deployment like earlier in this thread, but I'll cross that bridge when I get there.|||

I've had to add new line to my connection string in web.config file to fix the problem:

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

Then the IIS application pool I used an acount that has a local user profile (local system is an example) but this could make a security hole in your system.

Hope this was helpful

|||FYI: I get this error when the other computer on my home network (2 computers total) is turned on. It works fine when the other computer is turned off. This other computer is not used remotely (or in any way) with my SQL Server Express / VB 2005 Express application.

Failed to generate a user instance of SQL Server

Hello Everyone,
I have instaled SQLExpress September on my Windows Server 2003 Standard.
and I work on a windows XP SP2 for development using Visual studio Web Edition (Beta2) which comes with sql server 2005 too.
I've built my application and tested it on my computer and everything went fine.
But When I copied the application to the server, it showed 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.

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

I've read alot of threads but it doesn't seem that any of them deals with my problem.

This is because of a known problem in Windows. See http://support.microsoft.com/default.aspx?scid=kb;en-us;896613 for more details.

Thanks

|||Dear Sir,
Thanks for your reply, but I'm using Windows server 2003 Web Edition on my server.|||

While I might be suggesting the obvious, but have you checked what the error suggests?

What account SQL Server is running under? If it is a user account, does it have a user profile?

If you create an app that just connects to a SQL Server instance, does it work?

|||

Q:have you checked what the error suggests?
A:what I wrote in the first message was what I got as a suggestion
Q:What account SQL Server is running under?
A:I connect using the administrator account.
Q:does it have a user profile?
A:To be honest with you,
Second, SQL Server connects using "Network Service"
The error suggests checking the local user profile, I've checked it, it only shows profile1.
Q:If it is a user account, does it have a user profile?
A:Yes its a user account,about user profile it has one, but do I need to do any extra configs especially for SQL express?
Q:If you create an app that just connects to a SQL Server instance, does it work?
A:when I create one through VS2005 and start it from VS it works fine, but when I copy it to the inetpub location it shows the error. strange!

Boris Bon thanks for trying to help, I appreciate it... Smile but still no solution

|||

Dennis,

The reason for the error your are seeing is that the account under which you are trying to create a user instance of SQL Express does not have a local profile on the server. The error message suggests verifying this.

To fix this you either need to locally login using that account or adjust your impersonation settings on the application or modify the connection string.

When you are working in VS you are using an account which does have a local profile, so this problem does not exist. When however, you copy the application to the Intepub folder you are starting to run application in a different user context, thus the problem.

Describe your application in greater detail. Is it ASP.NET app? Does it use impersonation? Is the IIS server on the same machine where you develop the application? How does you connection string look like? How do you change it when you move the application?

You misunderstood my previous questions.

Account SQL Server running under is not the same thing as the account you use to connect to SQL Server. Apparently, you are running SQL Server as NETWORK SERVICE. Next, profile1 looks like a hardware profile, not a user profile, what you need to check is User profiles on Advanced Tab of System properties.

You may also want to look in the error log to understand what account it tries to create a user instance under.

Boris.

|||

Well, I was able to solve my problem as follows:
I checked my IIS Application pool that my domain uses, it appeare that I it was using an account that doesn't have a local user profile, so I changed the Application pool Identity to local system and it started working...
Thanks for everyone that has been trying to help...

|||

i did try to change "IIS Admin" Windows service to run as administrator, which has a local user profile, but it still didn't work in my case (running iis on xp professional, IIS version 5.0)

Sorry, i am new to IIS and SQl server 2005, can anyone give further help on this issue? I really want to make my app. run on IIS, it ran ok on VS 2005 though.

Thanks in advance!

|||

Dear mw2005,

Do you have service pack 2 installed on your windows XP? its a requirement for working with SQL Server 2005, to view all the requirements:

http://www.microsoft.com/sql/editions/express/sysreqs.mspx

|||

Hi, DennisCIS,

Yes, I have xp SP2 installed, I had to install it first before I can install VWD 2005. I may have missed something, it didn't work for me.

Regards,

mw2005

|||

Anyone made it work under IIS 5.x + XP SP2 environment? or do I have to upgrade to Windows 2003 Server env.?

One interesting thing is that I changed my application to use "Local impersonation", the error of "Failed to generate a user instance of SQL Server ... " is gone, but I got the other error instead as follows, I still didn't make it run on IIS 5.x + XP SP2 environment, I ran out of ideas now, if anyone could give a helping hand, it'd be very much appreciated.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:

Line 13: SiteMapNode temp;

Line 14: temp = SiteMap.CurrentNode.Clone(true);

Line 15: Uri u = new Uri(e.Context.Request.Url.ToString());

Line 16: temp.Url += u.Query;

Line 17: if (temp.ParentNode != null) {


Source File: c:\my_apps\test1\Global.asax Line: 15

|||Were you able to resolve this? I am running into the same problem. I am using the personal site starter kit for VS2005 Express running on PWS on XP sp2. Any assitance you can offer would be appreciated. Thanks. My email is: igaydos @. ptd dot net|||I had this problem with the Commerce Starter Kit, running XP SP2. I changed the connection strings for both the SQLExpress DBs by setting the User Instance=False (was true). This sorted it out for development... I'll probably get into trouble with deployment like earlier in this thread, but I'll cross that bridge when I get there.|||

I've had to add new line to my connection string in web.config file to fix the problem:

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

Then the IIS application pool I used an acount that has a local user profile (local system is an example) but this could make a security hole in your system.

Hope this was helpful

|||FYI: I get this error when the other computer on my home network (2 computers total) is turned on. It works fine when the other computer is turned off. This other computer is not used remotely (or in any way) with my SQL Server Express / VB 2005 Express application.

Failed to generate a user instance of SQL Server

Hello Everyone,
I have instaled SQLExpress September on my Windows Server 2003 Standard.
and I work on a windows XP SP2 for development using Visual studio Web Edition (Beta2) which comes with sql server 2005 too.
I've built my application and tested it on my computer and everything went fine.
But When I copied the application to the server, it showed 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.

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

I've read alot of threads but it doesn't seem that any of them deals with my problem.

This is because of a known problem in Windows. See http://support.microsoft.com/default.aspx?scid=kb;en-us;896613 for more details.

Thanks

|||Dear Sir,
Thanks for your reply, but I'm using Windows server 2003 Web Edition on my server.|||

While I might be suggesting the obvious, but have you checked what the error suggests?

What account SQL Server is running under? If it is a user account, does it have a user profile?

If you create an app that just connects to a SQL Server instance, does it work?

|||

Q:have you checked what the error suggests?
A:what I wrote in the first message was what I got as a suggestion
Q:What account SQL Server is running under?
A:I connect using the administrator account.
Q:does it have a user profile?
A:To be honest with you,
Second, SQL Server connects using "Network Service"
The error suggests checking the local user profile, I've checked it, it only shows profile1.
Q:If it is a user account, does it have a user profile?
A:Yes its a user account,about user profile it has one, but do I need to do any extra configs especially for SQL express?
Q:If you create an app that just connects to a SQL Server instance, does it work?
A:when I create one through VS2005 and start it from VS it works fine, but when I copy it to the inetpub location it shows the error. strange!

Boris Bon thanks for trying to help, I appreciate it... Smile but still no solution

|||

Dennis,

The reason for the error your are seeing is that the account under which you are trying to create a user instance of SQL Express does not have a local profile on the server. The error message suggests verifying this.

To fix this you either need to locally login using that account or adjust your impersonation settings on the application or modify the connection string.

When you are working in VS you are using an account which does have a local profile, so this problem does not exist. When however, you copy the application to the Intepub folder you are starting to run application in a different user context, thus the problem.

Describe your application in greater detail. Is it ASP.NET app? Does it use impersonation? Is the IIS server on the same machine where you develop the application? How does you connection string look like? How do you change it when you move the application?

You misunderstood my previous questions.

Account SQL Server running under is not the same thing as the account you use to connect to SQL Server. Apparently, you are running SQL Server as NETWORK SERVICE. Next, profile1 looks like a hardware profile, not a user profile, what you need to check is User profiles on Advanced Tab of System properties.

You may also want to look in the error log to understand what account it tries to create a user instance under.

Boris.

|||

Well, I was able to solve my problem as follows:
I checked my IIS Application pool that my domain uses, it appeare that I it was using an account that doesn't have a local user profile, so I changed the Application pool Identity to local system and it started working...
Thanks for everyone that has been trying to help...

|||

i did try to change "IIS Admin" Windows service to run as administrator, which has a local user profile, but it still didn't work in my case (running iis on xp professional, IIS version 5.0)

Sorry, i am new to IIS and SQl server 2005, can anyone give further help on this issue? I really want to make my app. run on IIS, it ran ok on VS 2005 though.

Thanks in advance!

|||

Dear mw2005,

Do you have service pack 2 installed on your windows XP? its a requirement for working with SQL Server 2005, to view all the requirements:

http://www.microsoft.com/sql/editions/express/sysreqs.mspx

|||

Hi, DennisCIS,

Yes, I have xp SP2 installed, I had to install it first before I can install VWD 2005. I may have missed something, it didn't work for me.

Regards,

mw2005

|||

Anyone made it work under IIS 5.x + XP SP2 environment? or do I have to upgrade to Windows 2003 Server env.?

One interesting thing is that I changed my application to use "Local impersonation", the error of "Failed to generate a user instance of SQL Server ... " is gone, but I got the other error instead as follows, I still didn't make it run on IIS 5.x + XP SP2 environment, I ran out of ideas now, if anyone could give a helping hand, it'd be very much appreciated.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:

Line 13: SiteMapNode temp;

Line 14: temp = SiteMap.CurrentNode.Clone(true);

Line 15: Uri u = new Uri(e.Context.Request.Url.ToString());

Line 16: temp.Url += u.Query;

Line 17: if (temp.ParentNode != null) {


Source File: c:\my_apps\test1\Global.asax Line: 15

|||Were you able to resolve this? I am running into the same problem. I am using the personal site starter kit for VS2005 Express running on PWS on XP sp2. Any assitance you can offer would be appreciated. Thanks. My email is: igaydos @. ptd dot net|||I had this problem with the Commerce Starter Kit, running XP SP2. I changed the connection strings for both the SQLExpress DBs by setting the User Instance=False (was true). This sorted it out for development... I'll probably get into trouble with deployment like earlier in this thread, but I'll cross that bridge when I get there.|||

I've had to add new line to my connection string in web.config file to fix the problem:

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

Then the IIS application pool I used an acount that has a local user profile (local system is an example) but this could make a security hole in your system.

Hope this was helpful

|||FYI: I get this error when the other computer on my home network (2 computers total) is turned on. It works fine when the other computer is turned off. This other computer is not used remotely (or in any way) with my SQL Server Express / VB 2005 Express application.

Failed to generate a user instance of SQL Server

Hi, I have visual basic team 2005 beta that come with sql server express,

and i am trying to connect to a database on my local computer.

And i get this message "Failed to generate a user instance of SQL Server

due to a failure instarting the process for the user instance. The connection will be closed". If u ever heard of the Northwind database it is the one i am trying to

use I don't know much about how to configure server, but i am running this on

Window XP Pro and i am using a a user account with administrator privilages.

I even tried to create a new database and i get the same message.

I get the same problem, not sure if anyone is monitoring this forum tho'|||If you are trying to attach the Northwind database it is most likely failing because the database is still attached to your main SQL Server process. You could either run sp_detach_db 'northwind' to detach the database from the main instance or copy the northwinf mdf and ldf files to another location to play with.|||I'm not trying to connect to any database - I simply created a site to test out the new web portal controls in beta 2. Navigating to a page in the site that uses Web Parts fails with this error - all other pages work fine (including a page with databound controls tied to a Sql Server instance on another machine.)
I understand that the issue is Sql Express is attempting to create a database in the App_Data directory, and that it cannot for security reasons.
I have given full rights for the directory to the Network Services, ASP.Net and IUSR accounts, but to no avail.
The error message indicates that it may be due to the Sql User permissions:
the logged-in user needs the dbcreator privilege in the appropriate SQL Server Express instance.
However there is no way (at least that I can find) to manage user security in SQL Express. I've installed the Express Manager (XM) but it doesn't have any security editing capabilities.
I cannot manage the instance using Enterprise Manager, and I cannot install SQL Server 2005 (believe me, I've tried) to use Sql Server Mansagement Studio.
I'm currently working on a review of the 2.0 Framework and I have a presentation to Management next week, so if anyone can shed some light on this it would be greatly appreciated.
Thanks,
Tyler|||Try changing Setting "User Instance=False" in your connection string and in the dialog.|||I was replying to the guy who was trying to attach Northwind and I assumed when you said you had the same problem you meant you were trying to attach a database also. If you are getting this error, you are trying to open a connection to a database with UserInstance = true and the database file specified in the connection string is in use. With an ASP page, the most common problem is that the IDE still has a connection to the database open and so it's user instance has the database file open with an exclusive lock. I don't know enough about the Web Portal controls to know what kind of databse access it is trying to do.|||No Worries Roger, I appreciate the help!
I'll give the userinstance setting a try and let you know what I find out...
Thanks!
Tyler|||Thanks Roger and Nutty -
Changing the setting to false was the trick! (it was set to true in Machine.config)
Appreciate your help!|||P.S. How do I mark a post as the ANSWER?|||the user instance must be set to false and make sure that your data source is .\SQLEXPRESS or (local)\SQLEXPRESS and not ComputerName\SQLEXPRESS.

SQL server 2005 express disables remote connections. see http://codebetter.com/blogs/sahil.malik/archive/2005/11/5.aspx

Failed to generate a user instance of SQL Server

Hello Everyone,
I have instaled SQLExpress September on my Windows Server 2003 Standard.
and I work on a windows XP SP2 for development using Visual studio Web Edition (Beta2) which comes with sql server 2005 too.
I've built my application and tested it on my computer and everything went fine.
But When I copied the application to the server, it showed 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.

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

I've read alot of threads but it doesn't seem that any of them deals with my problem.

This is because of a known problem in Windows. See http://support.microsoft.com/default.aspx?scid=kb;en-us;896613 for more details.

Thanks

|||Dear Sir,
Thanks for your reply, but I'm using Windows server 2003 Web Edition on my server.|||

While I might be suggesting the obvious, but have you checked what the error suggests?

What account SQL Server is running under? If it is a user account, does it have a user profile?

If you create an app that just connects to a SQL Server instance, does it work?

|||

Q:have you checked what the error suggests?
A:what I wrote in the first message was what I got as a suggestion
Q:What account SQL Server is running under?
A:I connect using the administrator account.
Q:does it have a user profile?
A:To be honest with you,
Second, SQL Server connects using "Network Service"
The error suggests checking the local user profile, I've checked it, it only shows profile1.
Q:If it is a user account, does it have a user profile?
A:Yes its a user account,about user profile it has one, but do I need to do any extra configs especially for SQL express?
Q:If you create an app that just connects to a SQL Server instance, does it work?
A:when I create one through VS2005 and start it from VS it works fine, but when I copy it to the inetpub location it shows the error. strange!

Boris Bon thanks for trying to help, I appreciate it... Smile but still no solution

|||

Dennis,

The reason for the error your are seeing is that the account under which you are trying to create a user instance of SQL Express does not have a local profile on the server. The error message suggests verifying this.

To fix this you either need to locally login using that account or adjust your impersonation settings on the application or modify the connection string.

When you are working in VS you are using an account which does have a local profile, so this problem does not exist. When however, you copy the application to the Intepub folder you are starting to run application in a different user context, thus the problem.

Describe your application in greater detail. Is it ASP.NET app? Does it use impersonation? Is the IIS server on the same machine where you develop the application? How does you connection string look like? How do you change it when you move the application?

You misunderstood my previous questions.

Account SQL Server running under is not the same thing as the account you use to connect to SQL Server. Apparently, you are running SQL Server as NETWORK SERVICE. Next, profile1 looks like a hardware profile, not a user profile, what you need to check is User profiles on Advanced Tab of System properties.

You may also want to look in the error log to understand what account it tries to create a user instance under.

Boris.

|||

Well, I was able to solve my problem as follows:
I checked my IIS Application pool that my domain uses, it appeare that I it was using an account that doesn't have a local user profile, so I changed the Application pool Identity to local system and it started working...
Thanks for everyone that has been trying to help...

|||

i did try to change "IIS Admin" Windows service to run as administrator, which has a local user profile, but it still didn't work in my case (running iis on xp professional, IIS version 5.0)

Sorry, i am new to IIS and SQl server 2005, can anyone give further help on this issue? I really want to make my app. run on IIS, it ran ok on VS 2005 though.

Thanks in advance!

|||

Dear mw2005,

Do you have service pack 2 installed on your windows XP? its a requirement for working with SQL Server 2005, to view all the requirements:

http://www.microsoft.com/sql/editions/express/sysreqs.mspx

|||

Hi, DennisCIS,

Yes, I have xp SP2 installed, I had to install it first before I can install VWD 2005. I may have missed something, it didn't work for me.

Regards,

mw2005

|||

Anyone made it work under IIS 5.x + XP SP2 environment? or do I have to upgrade to Windows 2003 Server env.?

One interesting thing is that I changed my application to use "Local impersonation", the error of "Failed to generate a user instance of SQL Server ... " is gone, but I got the other error instead as follows, I still didn't make it run on IIS 5.x + XP SP2 environment, I ran out of ideas now, if anyone could give a helping hand, it'd be very much appreciated.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:

Line 13: SiteMapNode temp; Line 14: temp = SiteMap.CurrentNode.Clone(true); Line 15: Uri u = new Uri(e.Context.Request.Url.ToString()); Line 16: temp.Url += u.Query; Line 17: if (temp.ParentNode != null) {

Source File: c:\my_apps\test1\Global.asax Line: 15

|||Were you able to resolve this? I am running into the same problem. I am using the personal site starter kit for VS2005 Express running on PWS on XP sp2. Any assitance you can offer would be appreciated. Thanks. My email is: igaydos @. ptd dot net|||I had this problem with the Commerce Starter Kit, running XP SP2. I changed the connection strings for both the SQLExpress DBs by setting the User Instance=False (was true). This sorted it out for development... I'll probably get into trouble with deployment like earlier in this thread, but I'll cross that bridge when I get there.|||

I've had to add new line to my connection string in web.config file to fix the problem:

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

Then the IIS application pool I used an acount that has a local user profile (local system is an example) but this could make a security hole in your system.

Hope this was helpful

|||FYI: I get this error when the other computer on my home network (2 computers total) is turned on. It works fine when the other computer is turned off. This other computer is not used remotely (or in any way) with my SQL Server Express / VB 2005 Express application.

Failed to generate a user instance of SQL Server

Hi, I have visual basic team 2005 beta that come with sql server express,

and i am trying to connect to a database on my local computer.

And i get this message "Failed to generate a user instance of SQL Server

due to a failure instarting the process for the user instance. The connection will be closed". If u ever heard of the Northwind database it is the one i am trying to

use I don't know much about how to configure server, but i am running this on

Window XP Pro and i am using a a user account with administrator privilages.

I even tried to create a new database and i get the same message.

I get the same problem, not sure if anyone is monitoring this forum tho'|||If you are trying to attach the Northwind database it is most likely failing because the database is still attached to your main SQL Server process. You could either run sp_detach_db 'northwind' to detach the database from the main instance or copy the northwinf mdf and ldf files to another location to play with.|||I'm not trying to connect to any database - I simply created a site to test out the new web portal controls in beta 2. Navigating to a page in the site that uses Web Parts fails with this error - all other pages work fine (including a page with databound controls tied to a Sql Server instance on another machine.)
I understand that the issue is Sql Express is attempting to create a database in the App_Data directory, and that it cannot for security reasons.
I have given full rights for the directory to the Network Services, ASP.Net and IUSR accounts, but to no avail.
The error message indicates that it may be due to the Sql User permissions:
the logged-in user needs the dbcreator privilege in the appropriate SQL Server Express instance.
However there is no way (at least that I can find) to manage user security in SQL Express. I've installed the Express Manager (XM) but it doesn't have any security editing capabilities.
I cannot manage the instance using Enterprise Manager, and I cannot install SQL Server 2005 (believe me, I've tried) to use Sql Server Mansagement Studio.
I'm currently working on a review of the 2.0 Framework and I have a presentation to Management next week, so if anyone can shed some light on this it would be greatly appreciated.
Thanks,
Tyler|||Try changing Setting "User Instance=False" in your connection string and in the dialog.|||I was replying to the guy who was trying to attach Northwind and I assumed when you said you had the same problem you meant you were trying to attach a database also. If you are getting this error, you are trying to open a connection to a database with UserInstance = true and the database file specified in the connection string is in use. With an ASP page, the most common problem is that the IDE still has a connection to the database open and so it's user instance has the database file open with an exclusive lock. I don't know enough about the Web Portal controls to know what kind of databse access it is trying to do.|||No Worries Roger, I appreciate the help!
I'll give the userinstance setting a try and let you know what I find out...
Thanks!
Tyler|||Thanks Roger and Nutty -
Changing the setting to false was the trick! (it was set to true in Machine.config)
Appreciate your help!|||P.S. How do I mark a post as the ANSWER?|||the user instance must be set to false and make sure that your data source is .\SQLEXPRESS or (local)\SQLEXPRESS and not ComputerName\SQLEXPRESS.

SQL server 2005 express disables remote connections. see http://codebetter.com/blogs/sahil.malik/archive/2005/11/5.aspx

Failed to generate a user instance of SQL Server

Hello Everyone,
I have instaled SQLExpress September on my Windows Server 2003 Standard.
and I work on a windows XP SP2 for development using Visual studio Web Edition (Beta2) which comes with sql server 2005 too.
I've built my application and tested it on my computer and everything went fine.
But When I copied the application to the server, it showed 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.

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

I've read alot of threads but it doesn't seem that any of them deals with my problem.

This is because of a known problem in Windows. See http://support.microsoft.com/default.aspx?scid=kb;en-us;896613 for more details.

Thanks

|||Dear Sir,
Thanks for your reply, but I'm using Windows server 2003 Web Edition on my server.|||

While I might be suggesting the obvious, but have you checked what the error suggests?

What account SQL Server is running under? If it is a user account, does it have a user profile?

If you create an app that just connects to a SQL Server instance, does it work?

|||

Q:have you checked what the error suggests?
A:what I wrote in the first message was what I got as a suggestion
Q:What account SQL Server is running under?
A:I connect using the administrator account.
Q:does it have a user profile?
A:To be honest with you,
Second, SQL Server connects using "Network Service"
The error suggests checking the local user profile, I've checked it, it only shows profile1.
Q:If it is a user account, does it have a user profile?
A:Yes its a user account,about user profile it has one, but do I need to do any extra configs especially for SQL express?
Q:If you create an app that just connects to a SQL Server instance, does it work?
A:when I create one through VS2005 and start it from VS it works fine, but when I copy it to the inetpub location it shows the error. strange!

Boris Bon thanks for trying to help, I appreciate it... Smile but still no solution

|||

Dennis,

The reason for the error your are seeing is that the account under which you are trying to create a user instance of SQL Express does not have a local profile on the server. The error message suggests verifying this.

To fix this you either need to locally login using that account or adjust your impersonation settings on the application or modify the connection string.

When you are working in VS you are using an account which does have a local profile, so this problem does not exist. When however, you copy the application to the Intepub folder you are starting to run application in a different user context, thus the problem.

Describe your application in greater detail. Is it ASP.NET app? Does it use impersonation? Is the IIS server on the same machine where you develop the application? How does you connection string look like? How do you change it when you move the application?

You misunderstood my previous questions.

Account SQL Server running under is not the same thing as the account you use to connect to SQL Server. Apparently, you are running SQL Server as NETWORK SERVICE. Next, profile1 looks like a hardware profile, not a user profile, what you need to check is User profiles on Advanced Tab of System properties.

You may also want to look in the error log to understand what account it tries to create a user instance under.

Boris.

|||

Well, I was able to solve my problem as follows:
I checked my IIS Application pool that my domain uses, it appeare that I it was using an account that doesn't have a local user profile, so I changed the Application pool Identity to local system and it started working...
Thanks for everyone that has been trying to help...

|||

i did try to change "IIS Admin" Windows service to run as administrator, which has a local user profile, but it still didn't work in my case (running iis on xp professional, IIS version 5.0)

Sorry, i am new to IIS and SQl server 2005, can anyone give further help on this issue? I really want to make my app. run on IIS, it ran ok on VS 2005 though.

Thanks in advance!

|||

Dear mw2005,

Do you have service pack 2 installed on your windows XP? its a requirement for working with SQL Server 2005, to view all the requirements:

http://www.microsoft.com/sql/editions/express/sysreqs.mspx

|||

Hi, DennisCIS,

Yes, I have xp SP2 installed, I had to install it first before I can install VWD 2005. I may have missed something, it didn't work for me.

Regards,

mw2005

|||

Anyone made it work under IIS 5.x + XP SP2 environment? or do I have to upgrade to Windows 2003 Server env.?

One interesting thing is that I changed my application to use "Local impersonation", the error of "Failed to generate a user instance of SQL Server ... " is gone, but I got the other error instead as follows, I still didn't make it run on IIS 5.x + XP SP2 environment, I ran out of ideas now, if anyone could give a helping hand, it'd be very much appreciated.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:

Line 13: SiteMapNode temp; Line 14: temp = SiteMap.CurrentNode.Clone(true); Line 15: Uri u = new Uri(e.Context.Request.Url.ToString()); Line 16: temp.Url += u.Query; Line 17: if (temp.ParentNode != null) {

Source File: c:\my_apps\test1\Global.asax Line: 15

|||Were you able to resolve this? I am running into the same problem. I am using the personal site starter kit for VS2005 Express running on PWS on XP sp2. Any assitance you can offer would be appreciated. Thanks. My email is: igaydos @. ptd dot net|||I had this problem with the Commerce Starter Kit, running XP SP2. I changed the connection strings for both the SQLExpress DBs by setting the User Instance=False (was true). This sorted it out for development... I'll probably get into trouble with deployment like earlier in this thread, but I'll cross that bridge when I get there.|||

I've had to add new line to my connection string in web.config file to fix the problem:

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

Then the IIS application pool I used an acount that has a local user profile (local system is an example) but this could make a security hole in your system.

Hope this was helpful

|||FYI: I get this error when the other computer on my home network (2 computers total) is turned on. It works fine when the other computer is turned off. This other computer is not used remotely (or in any way) with my SQL Server Express / VB 2005 Express application.sql

Monday, March 19, 2012

Failed login MyMachine\ASPNET

I just wanted to write a simple WebService to return a dataset.
But when I am trying to debug it under Visual Studio, I get an exception
when calling conn.Open( ). The error message is "Failed to login user
myMachine\ASPNET". What is ASPNET? Why does Visual Studio invent that
account, if it fails to connect to my local MSDE? What can I do about it?
Please, I am not an administrator, so I need every detail.Make sure that you have a right Login as well as check if you have Windows
Authentication only. Change it to Mixed Authentication
"N Thorell" <NThorell@.discussions.microsoft.com> wrote in message
news:06CD83E4-9F83-4BE2-A695-652A7C4A7DF9@.microsoft.com...
> I just wanted to write a simple WebService to return a dataset.
> But when I am trying to debug it under Visual Studio, I get an exception
> when calling conn.Open( ). The error message is "Failed to login user
> myMachine\ASPNET". What is ASPNET? Why does Visual Studio invent
that
> account, if it fails to connect to my local MSDE? What can I do about
it?
> Please, I am not an administrator, so I need every detail.|||The local ASPNET Windows account is created automatically when you install
ASP.NET. This account is used by default as the security context for
ASP.NET applications.
You can either grant ASPNET access to SQL Server or reconfigure ASP.NET to
use a different account. See
http://support.microsoft.com/defaul...kb;en-us;316989 for details
on how to do this.
Hope this helps.
Dan Guzman
SQL Server MVP
"N Thorell" <NThorell@.discussions.microsoft.com> wrote in message
news:06CD83E4-9F83-4BE2-A695-652A7C4A7DF9@.microsoft.com...
>I just wanted to write a simple WebService to return a dataset.
> But when I am trying to debug it under Visual Studio, I get an exception
> when calling conn.Open( ). The error message is "Failed to login user
> myMachine\ASPNET". What is ASPNET? Why does Visual Studio invent
> that
> account, if it fails to connect to my local MSDE? What can I do about
> it?
> Please, I am not an administrator, so I need every detail.

Sunday, February 26, 2012

Face problem into Report "ReportViewControl"

We have created report into Sql server 2005 and viewing this from
â'Reportviewcontrolâ' of Visual studio 2005. Now problem is some time report
first page displays only Report header and all data on Second page. Some time
its display report header and report details on same page.
Any one know how to solve this problem
Please help me out from this problem
I have made lots of R&D for it and finally come on conclusion that it is a
bug of control because of following reason
If report page has capacity of 25 records to display then first it tries to
display on single page. Now if we add one record then its display into
another page
In first case when record is too less then its display all record and report
header on same page
In second case if we have more record which can not display together with
Report header on same page then it will display report header only on first
page and report detail row on second page(as its try to fit all record on
single page)
In third case when we have more records which can not fit on single page
then it start to display record from first page (this time it is not possible
to it to fit all record on same page)Sounds alot like you've got the KeepTogether option checked?
Richard
"ecnindia@.newsgroups.nospam"
<ecnindianewsgroupsnospam@.discussions.microsoft.com> wrote in message
news:ED96230E-D761-41DD-9B46-C27C1C2BC883@.microsoft.com...
> We have created report into Sql server 2005 and viewing this from
> "Reportviewcontrol" of Visual studio 2005. Now problem is some time report
> first page displays only Report header and all data on Second page. Some
> time
> its display report header and report details on same page.
> Any one know how to solve this problem
> Please help me out from this problem
> I have made lots of R&D for it and finally come on conclusion that it is a
> bug of control because of following reason
> If report page has capacity of 25 records to display then first it tries
> to
> display on single page. Now if we add one record then its display into
> another page
> In first case when record is too less then its display all record and
> report
> header on same page
> In second case if we have more record which can not display together with
> Report header on same page then it will display report header only on
> first
> page and report detail row on second page(as its try to fit all record on
> single page)
> In third case when we have more records which can not fit on single page
> then it start to display record from first page (this time it is not
> possible
> to it to fit all record on same page)
>|||Thanks Richard
But i have not checked any option like "KeepTogether" or "fit in
one page".
"Richard Coltrane" wrote:
> Sounds alot like you've got the KeepTogether option checked?
> Richard
> "ecnindia@.newsgroups.nospam"
> <ecnindianewsgroupsnospam@.discussions.microsoft.com> wrote in message
> news:ED96230E-D761-41DD-9B46-C27C1C2BC883@.microsoft.com...
> > We have created report into Sql server 2005 and viewing this from
> > "Reportviewcontrol" of Visual studio 2005. Now problem is some time report
> > first page displays only Report header and all data on Second page. Some
> > time
> > its display report header and report details on same page.
> >
> > Any one know how to solve this problem
> > Please help me out from this problem
> >
> > I have made lots of R&D for it and finally come on conclusion that it is a
> > bug of control because of following reason
> >
> > If report page has capacity of 25 records to display then first it tries
> > to
> > display on single page. Now if we add one record then its display into
> > another page
> >
> > In first case when record is too less then its display all record and
> > report
> > header on same page
> >
> > In second case if we have more record which can not display together with
> > Report header on same page then it will display report header only on
> > first
> > page and report detail row on second page(as its try to fit all record on
> > single page)
> >
> > In third case when we have more records which can not fit on single page
> > then it start to display record from first page (this time it is not
> > possible
> > to it to fit all record on same page)
> >
>
>