Thursday, March 22, 2012

ASP and MSDE Connection Problems

Hello
I have a simple MSDE database set up on this local machine. I have a small
asp.net web page that tries to query the database and returns a list from
one of the columns. Nothing fancy, just trying to set it all up and get it
all working.
I get an error on the page when I run it.
Exception Details: System.Data.SqlClient.SqlException: Login failed for
user 'BBAISLEY\ASPNET'.
I assume this means that the user account isn't set up right, but I am not
telling it to use this account. I have the following connection string:
Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
trusted_connection=true; database='music_cds'; user id=SQL;
password=xxxxxxxxxx;"
Can someone help me get this working? I would like to make a simple account
for all of my apps to use, don't really care what its called for now.
When I log in, I can only use the windows authencation method, so maybe my
MSDE instance isn't set for SQL passwords? How can I check this?
Thanks
Brett
You are using ASP.NET?
This is a common error as the applications default to using the ASPNET
account.
You have two choices:
1. Give access to the ASPNET account. (I dont think you want to do this
though).
2. Modify the AUTHENTICATION heading in the web.config file, & also the
virtual directory/site/directory property to only allow windows
authenticated users into the folder:
Under the AUTHENTICATION heading add:
<identity impersonate="true" />
Modify IIS to only allow windows authenticated users through...
Cheers,
James Goodman
"Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
> Hello
> I have a simple MSDE database set up on this local machine. I have a small
> asp.net web page that tries to query the database and returns a list from
> one of the columns. Nothing fancy, just trying to set it all up and get it
> all working.
> I get an error on the page when I run it.
> Exception Details: System.Data.SqlClient.SqlException: Login failed for
> user 'BBAISLEY\ASPNET'.
> I assume this means that the user account isn't set up right, but I am not
> telling it to use this account. I have the following connection string:
> Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
> trusted_connection=true; database='music_cds'; user id=SQL;
> password=xxxxxxxxxx;"
> Can someone help me get this working? I would like to make a simple
account
> for all of my apps to use, don't really care what its called for now.
> When I log in, I can only use the windows authencation method, so maybe my
> MSDE instance isn't set for SQL passwords? How can I check this?
> Thanks
> Brett
>
|||Whoops, I misread!
It looks like you do want to use the first suggestion I made.
By default, msde is only setup for Windows Authentication, rather than sql
authentication.
See this link for information on how to modify this:
http://support.microsoft.com/default...en-us%3B319930
http://support.microsoft.com/default...n-us%3BQ322336
Cheers,
James Goodman
"Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
> Hello
> I have a simple MSDE database set up on this local machine. I have a small
> asp.net web page that tries to query the database and returns a list from
> one of the columns. Nothing fancy, just trying to set it all up and get it
> all working.
> I get an error on the page when I run it.
> Exception Details: System.Data.SqlClient.SqlException: Login failed for
> user 'BBAISLEY\ASPNET'.
> I assume this means that the user account isn't set up right, but I am not
> telling it to use this account. I have the following connection string:
> Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
> trusted_connection=true; database='music_cds'; user id=SQL;
> password=xxxxxxxxxx;"
> Can someone help me get this working? I would like to make a simple
account
> for all of my apps to use, don't really care what its called for now.
> When I log in, I can only use the windows authencation method, so maybe my
> MSDE instance isn't set for SQL passwords? How can I check this?
> Thanks
> Brett
>
|||Ahh, that fixed it up. Thanks James
"James" <jamesATnorton-associates.co.ukREMOVE> wrote in message
news:e6GypgfLEHA.1644@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Whoops, I misread!
> It looks like you do want to use the first suggestion I made.
> By default, msde is only setup for Windows Authentication, rather than sql
> authentication.
> See this link for information on how to modify this:
> http://support.microsoft.com/default...en-us%3B319930
> http://support.microsoft.com/default...n-us%3BQ322336
>
> --
> Cheers,
> James Goodman
> "Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
> news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
small[vbcol=seagreen]
from[vbcol=seagreen]
it[vbcol=seagreen]
not[vbcol=seagreen]
> account
my
>

No comments:

Post a Comment