Outside Connections With Cassini (VS2010)

By Josh Wright on December 2010 in tips

 

Cassini is the little baby version of IIS that is built into Visual Studio. It makes debugging wonderful and is very light weight. Unfortunately it does not accept outside connections, say from another computer on your network. This is a real bummer when you want to demo some software or debug it on another device.

So it'd be pretty sweet if Visual Studio websites let us connect from other devices on the network, but is that even possible? It is, but it took people way smarter than me to figure it out. You can read a discussion about Connecting Remotely to WebDev.WebServer.exe (Stack Overflow).

Disclaimer 1: Cassini is absolutely not intended to be used in any type of production environment and I'm not advocating anything like that. If you use it in production, you will quickly see many performance and security issues.

Disclaimer 2: Messing with assemblies might mess stuff up, so be aware that this could end badly.

How to enable outside connections

Here's how you install in Windows 7:

  1. Download and extract this zip: Patched_DevServer.zip

  2. Copy everything from the unzipped folders DevServer_10_20 and DevServer_10_40 to C:\Program Files\Common Files\microsoft shared\DevServer\10.0

  3. Register the WebHost assemblies... so open your command prompt as an admin and run:

    C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil.exe" /i "C:\Program Files\Common Files\microsoft shared\DevServer\10.0\WebDev.WebHost20.dll
    
    C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\gacutil.exe" /i "C:\Program Files\Common Files\microsoft shared\DevServer\10.0\WebDev.WebHost40.dll