WCF Web API deployment on Windows 2008 Server

Topics: Web Api
May 16, 2011 at 8:19 PM

I've created a basic WCF Web API application (see http://bertt.wordpress.com/2011/05/16/wcf-web-api/ ). If I deploy this application on Windows 2008 Server (using import/export deployment package from Visual Studio), there is only a 404 error. Same deployment with a basic ASP.NET MVC 3 application (also with .NET Framework 4) goes allright on the same server. How can I get the WCF Web API application working on Windows 2008 Server?

May 16, 2011 at 10:26 PM
bertt wrote:

I've created a basic WCF Web API application (see http://bertt.wordpress.com/2011/05/16/wcf-web-api/ ). If I deploy this application on Windows 2008 Server (using import/export deployment package from Visual Studio), there is only a 404 error. Same deployment with a basic ASP.NET MVC 3 application (also with .NET Framework 4) goes allright on the same server. How can I get the WCF Web API application working on Windows 2008 Server?


Hey bertt, there really isn't enough information in your post to address your specific problem.  Having said that, getting a 404 after deploying to Windows Server 2008 is not going to be caused by the version of the OS to which you are deploying.  You'll need to be more specific about what's not working or the steps that you take to deploy for anyone to be able to help you out.

May 16, 2011 at 11:13 PM

Hi, more specific I do the following:

- In my locally working project in Visual Studio: 'Build deployment package' with default settings -> zip is generated

- Copy zip to server

- On the server in IIS Manager:

Create a new website (Name WebApi, port 82, Path C:\inetpub\WebApi, Application Pool: ASP.NET v4.0). nb: there are other .NET 2.0 sites running on port 80 and 81

In the new site, do 'Import Application' with application path = 'WcfWebApi' and the rest default settings

Browse to http://localhost:82/WcfWebApi/contact  gets error 404:

Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:82/WcfWebApi/contact
Physical Path C:\inetpub\WebApi\WcfWebApi\contact
Logon Method Anonymous
Logon User Anonymous

'StaticFile' I suspect...

If I put a test.aspx in  C:\inetpub\WebApi\WcfWebApi\ it just works on http://localhost:82/WcfWebApi/test.aspx

Same procedure works allright with asp.net mvc 3/.NET 4. As far as I know all the latest software is installed.

Thanks for the help!

 

 

May 17, 2011 at 8:21 PM

Sorry, I'm not familiar with using the "build deployment package" -> "import application" process of deploying.  What happens if you manually deploy?  Same result?

Oct 29, 2011 at 10:33 AM

Did anyone find a solution to the problem described in this thread?

Nov 1, 2011 at 1:26 PM

Here is the solution to my problem:

http://wcf.codeplex.com/discussions/277562

Nov 1, 2011 at 1:55 PM

ah great thanks