Why can't I connect to my SQL database using ASP.NET
(VB.NET) and ADO.NET?
I get the following error:
System.Data.SqlClient.SqlException: Login failed for
user 'DEJO\ASPNET'. at
System.Data.SqlClient.ConnectionPool.GetConnection
(Boolean& isInTransaction) at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledCon
nection(SqlConnectionString options, Boolean&
isInTransaction) at
System.Data.SqlClient.SqlConnection.Open() at
MyWebSite.WebForm2.Page_Load(Object sender,
EventArgs e) in C:\Documents and
Settings\Dejan\VSWebCache\DEJO\MyWebSite\WebForm2. aspx.vb:l
ine 29
My connection is:
Imports System.Data.SqlClient
--
Const DBString As String = "Integrated
Security=SSPI;Initial Catalog=Northwind;Data Source=
(local)"
Dim cnn As New SqlConnection(DBString)
cnn.Open()
I use VS.NET 2003, Windows XP SP1, computer's name is
DEJO, SQL Server 2000 is on local computer.
I tried with both permission settings, "Use same
permissions as the root Web server"
and "Use unique permissions for this Web application".
What (Where) do I have to set up?
Thanks in advance. 3 1113
Thank you Marc, I'll try.
Can I change the name of the account (ASPNET)? -----Original Message----- Hi,
I assume that the account 'DEJO\ASPNET' which ASP.NET
uses on your computerhas no security rights on the SQL server. You can add
this account to SQLServer using the Enterprise Management Console and give
it the necessaryrights to work with the DB you are selecting.
Best regards,
Marc Höppner NeoGeo
"Dejan Lazic" <de*********@os.hinet.hr> wrote in message news:97****************************@phx.gbl... Why can't I connect to my SQL database using ASP.NET (VB.NET) and ADO.NET? I get the following error:
System.Data.SqlClient.SqlException: Login failed for user 'DEJO\ASPNET'. at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction) at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledCon nection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at MyWebSite.WebForm2.Page_Load(Object sender, EventArgs e) in C:\Documents and
Settings\Dejan\VSWebCache\DEJO\MyWebSite\WebForm2. aspx.vb:l ine 29
My connection is: Imports System.Data.SqlClient -- Const DBString As String = "Integrated Security=SSPI;Initial Catalog=Northwind;Data Source= (local)" Dim cnn As New SqlConnection(DBString) cnn.Open()
I use VS.NET 2003, Windows XP SP1, computer's name is DEJO, SQL Server 2000 is on local computer. I tried with both permission settings, "Use same permissions as the root Web server" and "Use unique permissions for this Web application".
What (Where) do I have to set up? Thanks in advance.
.
Yes, it works perfectly.
I was confused because the same connetion
worked well in VB.NET. I just learn ASP.NET.
Thank you. -----Original Message----- Hi,
I assume that the account 'DEJO\ASPNET' which ASP.NET
uses on your computerhas no security rights on the SQL server. You can add
this account to SQLServer using the Enterprise Management Console and give
it the necessaryrights to work with the DB you are selecting.
Best regards,
Marc Höppner NeoGeo
"Dejan Lazic" <de*********@os.hinet.hr> wrote in message news:97****************************@phx.gbl... Why can't I connect to my SQL database using ASP.NET (VB.NET) and ADO.NET? I get the following error:
System.Data.SqlClient.SqlException: Login failed for user 'DEJO\ASPNET'. at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction) at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledCon nection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at MyWebSite.WebForm2.Page_Load(Object sender, EventArgs e) in C:\Documents and
Settings\Dejan\VSWebCache\DEJO\MyWebSite\WebForm2. aspx.vb:l ine 29
My connection is: Imports System.Data.SqlClient -- Const DBString As String = "Integrated Security=SSPI;Initial Catalog=Northwind;Data Source= (local)" Dim cnn As New SqlConnection(DBString) cnn.Open()
I use VS.NET 2003, Windows XP SP1, computer's name is DEJO, SQL Server 2000 is on local computer. I tried with both permission settings, "Use same permissions as the root Web server" and "Use unique permissions for this Web application".
What (Where) do I have to set up? Thanks in advance.
.
Yes, you can change the machine.config which is in the
microsoft.net/framework/ under winnt or windows on your hard drive. http://support.microsoft.com/default...b;en-us;315158
"Dejan Lazic" <de*********@os.hinet.hr> wrote in message
news:07****************************@phx.gbl...
Thank you Marc, I'll try.
Can I change the name of the account (ASPNET)? -----Original Message----- Hi,
I assume that the account 'DEJO\ASPNET' which ASP.NET
uses on your computerhas no security rights on the SQL server. You can add
this account to SQLServer using the Enterprise Management Console and give
it the necessaryrights to work with the DB you are selecting.
Best regards,
Marc Höppner NeoGeo
"Dejan Lazic" <de*********@os.hinet.hr> wrote in message news:97****************************@phx.gbl... Why can't I connect to my SQL database using ASP.NET (VB.NET) and ADO.NET? I get the following error:
System.Data.SqlClient.SqlException: Login failed for user 'DEJO\ASPNET'. at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction) at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledCon nection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at MyWebSite.WebForm2.Page_Load(Object sender, EventArgs e) in C:\Documents and
Settings\Dejan\VSWebCache\DEJO\MyWebSite\WebForm2. aspx.vb:l ine 29
My connection is: Imports System.Data.SqlClient -- Const DBString As String = "Integrated Security=SSPI;Initial Catalog=Northwind;Data Source= (local)" Dim cnn As New SqlConnection(DBString) cnn.Open()
I use VS.NET 2003, Windows XP SP1, computer's name is DEJO, SQL Server 2000 is on local computer. I tried with both permission settings, "Use same permissions as the root Web server" and "Use unique permissions for this Web application".
What (Where) do I have to set up? Thanks in advance.
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Sharon |
last post by:
Hi all.
I'm trying first time async socket connection.
In all the examples i've seen, the server connection is closed
when the message is complete.
Is it common to close the connection after...
|
by: Martin B |
last post by:
Hallo!
I'm working with C# .NET 2.0, implementing Client/Server Applications which
are connecting via Network to SQL-Server or Oracle Databases.
To stay independent from the underlaying Database...
|
by: Suresh |
last post by:
Hi Guys
I have Db2 server installed on remote server. i am connecting to that
remote server by using VPN.
I want to connect that remote DB2 server instance using my local
machine DB2...
|
by: crbd98 |
last post by:
Hello All,
Some time ago, I implemented a data access layer that included a simple
connectin pool. At the time, I did it all by myself: I created N
connections, each connection associated with...
|
by: fniles |
last post by:
I am using VS2003 and connecting to MS Access database.
When using a connection pooling (every time I open the OLEDBCONNECTION I use
the exact matching connection string),
1. how can I know how...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
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...
| |