SqlConnection problem. How config user name and password?

  • Thread starter Thread starter Steve Richter
  • Start date Start date
S

Steve Richter

( if this is the wrong list, please tell me which is best! )

I have the sql server freeby on my w2k system. The MSDE edition, just
downloaded from MS.

I am using WebMatrix, another freeby from MS, to use to learn asp.net
programming.

The following SqlConnection string is working for me when WebMatrix is
the web server:
myConnection = New SqlConnection(
"Server='abit64';trusted_conne­ction=true; database='WebMatrix'" )

But when I browse to the web page via local host, using the IIS server
on my PC,
http://localhost/viewGuestBook­Grid.aspx
I get an SQL server login error:
Login failed for user 'ABIT64\ASPNET'.

I dont understand that error. So I figure I will add a specific user
to the SqlServer database and connect as that user.
myConnection = New SqlConnection(
"Server='abit64'; uid=steve; pwd='abc'; database='WebMatrix'" )

So that is the question. How do I add a user to sql server?

In web matrix, when I click the "connect to database" button, and I
select "Sql Server Authentication" I am prompted for user name and
password. My administrator password fails there. Where do I config
hte SqlServer user name and password?

thanks a lot,

-Steve
 
I am no expert on WebMatrix, but can you select windows authentication
instead of sql server?
I think that MSDE is installed by default with windows auth only (you have
to manually specify switches to use both win and sql authentication).

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info

( if this is the wrong list, please tell me which is best! )

I have the sql server freeby on my w2k system. The MSDE edition, just
downloaded from MS.

I am using WebMatrix, another freeby from MS, to use to learn asp.net
programming.

The following SqlConnection string is working for me when WebMatrix is
the web server:
myConnection = New SqlConnection(
"Server='abit64';trusted_conne­ction=true; database='WebMatrix'" )

But when I browse to the web page via local host, using the IIS server
on my PC,
http://localhost/viewGuestBook­Grid.aspx
I get an SQL server login error:
Login failed for user 'ABIT64\ASPNET'.

I dont understand that error. So I figure I will add a specific user
to the SqlServer database and connect as that user.
myConnection = New SqlConnection(
"Server='abit64'; uid=steve; pwd='abc'; database='WebMatrix'" )

So that is the question. How do I add a user to sql server?

In web matrix, when I click the "connect to database" button, and I
select "Sql Server Authentication" I am prompted for user name and
password. My administrator password fails there. Where do I config
hte SqlServer user name and password?

thanks a lot,

-Steve
 
Miha said:
I am no expert on WebMatrix, but can you select windows authentication
instead of sql server?
I think that MSDE is installed by default with windows auth only (you have
to manually specify switches to use both win and sql authentication).

Windows authentication is working for me within WebMatrix. But I get
the login failed error when I navigate to my .aspx page using the IIS
server. ( WebMatrix runs its own IIS server on the PC. )

The following SqlConnection string is working for me when WebMatrix is
the web server:
myConnection = New SqlConnection(
"Server='abit64';trusted_conne­ction=true; database='WebMatrix'" )

But when I browse to the web page via local host, using the IIS server
on my PC,
http://localhost/viewGuestBook­Grid.aspx
I get an SQL server login error:
Login failed for user 'ABIT64\ASPNET'.

thanks,

Steve Richter
 
Add aspnet account to sql servers accounts?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info

I am no expert on WebMatrix, but can you select windows authentication
instead of sql server?
I think that MSDE is installed by default with windows auth only (you have
to manually specify switches to use both win and sql authentication).

Windows authentication is working for me within WebMatrix. But I get
the login failed error when I navigate to my .aspx page using the IIS
server. ( WebMatrix runs its own IIS server on the PC. )

The following SqlConnection string is working for me when WebMatrix is
the web server:
myConnection = New SqlConnection(
"Server='abit64';trusted_conne­ction=true; database='WebMatrix'" )

But when I browse to the web page via local host, using the IIS server
on my PC,
http://localhost/viewGuestBook­Grid.aspx
I get an SQL server login error:
Login failed for user 'ABIT64\ASPNET'.

thanks,

Steve Richter
 
Back
Top