0

I just started with WCF rest services and I've created a very simple project.

enter image description here

I can access it by

 http://localhost:3349/VUXServicePrototype.svc/test

and see the text on the browser.

Now my question is how can I deploy it on the IIS? I can see it on IIS Express but how can I move it on the IIS?

Daniel
  • 3,322
  • 5
  • 30
  • 40

2 Answers2

1

You can build (I prefer publishing) to a directory.

  1. Open IIS.
  2. Select the app pool node.
  3. Create a new app pool targeting your asp.net version and set it to integrated.
  4. Select the site node you will use for the domain or localhost.
  5. Left click add new web application.
  6. Set the app pool to the app pool created in step 3.
  7. Set the physical path to the folder created after the build.
  8. Set a default document if needed.
  9. Select content view and select the default document or the app node if no default.
  10. Click view and test.
Ross Bush
  • 14,648
  • 2
  • 32
  • 55
  • on the physical path test settings it says invalid application path. – Daniel Mar 21 '14 at 01:46
  • 1
    Did you browse to the root wcf app folder that has a bin folder and web.config file? – Ross Bush Mar 21 '14 at 01:48
  • yep... it has bin and web.config – Daniel Mar 21 '14 at 01:49
  • 1
    If you browsed to the item don't worry about what test returned. I have never used that feature. It should resolve if it is a local directory, – Ross Bush Mar 21 '14 at 01:50
  • it gives me this error: HTTP Error 403.14 - Forbidden – Daniel Mar 21 '14 at 01:54
  • 1
    Check your IIS. At this point it's all about what protocols/credential you app is configured to receive and what is actually being request. Take a look at http://stackoverflow.com/questions/1741439/asp-mvc-in-iis-7-results-in-http-error-403-14-forbidden – Ross Bush Mar 21 '14 at 01:59
1

To deploy a WCF service once you've finished development, an easy way is to use the visual studio deploy tool. Right click on your service project, and click publish. Click the dropdown, and create a new profile.

You can either deploy directly to the IIS server, or deploy to the file system so that you can setup IIS yourself.

George
  • 1,964
  • 2
  • 19
  • 25
  • what should I select as publish method? and the rest of the properties? – Daniel Mar 21 '14 at 01:58
  • Are you deploying to local IIS? If so, you could just use File System and deploy to an IIS virtual folder. Alternatively, you can use [WebDeploy](http://www.iis.net/downloads/microsoft/web-deploy) which lets you deploy directly to IIS. You just need to install the module. – George Mar 21 '14 at 02:01
  • I'll do that .. give a sec – Daniel Mar 21 '14 at 02:01
  • I'm installing webDeoply now. – Daniel Mar 21 '14 at 02:05