473,386 Members | 1,830 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,386 software developers and data experts.

Problem with database connection

KKR
Hi

I am getting an Error : Sql server does not exist or access denied when i try to connect through a web application. The same connection string works for a windows application. The same webapplication works fine if i try to run on the SQL server macines itself. I am using SQL Server2000.

(I can access the server database through enterprise manager.)

Thanks in advance.
Nov 18 '05 #1
2 1031
Sounds like a permissions issue. A Windows application generally runs under
the local System account.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"KKR" <an*******@discussions.microsoft.com> wrote in message
news:F0**********************************@microsof t.com...
Hi

I am getting an Error : Sql server does not exist or access denied when i try to connect through a web application. The same connection string works
for a windows application. The same webapplication works fine if i try to
run on the SQL server macines itself. I am using SQL Server2000.
(I can access the server database through enterprise manager.)

Thanks in advance.

Nov 18 '05 #2
KKR

Are you using Integrated Security=SSPI in your connection string? I am assuming so, since you have no problems connecting via your Windows app (which will use your credentials while trying to access SQL Server). Through the Web server, SQL Server most likely sees you as IUSR_machinename, or ASPNET, depending on your settings. If you are trying to access with Integrated security from the Web server, you have to take a few measures

1.) turn on Integrated Windows authentication in II
2.) In the web.config file, make sure you have <authentication mode="Windows"/>. Add the <identity impersonate="true"/> element right in the same area

What this is doing is flowing your credentials down to SQL Server. This should be good to go for you.
Nov 18 '05 #3

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

Similar topics

6
by: lenny | last post by:
Hi, I've been trying to use a Sub or Function in VBA to connect to a database, make a query and return the recordset that results from the query. The connection to the database and the query...
4
by: Reinier Beeckman | last post by:
Hi got the following problem, it's more a programming problem then really a database problem. I have a Database class which connects to a mySQL database on the network. In WebForm1.aspx i connect,...
14
by: Nick Gilbert | last post by:
Hi, I have an asp.net application which runs from a CD-ROM using Cassini. As such, it is single user only. The application connects to an Access database when it is loaded, and keeps the same...
0
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...
5
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...
22
by: b_r | last post by:
Hi, I'm trying to make a simple operation (insert into DB) in VB 2005 and SQL Server. The code is as follows: Dim sConnectionString As String = _ "Data...
5
by: Usman Jamil | last post by:
Hi I've a class that creates a connection to a database, gets and loop on a dataset given a query and then close the connection. When I use netstat viewer to see if there is any connection open...
2
by: dc | last post by:
I have a baffling connection problem from my C# console app to a sql server express database. The console application opens the sql database using the following code:- vDataSource = "server =...
2
by: dmstn | last post by:
Hey! I've got a little problem. I have to make a web site for a university essay. I curently have to create a search engine. Users can enter a hotel name in a search bar and results have to appear in...
0
by: okonita | last post by:
Hi all, I am having a DB2 connectivity problem that I hope someone can help me resolve. I need this to test Replication and such other things. What am I doing wrong here? Any help that I can get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
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...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.