다음을 통해 공유


Configuring IIS 7 to work with WCF Web Services for Silverlight 2

I've tried these, and there are some interesting parts that can take some time figuring out by digging in docs.

This post will probably solve the 404.3 error (svc not registered as MIME type)

So here's the whole solution for getting a WCF service started up and using it from Silverlight 2 Beta 1:

1. To build the service: How to: Build a Service for Silverlight Clients
2. To enable cross-domain for the service, if needed: How to: Make a Service Available Across Domain Boundaries

3. To add the service to IIS 7:

  • Create new IIS 7 application - Right-click on Default Web Site in the IIS Manager console, Add application, setup the folder (e.g. D:\test\SampleAppFolder) and name. Click OK
  • Deploy your service to https://localhost/SampleApp (or your app virtual name)
  • Important This step took me a while to figure out: install WCF: open admin cmd prompt, and execute ServiceModelreg -i in c:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation folder.

c:\>cd c:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation

c:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation>

c:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation>ServiceModelreg -i
Microsoft(R) Windows Communication Foundation Installation Utility
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.648]
Copyright (c) Microsoft Corporation. All rights reserved.

Installing: Machine.config Section Groups and Handlers

Installing: System.Web Build Provider

Installing: System.Web Compilation Assemblies

Installing: HTTP Handlers

Installing: HTTP Modules

Installing: ListenerAdapter node for protocol net.tcp

Installing: Protocol node for protocol net.tcp

Installing: TransportConfiguration node for protocol net.tcp

Installing: ListenerAdapter node for protocol net.pipe

Installing: Protocol node for protocol net.pipe

Installing: TransportConfiguration node for protocol net.pipe

Installing: ListenerAdapter node for protocol net.msmq

Installing: Protocol node for protocol net.msmq

Installing: TransportConfiguration node for protocol net.msmq

Installing: ListenerAdapter node for protocol msmq.formatname

Installing: Protocol node for protocol msmq.formatname

Installing: TransportConfiguration node for protocol msmq.formatname

Installing: HTTP Modules (WAS)

Installing: HTTP Handlers (WAS)

c:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation>

Hope this helps. If you have any other suggestions or things you stumbled upon please let me know. I appreciate your feedback!

Comments

  • Anonymous
    March 16, 2008
    The comment has been removed

  • Anonymous
    March 19, 2008
    The comment has been removed

  • Anonymous
    November 26, 2008
    Thanks. This is what I needed.

  • Anonymous
    September 27, 2011
    Thanks a lot! Very helpful solution.