473,378 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

asp.net and conecting to sql server2005

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\ASPNET'.
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=.\SQLEXPRESS;Initial Catalog=DB1;Integrated
Security=True;user id=user1;password=user1;" key="conn"/>
</appSettings>
and tried to use
<connectionStrings>
<add name="localCon" connectionString="Data Source=.\SQLEXPRESS;Integrated
Security=True;uid=user1;pwd=user1;database=DB1"
providerName="System.Data.SqlClient" />

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" connectionString="Data Source=localhost;Integrated
Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
Jul 7 '07 #1
2 1280
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=.\SQLEXPRESS;Initial Catalog=DB1;Integrated
Security=True;user id=user1;password=user1;" key="conn"/>

....use :
<add value="Data Source=.\SQLEXPRESS;Initial Catalog=DB1;user id=user1;password=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;password=user1;",
make sure SQL Express is using Windows authentication,
and create a SQL login for JUSTATHOME\ASPNET.

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*****@discussions.microsoft.comwrote in message
news:0A**********************************@microsof t.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\ASPNET'.
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=.\SQLEXPRESS;Initial Catalog=DB1;Integrated
Security=True;user id=user1;password=user1;" key="conn"/>
</appSettings>
and tried to use
<connectionStrings>
<add name="localCon" connectionString="Data Source=.\SQLEXPRESS;Integrated
Security=True;uid=user1;pwd=user1;database=DB1"
providerName="System.Data.SqlClient" />

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" connectionString="Data Source=localhost;Integrated
Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>

Jul 7 '07 #2
Thanksalot
i wil ltest it
peleg

"Juan T. Llibre" wrote:
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=.\SQLEXPRESS;Initial Catalog=DB1;Integrated
Security=True;user id=user1;password=user1;" key="conn"/>

....use :
<add value="Data Source=.\SQLEXPRESS;Initial Catalog=DB1;user id=user1;password=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;password=user1;",
make sure SQL Express is using Windows authentication,
and create a SQL login for JUSTATHOME\ASPNET.

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*****@discussions.microsoft.comwrote in message
news:0A**********************************@microsof t.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\ASPNET'.
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=.\SQLEXPRESS;Initial Catalog=DB1;Integrated
Security=True;user id=user1;password=user1;" key="conn"/>
</appSettings>
and tried to use
<connectionStrings>
<add name="localCon" connectionString="Data Source=.\SQLEXPRESS;Integrated
Security=True;uid=user1;pwd=user1;database=DB1"
providerName="System.Data.SqlClient" />

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" connectionString="Data Source=localhost;Integrated
Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>


Jul 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Manuel Lopez | last post by:
From what I've read in the docs, ado.net currently supports opening sql server ce tables in table-direct mode and performing Seek operations on them (using SqlCeDataReader), but not on the...
1
by: AG | last post by:
I want to connect over the internet to get data from clients.What would be the easiest method and the most stable methos to do it 1.Use a Point to Point prtotcol from the client pc and then...
1
by: ashi | last post by:
Is SQL Server 2005 bound with VS.NET 2005? Or is it like yukon can be used with VS.Net 2003 also? Also, does VS.NET 2003 mean .NET 1.1 and VS.NET 2005 mean .NET 2.0?
8
by: luis | last post by:
Hi I'm using activestate python 2.4 on win xp 2 ed. and Ms Access 2002 (reading first http://starship.python.net/crew/bwilk/access.html) I have writed the following code def...
2
by: amjad | last post by:
Hi when i try below code public DataSet GetData(string ConString) { OracleDataAdapter da; DataSet ds = new DataSet(); // Setup connection string to access Oracle 9i
1
by: ram achar | last post by:
please send me C# code for inserting values into database sql server2005 *** Sent via Developersdex http://www.developersdex.com ***
2
by: nidhijani | last post by:
Hey giv me some idea abt connection of an aspx form wth SQL Server2005 in .net 2005
10
by: Roger | last post by:
ms-access97 & sql server2005 two tables tblItem tblItemFeature form frmItem contains subform frmItemFeature each form is based on their respective table creating new record and filling in...
0
by: laurence | last post by:
hi, i am new in vb. i am not finding the way to connect ms access database to visual basic. what i need is i need to take data from msaccess and calculation will be done in vb and the result page...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.