• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 798
  • Last Modified:

unable to see WCF service running on localhost


I just created a WCF Service application project using VS 2010.
Nothing complicated, I just built the template that VS provides and pressed F5.

After this I am able to see the service hosted on IIS on a specific port. Pressing F5 results in the directory listing of the root directory of localhost. I click on the .svc file I get the message about svcutil.exe etc.

But my next step was to try and publish the app to localhost through the file system as this is how my web service will be deployed on to our production server.

So right click on the project name in VS2010 and click on "publish", create a new profile, publish to "file system", gave a local folder name on my c: drive, selected Debug for configuration and published the service. This produced the web.config, .svc file and a bin folder with the .dll and the .pdb files. After this I copied these files to my c:\inetpub\wwwroot\ folder. Deployment - done!

But after this step I am trying to see if my service is running on my localhost, so I type http:\\localhost\Service1.svc. this produces the error
Server Error in '/' Application.

Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

The most common solution for this error on the net is registering asp.net on IIS using aspnet_regiis.exe -iru, but this gives me the error
This option is not supported on this version of the operating system.  Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog,  the Server Manager management tool, or the dism.exe command line tool.  For more details please see http://go.microsoft.com/fwlink/?LinkID=216771.
. So I opened Turn On/Off windows features and checked if ASP.NET is installed. My IIS settings are as below: iis settings. But no success with seeing my .svc file in the browser.

In another attempt, I dropped a simple .htm file under my wwwroot folder and tried to access it through my browser.
But I get the same error when I try to see my SVC file.

Where am I going wrong? What is the right way to host a WFC service created as a WFC Service Application on IIS via the file system? Is my way of testing correct?
How do I fix the error that shows up on my localhost browsing?

Environment: I previously had VS2008, currently have VS2010 and VS2013 RC on my machine which is a Win 8 64-bit OS, which I believe runs IIS 8. And I have reset IIS using iisreset just to see if that helps. but to no avail.
ol muser
ol muser
  • 2
1 Solution
Bob LearnedCommented:
How did you create the application in IIS?  You can't just copy files to inetpub folder, without creating the application.  The web publisher should be able to create this application for you.
ol muserTechnology GeneralistAuthor Commented:
Ok, on my OS, Win 8, the solution pointed to by this link finally fixed the issue and I'm able to see


in the browser.
ol muserTechnology GeneralistAuthor Commented:
working solution
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now