Problem connecting to SQL Server Express in ASP.NET app running on

Problem connecting to SQL Server Express in ASP.NET app running on

am 12.01.2008 13:41:24 von egress

I've created an SQL Server Express database with one table that I use
in my test envionement (Windows Vista). I'm developing an ASP.NET web
app with VS 2005 and try to connect to the express server to retrieve
some simple data (no not Membership data). My connection string is:


providerName="System.Data.SqlClient" />


When I run the app, I get this 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've given "NETWORK SERVICE" every permission under the sun to the
App_Data folder, so I don't think that is the problem.

Can anyone help me on this one. I'm thinking this is some weird user
permission thing that happens with Vista. However, I have UAC
disabled and run VS2005 as Admin.

Also, the weird thing is that VS2005 will setup the ASPNEDDB.mdf and I
can use it for Membership data with no problem, but I can't seem to
setup my own db to use.

Thanks in advance for your help.
jim

Re: Problem connecting to SQL Server Express in ASP.NET app running on Vista

am 12.01.2008 14:34:42 von nemtsev

Hello egress,

See there http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=152338 &SiteID=1

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


e> I've created an SQL Server Express database with one table that I use
e> in my test envionement (Windows Vista). I'm developing an ASP.NET
e> web app with VS 2005 and try to connect to the express server to
e> retrieve some simple data (no not Membership data). My connection
e> string is:
e>
e>
e> e> providerName="System.Data.SqlClient" />
e>

e>
e> When I run the app, I get this error:
e> "Failed to generate a user instance of SQL Server due to failure in
e> retrieving the user's local application data path. Please make sure
e> the user has a local user profile on the computer. The connection
e> will
e> be closed."
e> I've given "NETWORK SERVICE" every permission under the sun to the
e> App_Data folder, so I don't think that is the problem.
e>
e> Can anyone help me on this one. I'm thinking this is some weird user
e> permission thing that happens with Vista. However, I have UAC
e> disabled and run VS2005 as Admin.
e>
e> Also, the weird thing is that VS2005 will setup the ASPNEDDB.mdf and
e> I can use it for Membership data with no problem, but I can't seem to
e> setup my own db to use.
e>
e> Thanks in advance for your help.
e> jim

Re: Problem connecting to SQL Server Express in ASP.NET app running

am 12.01.2008 21:48:40 von egress

On Jan 12, 7:34=A0am, Michael Nemtsev [MVP] wrote:
> Hello egress,
>
> See therehttp://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3 D152338&Si=
teID=3D1
>
> ---
> WBR,
> Michael =A0Nemtsev [.NET/C# MVP] :: blog:http://spaces.live.com/laflour
>
> "The greatest danger for most of us is not that our aim is too high and we=

> miss it, but that it is too low and we reach it" (c) Michelangelo
>

Thanks for the tip Michael. That thread led me in the right
direction. It was actually something as simple as having
impersonation enabled. I disabled it and presto. No problems.
Thanks again.

egress