Geeks With Blogs
Developers Friendly

With this article, i am trying to elaborate the problems i faced while hosting WCF service on a Windows Server and on an IIS8. Hope this helps any one.

Step1: Once I setup an application in IIS and try to browse, i got below error. This Error shows up as dependency dll was not available on server machine.

Problem 1:

  • Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Resolution:

Once, Problem 1 is fixed, IIS need to set up to handle .svc request. Following steps need to be done to handle the same.

Step2: Please do the following two steps on IIS 8.0

Add new MIME type & HttpHandler

1. Extension: .svc, MIME type: application/octet-stream

2. Request path: *.svc, Type: System.ServiceModel.Activation.HttpHandler, Name: svc-Integrated

 

Step3: Turn on WCF Service in windows features

1. Run Server Manager (on task bar and start menu)

2. Choose the server to administer (probably local server)

3. Scroll down to "Roles and Features" section.

4. Choose "Add Role or Feature" from Tasks drop down

5. On "Add Role or Feature Wizard" dialog, click down to "Features" in list of pages on the left.

6. Expand ".Net 3.5" or ".Net 4.5", depending on what you have installed. (you can go back up to "roles" screen to add if you don't have.

7. Under "WCF Services", check the box for "HTTP-Activation". You can also add non-http types if you know you need them (tcp, named pipes, etc).

8. Click "Install" Button.

 

For me, above changes fixed the issue. I hope this will help anyone in order to host WCF service.

 

Thanks!!

Posted on Sunday, December 8, 2013 12:35 PM .NET , WCF , IIS | Back to top


Comments on this post: Hosting WCF Service on IIS8

# re: Hosting WCF Service on IIS8
Requesting Gravatar...
Awesome!.. Worked like Charm.. I was looking for this Answer... Thanks. WaheGuru Bless
Left by Mukesh Kumar on Apr 03, 2014 1:22 AM

Your comment:
 (will show your gravatar)


Copyright © Manjunath K | Powered by: GeeksWithBlogs.net