1. Change the way SQL Server Express 2005 authenticates from "Windows"
to "Mixed Authentication" , if you want to use SQL Server logins.
2. Get rid of Integrated Security=True; :
Instead of :
<add value="Data Source=.\SQLEXP RESS;Initial Catalog=DB1;Int egrated
Security=True;u ser id=user1;passwo rd=user1;" key="conn"/>
....use :
<add value="Data Source=.\SQLEXP RESS;Initial Catalog=DB1;use r id=user1;passwo rd=user1;" key="conn"/>
The same for your other connection string.
If you use Integrated Security, you don't need to use a specific user.
You could, also, get rid of "user id=user1;passwo rd=user1;",
make sure SQL Express is using Windows authentication,
and create a SQL login for JUSTATHOME\ASPN ET.
Your choice, depending on how you want to handle this.
If you haven't downloaded SQL Management Studio Express, install it :
http://www.microsoft.com/downloads/d...displaylang=en
It makes managing SQL Server Express 2055 a whole lot easier.
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
=============== =============== ========
"pelegk1" <pe*****@discus sions.microsoft .comwrote in message
news:0A******** *************** ***********@mic rosoft.com...
>i am trying to conenct oto sql server 2005
when i do it i the VS2005 every is ok
but when i run from the browser i get :
The login failed. Login failed for user 'JUSTATHOME\ASP NET'.
i read this :
http://support.microsoft.com/kb/316989
and i wanted the first option to use my own user name and password i did :
<appSettings>
<add value="Data Source=.\SQLEXP RESS;Initial Catalog=DB1;Int egrated
Security=True;u ser id=user1;passwo rd=user1;" key="conn"/>
</appSettings>
and tried to use
<connectionStri ngs>
<add name="localCon" connectionStrin g="Data Source=.\SQLEXP RESS;Integrated
Security=True;u id=user1;pwd=us er1;database=DB 1"
providerName="S ystem.Data.SqlC lient" />
and i still get the error message on the ASPNET user
what can i do withought changing the sql the ASPNET user permissions
thnaks i nadvance
peleg
<add name="BoCon" connectionStrin g="Data Source=localhos t;Integrated
Security=True"
providerName="S ystem.Data.SqlC lient" />
</connectionStrin gs>