Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Security / January 2008

Tip: Looking for answers? Try searching our database.

Urgent problem about SQL Server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
HK newsgroup - 22 Jan 2008 19:52 GMT
Hi,
I have a problem connecting my SQL Server 2005 from a ASP Webpage.

When I trying to connect using the following connection string:
"Provider=SQLOLEDB; Data Source =2xx.xxx.xxx.xxx; Initial Catalog = xxx;
User Id = xxx; Password=xxx"

The browser returns an error:
"Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
denied."

If I put the ASP page under the same local machine with the SQL Server, it
works fine.
However it failed to connect if I put the ASP page in another client
machine, which then remote connect to the SQL Server machine.

I am sure I have openned the port 1433 and 80, because I can connect by
using SQL Server Management Studio by using the same IP address, and I can
access the IIS thru a client machine.

Is there anything missing in my Win Server 2003 machine that blocked the
connection from Web? or any setting missing in the SQL Server to accept Web
connection?

thanks.
Paul
Erland Sommarskog - 22 Jan 2008 22:36 GMT
> I have a problem connecting my SQL Server 2005 from a ASP Webpage.
>
[quoted text clipped - 15 lines]
> using SQL Server Management Studio by using the same IP address, and I can
> access the IIS thru a client machine.

Is that the same machine from which you try to run the ASP page?

> Is there anything missing in my Win Server 2003 machine that blocked the
> connection from Web? or any setting missing in the SQL Server to accept
> Web connection?

SQL Server does not even know that it is a web connection.

I suspect that this may be an IIS/ASP issue, an area of which I am
largely ignorant. I would check that IIS is not running as LocalSystem,
as that could preclude network access.

Signature

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Sean McCown - 23 Jan 2008 15:04 GMT
Couple things to try:

1.  Make sure your username/password are correct.  That's an excellent place
to start.  Most of the problems I've had with ASP have been because of this.  
Also, make sure the machine name is correct.  Connect through another tool
using the exact same info you're using in your ASP.

2.  Make sure your SQL box is setup accept external connections.  You can do
that from Surface Area Configuration.

Since you're connecting with SQL auth none of the other IIS settings should
be a factor.

> Hi,
> I have a problem connecting my SQL Server 2005 from a ASP Webpage.
[quoted text clipped - 23 lines]
> thanks.
> Paul
Erland Sommarskog - 23 Jan 2008 22:41 GMT
> 1.  Make sure your username/password are correct.  That's an excellent
> place to start.  Most of the problems I've had with ASP have been
> because of this.  Also, make sure the machine name is correct.  Connect
> through another tool using the exact same info you're using in your
> ASP.

While checking username and password is not a bad idea, the error message
that HK newsgroup got was:

>> The browser returns an error:
>> "Microsoft OLE DB Provider for SQL Server error '80004005'
>> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
>> access denied."

This means that you don't even reach SQL Server, so your username and
password are never put to a test.

Signature

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Sean McCown - 24 Jan 2008 01:50 GMT
Funny, I just entered in a wrong password on an ASP page and it gave me the
same error message.  That said though, I was trying to go through the basic
steps of troubleshooting by getting him to verify that his username/password
are indeed what he thought they were and that he could verify connection from
another tool.  This is the first step in getting to the root of the problem.  
If that passed then you notice that I had him check that his sql box is setup
for external connections.  The box is clearly up and running because he can
get to it locally.  So it's logical to believe that the box either doesn't
accept external connections, or that something is wrong with his creds.

I'm curious as to why you felt it necessary to try to call out my first step
as being wrong somehow.  Is there something you're trying to prove by coming
on and telling me I'm wrong?  What did you hope to gain by specifically
telling me I was wrong instead of just letting the answer ride?

> > 1.  Make sure your username/password are correct.  That's an excellent
> > place to start.  Most of the problems I've had with ASP have been
[quoted text clipped - 12 lines]
> This means that you don't even reach SQL Server, so your username and
> password are never put to a test.
Erland Sommarskog - 24 Jan 2008 08:53 GMT
> I'm curious as to why you felt it necessary to try to call out my first
> step as being wrong somehow.  Is there something you're trying to prove
> by coming on and telling me I'm wrong?  What did you hope to gain by
> specifically telling me I was wrong instead of just letting the answer
> ride?

Because that I have seen more than one post which have indicated that people
have scratch their hair over usernames, authentication etc when they have
seen this message, being mislead by the "access is denied" part.

When you get this message, you are not able to reach SQL Server at all, and
it does not matter whether the username and password you entered are valid
or not.

Signature

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.