Thursday, February 9, 2012

ASP.NET 2.0 SQL Server 2005 Connect Problem

HI,

I have a standard 3 tier architecture which uses asp 2.0 and sql 2005. The SQL 2005 machine is remote and when trying connect to the db server from my logon page I get a page cannot be found once i click submit on the logon button.

I have carried out the following checks:

1 ) MAde sure that SQL Server has enabled the TCP/IP and network pipes from configuration manger.

2) I have checked that the remote connections is enabled from surface area configuration.

3) I have ensured that the network service account has privilages on the web server.

4) I am using forms authentication.

5) I have used the following connection string:

connectionString="Network Library=DBMSSOCN;Database=My_DB;data source=ServerName,1433;password=pasword;User ID=Myuser;Integrated Security=false;"

6) I have tested his connection string from a windows forms application and it s working fine.

Can someone please help me out here as I cant work out at is going wrong??

Thanks in advance

Garry

I had a similar problem a while ago, connecting to a local sql server worked fine, remote one constantly gave me an error. The only thing that seemed to work for me, for some strange reason, was to change the data source in the connection to use the server's IP address instead of the server name|||

Hi,

Since you are able to connect through windows form using the same connection, I think you need to put a breakpoint at connection.Open() method and see what the actual error is. Let me know of this so that we can pinpoint what exactly is wrong.

-Vivek

|||

Hi,

I resloved the problem. It was the fact that the WP process required db_owner rights on the SQL 2005 DB. As simple as that.

Cheers

No comments:

Post a Comment