Sunday 15 June 2014

c# - Named Pipes error 40 in windows server 2003 -


I wrote an application in C #. I use these wires to connect

  str = "data source = 200.1xx.2yy.1zz; initial catalogs = minofom; uid = SA; pwd = ablitta";   

and the same string for app.config:

  & lt; Add name = "MiniFinan.Properties.Settings.MiniFimConnectionString" connectionString = "data source = 200.1xx.2yy.1zz; initial catalog = minofoof; uid = SA; pwd = abilita" provider name = "system.data .sql client" / & Gt;   

Whenever I'm coming out of the local network, all apps and reports work right, but when I install the app in the server or in the app, the app shows me this error Network:

A named pipes provider, error: 40 - The connection to the SQL server could not be opened

Local server is a domain controller, I local Use this string for area network :

  str = "data source = 192.168.2.254; initial catalog = minoFom; uid = sa; pwd = abuelita"   

all forms work , But when I do not connect to any report, I use the same string for app.config. I have tested the same app in other server 2003 (not the domain controller) and the report works, there is no way to write the string for the domain, any idea to fix it?

I have tested the SQL Browser online, Protocol: Shared Memory / Named Pipes / TCPIPs are installed and work. I think there is something with the domain.

I have solved the form using two strings:

 < Code> str = @ "data source = torrere; initial catalog = minofom; uid = SA; pwd = ablitta";   

and other reports in app.config:

  connectionString = "data source = MyDomain \ TORRE; initial catalog = minoFom; uid = sa; Pwd = abuelita "  

Save more than one strings in the app.config,

No comments:

Post a Comment