Connection String fails in WinForms, works in ASP

Posts   
 
    
jaskey avatar
jaskey
User
Posts: 23
Joined: 09-Jul-2006
# Posted on: 15-Jun-2007 05:08:37   

I have the following connection string info in both web.config and an app.config

<add key="Main.ConnectionString" value="Data Source=10.0.0.4;Initial Catalog=dbname;User Id=username;Password=password;"/>

In my ASP app using an LLBL DAL, this works fine. However in a Winforms app using the same LLBL DAL, it fails with this error...

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

Im running SQL 2005 64-bit on Server 2003 R2 64-bit. I have verified that all protocols are enabled and firewall is off on SQL box.

Both ASP and Winforms apps are running on a different box than the SQL server.

Anyone have any thoughts. I have tried lots of different adjustments to the string like putting in a FQDN instead of IP, forcing TCP etc with no luck. Seems like if it works in ASP, it should work in Winforms but I must be missing something... do they use different providers or something?

jaskey avatar
jaskey
User
Posts: 23
Joined: 09-Jul-2006
# Posted on: 15-Jun-2007 05:22:34   

As usual... 5 minutes after my post... I figured it out.

Seems I was not setting DbUtils.ActualConnectionString on the winform constructor from the app.config so it was carrying over the default string from the LLBL generation database. I have recently moved my SQL server. :-)

Thanks for listening. stuck_out_tongue_winking_eye

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 15-Jun-2007 08:34:12   

Glad you have solved it. simple_smile