RoRiff on Tue, 10 Oct 2017 08:49:23


I have been struggling with this issue for the last couple of days and I getting overwhelmed.

I am using VS2015 to build a application with a front end ( C# web app)  and back end ( desktop windows forms app).

My connection string to the database

connectionString =

@"Server = UHLSQLRadPro01; Database = LRSSDatabase; User ID = RR;";

My database is located on SQL Server 2008 R2 within our network which I can access remotely from my PC and my connection string works fine for my front end web app and my C# program works well with the database.

But my windows forms don't as the connection string doesn't even open at all.

I have applied most of the access rights for that user who is the database owner and allowed the remote connection to the server.

Is there something I am missing? Or is there any way to allow my windows forms to connect to my database ?


Olaf Helper on Tue, 10 Oct 2017 09:36:52

But my windows forms don't as the connection string doesn't even open at all.

Not clear what you mean with this, may can you rephrase it please?

You can connect from a WinForms application exactly the same way as from each other Project type, like your ASP.NET web app, there is no difference.

RoRiff on Thu, 12 Oct 2017 08:14:06

Thank you for your reply Olaf.  I have sorted it out... The SQL server windows firewall was on within the domain side, so I realized I had to turn it off first...Problem solved....

Olaf Helper on Thu, 12 Oct 2017 08:16:59

Better turn the Firewall one again and Setup 4 small rules for SQL Server, see Configure the Windows Firewall to Allow SQL Server Access