none
WCF REST Deployment Problem RRS feed

  • Question

  • Hello,

    I'm relatively new to WCF and am close to getting something working that I can build upon, but my inexperience is holding me up in a couple areas.

    I used the online template WCF REST Service Template 40(CS) which on my workstation, compiles and behaves as expected.  I've even created a couple of hello world-ish endpoints and everything is good.

    Getting it to work on my IIS server is another thing.  I think I'm close, but I'm not there yet.

    My server is Windows Server 2003 R2 (IIS 6).  I have the .NET Framework 4 installed and I ran aspnet_regiis.  I am using VS 2010 Ultimate on my workstation, fyi.

    I have Published my service to the server via the filesystem (I'm on the same network as the server) and all the files seem to be where I expect them.

    I have created a .svc file manually (I'm not sure about this, but it seemed clear enough.

    My test URI does not work (nor does the help page), 400 Bad Request (remember this DOES work locally via VS).

    Interestingly, if I just point my browser at my .svc file I get a page identifying the page as a WCF service and talking about Metadata Publishing being disable for the site (I have no idea what that means).

    I suspect something to do with endpoints and perhaps my web.config file, but I'm just too new to this to be able to get it figured out.

    Friday, April 26, 2013 9:46 PM

Answers

  • Hi Steven james Frank,

    So can you now get a very simple helloworld  REST service deployed to the win2k3 iis 6 server correctly? And you also mentioned that when you use webbrowser to access the .svc file it displays well, correct?

    If you can get a helloworld REST service published correctly, it should be the same for you to publish a more complicated one(since the difference is only on the servie contract and implementation). If convenient, please show us the service code and web.config fragment so that we can take a quick look to see if there is any obvious problems in it.

    Always turn on includeExceptionDetailInFaults option when you debugging/testing the service. Then, when you use webbrowser to invoke the WebGet operations, if there is error, it will show details in webbrowser.

    <behaviors>
          <serviceBehaviors>
            <behavior>
     <!-- .... -->
    
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
    

    Here are some online threads talking about the similar topics:


    #How to Deploy WCF REST Services to IIS6
    http://thecuttingledge.com/?p=43

    #hosting .net 4.0 REST WCF service in IIS 6
    http://stackoverflow.com/questions/3367457/hosting-net-4-0-rest-wcf-service-in-iis-6


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, May 6, 2013 2:57 AM
    Moderator