16th
MAY
VS2008 and SQL Server 2008 “Katmai” connectivity
Posted by radekg under SQL Server 2008, visual studio 2008, windows 2008
Few days ago I started researching new opportunities with SQL Server 2008 codename "Katmai". As I’m using Visual Studio 2008 I wanted my O/R tools work with it visually. Visual Studio 2008 does not support "Katmai" by default. To get communication between these two products I had install VS2008 patch.
Happy I’ve done everything I needed I’ve created my first data connection and dragged first table onto DBML design surface. It worked. I was able to see how LINQ to SQL works. But after few minutes my connection was interrupted and I couldn’t reload it. Knowing there is real problem I started looking for the solution. I’ve been removing my connection and adding new, modifying its settings - no result. From that moment I lost my connection for the first time I was unable to locate my SQL 2008 server from VS. But I could still connect to it from SQL Server Management Studio. Strange!
So what actually happen there? First let me explain how my dev environment works. I’m running Vista SP1 and Windows 2008 Web Edition on Virtual PC 2007. SQL Server 2008 is installed on Windows 2008. For some reason I had my Vista firewall switched off. When I tried sharing random directory to Windows 2008 I got the message saying sharing is disabled if firewall is switched off. That was some clue. For dev purposes I had Windows 2008 firewall switched off also. So I enabled firewall on both Windows, edited Windows 2008 firewall settings to allow SQL Server connections from outside and my VS2008 could connect to SQL Server 2008 again. Problem solved.
I’m sure this solution will not always work but if you’re experiencing similar problems you can always check if it helps. And remember: switch on your SQL Server Browser service first and allow remote connections!
Reader's Comments
Leave a Reply
Post Meta
-
May 16, 2008 -
SQL Server 2008, visual studio 2008, windows 2008 -
2 Comments
-
Comments Feed
Seems like a viable solution. Why would you turn off your firewalls, though? Is there some kind of convenience that comes with it during dev that I’m not noticing?
**************
Nico del Castillo
Microsoft Security Outreach Team
http://www.microsoft.com/hellosecureworld7
@Nico: I’m turning off my firewall often when working with multiple IIS web sites. Project I’m working on manages IIS web sites on random ports so to make my life easier I’m switching off firewalls during development time. I’m sure there is some way to control firewall progrmatically but didn’t had time to firure out how.
Hope this helps!