Quest: Error connecting to MSDE hosted DB...

L

lewi

I am trying to connect to MSDE hosted DB on the same computer as my ASP.NET
app. The DB was created using VS.NET Server Explorer window and here is my
aspx.cs code in the Page_Load() for the main page...

Note: using "using System.Data.SqlClient;"

try
{
SqlConnection dataConnection = new SqlConnection();
dataConnection.ConnectionString = "Integrated Security=true;Initial
Catalog=mydb;
Data
Source=MYSYS\\VSDOTNET;";
dataConnection.Open();
...
dataConnection.Close();
}
catch(Exception SQLException)
{
Console.WriteLine("An Database error occurred - " + SQLException.Message
+ "...");
}

Now when I call(a breakpoint set in the catch block) SqlConnection::Open() I
get - SQLException.Message == "Login failed for user 'MYSYS\ASPNET'" in the
varibles window...

Now I have tried adding ASPNET and SQLDebuggers account to the site
folder(site is outside of wwwroot) and to the IIS operator acoount tab of
the site properties box and there is no change...

What am I doing wrong here and why is it thinking I am user MYSYS\ASPNET...

Any help...
 
L

lewi

What am I doing wrong here and why is it thinking I am user
MYSYS\ASPNET...
I looked around and found that ASPNET user was only part of the Users group
and so I threw ASPNET into some more group since security isn't an issue and
my ASP.NET app finally connected...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top