Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 MSDE (2000)
 access denied, but only via ASP

Author  Topic 

stevep
Starting Member

17 Posts

Posted - 2004-03-18 : 07:20:25
Hi,

I've a remote install that I can connect to fine via EM and QA. After reading a few messages on this site I've checked it's listening via TCP/IP and on port 1433. All looks fine.

But I get the standard "SQL Server does not exist or access denied" message when connecting via ASP. This is using OLEDB and ODBC connection strings.

My host assures me no service packs or network changes have been made. And the fact EM and QA connect fine makes me think the network is OK.

Anybody any clues?

TIA

Steve

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2004-03-18 : 07:29:22
steve, where is your ASP running from? are you using Windows authentication or SQL authentication? I suspect your webserver does not have network access to the database server, or you are trying to access sql server using Windows authentication.

OS
Go to Top of Page

Doug G
Constraint Violating Yak Guru

331 Posts

Posted - 2004-03-18 : 13:31:06
If the web server is IIS, it will typically be running as the IUSR_computername user. If you are using windows authentication in your MSDE you'll need to allow this user as a sql user.

Another thing to check is your connection string. If the MSDE server is on a different box from the web server, you may want to force a tcp/ip connection by specifying the network library in your connection string.


======
Doug G
======
Go to Top of Page

stevep
Starting Member

17 Posts

Posted - 2004-03-18 : 18:37:16
Doug, OS,

SQL is set to accept windows and sql authorisation. Access via Em and QA is SQL authorisation (sa and dedicated user accounts). Connection string connection uses same SQL accounts, and fails.

The ASP is running on a separate server.

I'll try forcing TCP/IP connectivity via the connection string. Found this as the example to use (hope this is right):

"Provider=sqloledb;Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;"

Will report on the success, hopefully, of this change.

Steve
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-18 : 18:40:36
Is there a firewall in between the web server and the database server? If so, a hole will need to be punched for the port.

When you run the ASP, is it from the same machine where you used EM or QA to get to the database server?

Tara
Go to Top of Page

stevep
Starting Member

17 Posts

Posted - 2004-03-22 : 06:16:06
Tara, et al,

The host is running a firewall and I'll get them to check port 1433. But don't understand how a blocked port would still allow QA and EM to connect, and just stop ASP. Think that's the crux of the matter - what's so different about connecting from a web page instead of QM, when both are using SQL authorisation to the same account?

And I tried forcing TCP/IP connection via the "Network Library=DBMSSOCN" addition to the OLEDB connection string. Still no joy.

Any other clues much appreciated.

Steve
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-22 : 12:28:30
But are both the ASP and QA or EM on the same machine?

Tara
Go to Top of Page

stevep
Starting Member

17 Posts

Posted - 2004-03-22 : 15:07:19
Tara,

QA and EM are on my PC, connecting to SQL on the remote, hosted server.

The ASP is running on another remote server, different to the SQL server.

Have asked the host to check the ASP and SQL servers can talk to each other. Presumably that would be via port 1433?

Steve

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-22 : 15:12:59
It is not necessarily 1433. As a matter of fact, it shouldn't be in a DMZ environment. They need to check the firewall rules and add one for the server that is running the ASP. The rule could be by MAC address (recommended approach), IP address, subnet, etc... They are probably blocking the ASP server currently. The firewall needs to be setup to allow that server to get to the SQL Server.

Did you setup an alias on your machine in order to connect to the SQL Server? If so, then you'll need to setup the alias on the ASP server as well. The alias might have been created via Client Network Utility or the hoster provided you with a reg file.

Tara
Go to Top of Page

stevep
Starting Member

17 Posts

Posted - 2004-03-23 : 04:55:41
Tara, et al.

Thanks muchly. Your last suggestions obviously made sense to the host as all of a sudden all is well.

Steve
Go to Top of Page
   

- Advertisement -