3

In Visual Studio 2010 I have created a WebService (WCF) Application and a client to consume said service.

My 3 options as far as what servers to use for debugging are: Visual Studio Development Server, Local IIS Web Server, Custom Web Server.

I know I can't use the VS Development Server if I want my service to be accessible outside of localhost. So I installed IIS (Control Panel>Add/Remove Programs>Add/Remove Features). When I select this option in Visual Studio 2010 it doesn't seem to work. I'm not sure what options I have to setup so that other machines can run the client to consume this service.

By default VS set the Project URL to: http://localhost/MyService. Oh, and I'm working with .svc files (not .asmx) if that makes any difference.

myermian
  • 31,823
  • 24
  • 123
  • 215

3 Answers3

4

Common problem when you intall IIS after the framework.

Go to your Windows\Ms.Net\Framework\<version> folder and execute aspnet_regiis.exe. It's a commandline tool.

H H
  • 263,252
  • 30
  • 330
  • 514
  • 3
    And run ServiceModelReg.exe for the WCF – S P Jun 24 '10 at 14:47
  • @Sander, OK, I haven't used that one yet. – H H Jun 24 '10 at 14:54
  • 1
    I did the aspnet_regiis.exe (with -i -enable option). That didn't work, but it was part of the solution. The remaining part was mapping the svc file appropriately which was done with ServiceModelReg.exe -r – myermian Jun 24 '10 at 15:10
1

To save having to install IIS you can configure a proxy - such as Fiddler - to redirect certain incoming traffic to localhost.

Because these new requests are "appearing" (via the redirect) from inside your machine, Cassini will respond.

The process is covered in this answer: https://stackoverflow.com/a/4428747/1016183 under "Option #2: Write a FiddlerScript rule"

Community
  • 1
  • 1
Morphed
  • 3,527
  • 2
  • 29
  • 55
0

You can right click on Project and do publish. This will generate the required files for your deploy.

In order to debug your app, you can use the Visual Studio built-in host or IIS. In your project properties, under Web, you can select "Use Local IIS Server".

S P
  • 4,615
  • 2
  • 18
  • 31