I'm playing around with IIS7 today and I have a separate machine set up to check out a few of my existing applications both ASP.NET and a number of Web Connection ISAPI applications. It took a bit to get the server up and running but all went well after some tweaks.
The real head scratcher occurred though because I couldn't connect to SQL Server on my development laptop. I've recently installed SQL 2005 on this machine and I've been happily plugging away with it on my local machine for a few weeks now. While it works fine locally today I couldn't get it to connect remotely from the IIS7 box.
Eventually after a timeout delay I ended up with a connection error message that says:
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
A couple of searches through the Properties of the server didn't show anything refusing connections – the connection count is set to 0 (unlimited connections) and this would be the logical spot to find an option that refuses connections, right?
Well, it turns out that this is controlled by an EXTERNAL utility, the Sql Server Surface Area Configuration Tool which can be found in Start Menu Sql Server Configuration section. By default Sql 2005 indeed refuses remote connections and you need to run this utility to enable remote connections. Intuitive isn't it?
Is this really necessary? Disabling remote connections on a SQL Server by default seems a little odd anyway. I mean it's a SERVER isn't it? Who's not going to want to have remote connections on this thing? At least add the option to the server itself in a logical place and even if you can't set it there give an indication that it's disabled elsewhere…
But no – we're too paranoid. If connections were disabled in the server itself somebody could hack that – yeah right...
This security stuff is really going a few steps too far. In Vista EVERYTHING pops up security permission dialogs because practically nothing including the native Windows Applications are signed. It looks like everything will have to be signed in order to not pop up permissions dialogs. This is a small vendor's nightmare – getting a verified signature is a pain in the ass and if that ends up being a similar process as it was with ActiveX controls we can look forward to the same mess where nothing is signed and everybody blindly clicks Ok… doesn't that sound like fun ?
Well the upside is my app is running with remote data now on IIS 7 which is nice. Next is hooking up some of the optional modules and see how they fare in the integrated pipeline...
Other Posts you might also like