473,503 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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:

<connectionStrings>
<add name="MyTestDb" connectionString="Data Source=.
\SQLExpress;Integrated
DataDirectory|MyData.mdf;User Instance=true;"
providerName="System.Data.SqlClient" />
</connectionStrings>

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
Jan 12 '08 #1
2 2374
Hello egress,

See there http://forums.microsoft.com/MSDN/Sho...52338&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
eI've created an SQL Server Express database with one table that I use
ein my test envionement (Windows Vista). I'm developing an ASP.NET
eweb app with VS 2005 and try to connect to the express server to
eretrieve some simple data (no not Membership data). My connection
estring is:
e>
e<connectionStrings>
e<add name="MyTestDb" connectionString="Data Source=.
e\SQLExpress;Integrated
eDataDirectory|MyData.mdf;User Instance=true;"
eproviderName="System.Data.SqlClient" />
e</connectionStrings>
e>
eWhen I run the app, I get this error:
e"Failed to generate a user instance of SQL Server due to failure in
eretrieving the user's local application data path. Please make sure
ethe user has a local user profile on the computer. The connection
ewill
ebe closed."
eI've given "NETWORK SERVICE" every permission under the sun to the
eApp_Data folder, so I don't think that is the problem.
e>
eCan anyone help me on this one. I'm thinking this is some weird user
epermission thing that happens with Vista. However, I have UAC
edisabled and run VS2005 as Admin.
e>
eAlso, the weird thing is that VS2005 will setup the ASPNEDDB.mdf and
eI can use it for Membership data with no problem, but I can't seem to
esetup my own db to use.
e>
eThanks in advance for your help.
ejim
Jan 12 '08 #2
On Jan 12, 7:34*am, Michael Nemtsev [MVP] <nemt...@msn.comwrote:
Hello egress,

See therehttp://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
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
Jan 12 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1885
by: Chris Love | last post by:
I have already asked this, but no one seems to know the answer. Here is the timeline. I wanted to use the membership/roles functionality in a site. I got all sorts of errors trying to get this...
5
1853
by: Nate | last post by:
I need to ask this question again because I am simply not getting it... Can somebody please tell us what we need to do and explain the solution? Please see the problem below. Situation: Using...
2
8994
by: hfk0 | last post by:
Hello, I'm a newbie here and was wondering anyone could help me with this. I have a simple ASP.NET 2 web application running perfectly fine with IIS and SQLServerExpress installed locally on...
2
1734
by: shapper | last post by:
Hello, I added some profile properties to my web.config file. Then I started to use my profile properties in a page class and I get an error: An error has occurred while establishing a...
2
4106
by: Patrick F | last post by:
Hi, i have SQL Server 2005 and a database set that is called, myCompany the problem is that i cant connect from my page to it, here is from the web.config: ( i have got this connectionstring from...
9
5742
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
0
1091
by: sangkatte | last post by:
While running asp website designed with webparts, I got the following error. Please tell me how to solve this problem. An error has occurred while establishing a connection to the server. When...
2
1358
jhardman
by: jhardman | last post by:
I keep getting connection errors that appear to me to relate to user permissions. I tried connecting with DSN from both a classic ASP page using VBScript, and from a .NET web service using C#,...
1
2505
by: john20 | last post by:
Hi All, I am trying to use webpart in my page for that i am putting webpartmanager and webpartzone. but as soon as i am putting webpartmanger in the page it is giving me below error, let me...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7291
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.