| Author |
Topic |
|
josephl
Starting Member
12 Posts |
Posted - 2008-03-02 : 18:24:20
|
| Hi,I'm developing an ASP website with components developed under C# (DLL). The component is working ok when I temporarily used winforms to test it prior to compiling to DLL. but when I used that component to a ASP script, I got the error: "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"It is weird because I'm not using SQLServer 2005. I'm using MSSQL 2000 only. If the winform version is working ok, how come the asp version is not? all the proper registration of component was followed correctly (even though it sucks. i used to developed a component in VB6 before and I never encountered so many authentication crap unlike in .Net2.0)Can someone help me on this?Thank you in advance.Joseph |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-03-02 : 20:01:57
|
| Did you have correct connection string? |
 |
|
|
josephl
Starting Member
12 Posts |
Posted - 2008-03-02 : 22:40:19
|
| Hi rmiao,Yep, the connection string i used in the form version was the same as the connection in the ASP script:==================================Data Source=SIRIUS\\EPHARMACY;Initial Catalog=ePharmacy;Persist Security Info=True;User ID=james;Password=bond=============================And the ASP script was:===========================connSTR="Data Source=SIRIUS\\EPHARMACY;Initial Catalog=ePharmacyDev_ADHB_20070228;Persist Security Info=True;User ID=devuser;Password=bond"Set objSearch = Server.CreateObject("Search.Patient") sResult = objSearch.ListPatients(surname, connSTR)Set objSearch = Nothingresponse.write sResult================================Thanks in advanceJoseph |
 |
|
|
josephl
Starting Member
12 Posts |
Posted - 2008-03-02 : 22:42:14
|
| Correction: The ASP script was:Data Source=SIRIUS\\EPHARMACY;Initial Catalog=ePharmacy;Persist Security Info=True;User ID=james;Password=bond |
 |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2008-03-02 : 23:04:27
|
quote: Originally posted by josephl Correction: The ASP script was:Data Source=SIRIUS\\EPHARMACY;Initial Catalog=ePharmacy;Persist Security Info=True;User ID=james;Password=bond
LMAO...I was going to suggest that you didn't have to post the passwords and login info...Change the settings on the server to allow remote settings. Poor planning on your part does not constitute an emergency on my part. |
 |
|
|
josephl
Starting Member
12 Posts |
Posted - 2008-03-03 : 14:30:08
|
| Hi Lamao,No problems on the password infos. The server has numerous firewalls installed (pix/personal fw).What application server should I change? The SQL server application or the windows server in which the SQL DB resides? I already change the SQL server settings to accept remote connection. I will try then the server itself. Update you later. thanks |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-03-03 : 22:40:31
|
| Tried connect to sql with ip address and port number? |
 |
|
|
josephl
Starting Member
12 Posts |
Posted - 2008-03-17 : 20:46:03
|
| Thank you guys. It's running fine right now. It was actually pix firewall issue. |
 |
|
|
shijobaby
Starting Member
44 Posts |
Posted - 2009-07-17 : 02:34:13
|
Hii was also facing the problem when connecting sql server 2005 with sqlconnection then i also got the following error messageSqlcmd: Error: Microsoft SQL Native Client: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.I referred the following url and solvedhttp://sqlservererror-info.blogspot.com/2009/07/error-has-occurred-while-establishing.htmlRegards |
 |
|
|
tripodal
Constraint Violating Yak Guru
259 Posts |
Posted - 2009-07-17 : 11:09:11
|
| If it was a firewall issue, you should probably change your password now... since the firewall is letting people through.But thats just me... |
 |
|
|
|