Problems when trying to build Connection to SQL Server Express from ASP.NET application

Giganews Newsgroups
Subject: Problems when trying to build Connection to SQL Server Express from ASP.NET application
Posted by:  kito (juri.strumpflohn…@gmail.com)
Date: 2 Aug 2006

Hi,
I have a problem, when I want to access to my SQL Server Express
database from my ASP.NET application.
My workstation ID is KITOLAP-HP
My username is user01

Now I built the following connection String (VB.NET):
Dim workstation As String =
System.Environment.GetEnvironmentVariable("computername")
connectionString = "workstation id=""" & workstation & """;packet
size=4096;user id=user01;integrated security=SSPI;data source=""" &
workstation & "\SQLExpress"";persist security info=True;initial
catalog=webshop"
connection = New SqlConnection(connectionString)

Although I put as user id "user01" the application makes an error when
I try to open the connection, saying that the login with user "aspnet"
failed.

How can I change it so that as login-user "user01" is taken and not
"aspnet" or otherwise, how can I create a new user in the SQL Server
database with which I could access the DB??

thanks,
kito

Replies