IIS 7 Non-HTTP Protocol Support

clock July 19, 2009 05:08 by author jamesstill

More fun with WCF. Out of the box IIS 7 supports the HTTP protocol only. To configure named pipes, TCP, or MSMQ you must use the IIS configuration tool appcmd.exe located in %windir%\system32\inetsrv. (The command-line tool updates the %windir%\system32\inetsrv\config\applicationHost.config file.) For example, if tcp runs over port 808 and my web server's windir is c:\windows then the command to enable tcp is:

c:\windows\system32\inetsrv\appcmd.exe set site "Default Web Site" -+bindings.[protocol='net.tcp',bindingInformation='808:*']

One last detail: each WCF service hosted in its own application (virtual) directory beneath the Default Web Site must also be explicitly enabled for non-HTTP protocol support:

c:\windows\system32\inetsrv\appcmd.exe set app "Default Web Site/[app dir]" /enabledProtocols:http,net.tcp

Now that the tcp protocol is supported in IIS 7 over port 808, a client endpoint is available for netTcpBinding.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Visual Studio 2008: Unable to create the Web site

clock July 4, 2009 08:04 by author jamesstill

After a brief foray into Windows 7 Beta just to check it out I took my laptop back to Vista 64-bit, wiping everything out in the process to get a clean slate. Many moons ago, when first installing Vista, it took me about 3 minutes before I disabled the UAC. This time I'm trying hard not to disable it. (You know, best practices about not developing as a sysadmin and all of that.) Now I'm running into security issues that I'm forced to address rather than bypass. In the end this is a good thing. Here's the latest: In VS2008 I right-clicked on the solution and chose Add > New Web Site. Then I picked the WCF Service template and changed the location to HTTP. This tells VS to create a new virtual application beneath the Default Web Site (in my case c:\inetpub\wwwroot) but I got the error: "Unable to creat the Web site 'http://localhost/Foo' because I was not running Visual Studio in an administrator context. The solution is to run VS as an administrator (you can create a shortcut of devenv.exe and under the Advanced tab toggle "Run as administrator") in order to add the web site. Then save and close and go back in under your logged in credentials.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Windows Vista Port 8000

clock July 4, 2009 06:25 by author jamesstill

Port 8000 is not open in Windows Vista except when running as a system administrator. And so with User Account Control (UAC) enabled, you cannot navigate to http://localhost:8000 or run self-hosted WCF Services without opening the port. To open for your user account, open a command prompt (running as Administrator) and invoke the netsh utility:

      netsh http add urlacl url=http://+:8000/ user=MYMACHINE\UserName

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


About

SquareWidget LLC is an Oregon-based software development company that specializes in handcrafted .NET software solutions.

Search

Archive

Categories


Sign in