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 2005 Forums
 SQL Server Administration (2005)
 .Net failed to access SQL instance

Author  Topic 

chih
Posting Yak Master

154 Posts

Posted - 2008-10-14 : 21:45:10
Hi All,

When we run a .NET application accessing to a new SQL instance (not default port 1433) from local, it has no problem.

However, once we apply this application on web servers, it said
"sql server does not exist or access denied."

note: Firewall has opened for the particular port. SQL Browser is trun on

The funny thing is if we created a ODBC connection to that SQL instance, it works!

Does SQL need an initial connection setup even though .NET doesn't use ODBC? It is quite stupid to create ODBC and then drop it every time if we want to launch the new system.

Any one can answer me?
thank you in advance.

hey001us
Posting Yak Master

185 Posts

Posted - 2008-10-14 : 22:44:43
Did you mention the port number during connection string since its not default port?

hey
Go to Top of Page

chih
Posting Yak Master

154 Posts

Posted - 2008-10-14 : 22:58:08
quote:
Originally posted by hey001us

Did you mention the port number during connection string since its not default port?

hey



No, I didn't include port number in the string.
But I found the solution!!
In the web server run cliconfig.exe and add the alias. By default, when you create an ODBC, it will also add alias.

One extra question. which one is the best practice?
1. specify port number in connection string?
2. setup alias in web server?

Thank you in advanced.
Go to Top of Page

hey001us
Posting Yak Master

185 Posts

Posted - 2008-10-14 : 23:51:37
I prefer 2nd option since we no need to care about application layer or developer.

hey
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-10-15 : 02:10:05
enable remote access on your surface area configuration
Go to Top of Page
   

- Advertisement -