473,624 Members | 2,612 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\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>
Jul 7 '07 #1
2 1291
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>

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=.\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>


Jul 8 '07 #3

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

Similar topics

11
2550
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 full-blown sql server. Is this (will this be) still true with ado.net 2.0 & sql server 2005?
1
1154
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 upload the data to our sql server 2.Export the data from the clint pc in XML format and then Enter it in our computer. 3.Have all clienst ftp the data in a dirctory and then upload the xml files from the directory?
1
986
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
3283
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 append_from_Access(self): try: import ... conn = win32com.client.Dispatch(r'ADODB.Connection') DSN = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
2
4417
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
1794
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
1124
by: nidhijani | last post by:
Hey giv me some idea abt connection of an aspx form wth SQL Server2005 in .net 2005
10
2623
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 two bound fields works fine
0
1071
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 will also be in vb... what i need to do pls explain....
0
8246
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1489
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.