none
How to use WCF service references (.svc) instead of .aspx in productive server farms correctly RRS feed

  • Question

  • Hi guys,

    I have to develop a solution which uses the WCF service references (.svc) and replaces the old variant (.aspx). In the old solution were web service references to the .aspx files.

    First I created a proxy assembly like discribed here: http://msdn.microsoft.com/en-us/library/ff621594.aspx

    It worked... Now I'm thinking about how to develop my solution for productive servers. My idea is, that I add the .svc references like described here:

    http://msdn.microsoft.com/en-us/library/ee767691(office.14).aspx#pj14_DevelopingUsingWCF_ServiceRefs

    (http://localhost:32843/[GUID]/PSI/Project.svc)

    And replace the old references without the proxy assembly.

    I have the following problem:

    When I try to add the service reference I get the following error:

     

    The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

    The solution with the proxy assembly worked... Why does the way with the seperated references not work?

    What is the best practice method for using the .svc-way in productive server farms?

    Thank you very much in advance

    Björn

    Tuesday, November 22, 2011 2:33 PM

Answers

  • Take a look at the sample application (ProjTool) that ships with the Project Server 2010 SDK. 

    There are 2 things you need in your solution 1) a reference to the ProjectServerServices.DLL, and 2) an app.config file that defines your "endpoints" for the WCF services (also refer to the example in the SDK)

    Hope that helps.

     

     

    • Marked as answer by bbod Tuesday, December 20, 2011 1:51 PM
    Wednesday, November 23, 2011 12:03 AM
  • Also for a simpler example have a look at the Project Server 2010 SDK sample: WCFHelloProject_vs10_CfgEd, this one uses the uncompiled classes required (in place of the precomiled ProjectServerServices.DLL reference) and programatically sets the end points, to prevent any messy app.config configurations.

    http://msdn.microsoft.com/en-us/library/ms512767.aspx

    Either method works just as well as the next. ;)

     

    HTH,


    Martin Laukkanen (Project Server Blog - www.nearbaseline.com/blog)
    • Marked as answer by bbod Tuesday, December 20, 2011 1:51 PM
    Wednesday, November 23, 2011 11:26 PM

All replies

  • Take a look at the sample application (ProjTool) that ships with the Project Server 2010 SDK. 

    There are 2 things you need in your solution 1) a reference to the ProjectServerServices.DLL, and 2) an app.config file that defines your "endpoints" for the WCF services (also refer to the example in the SDK)

    Hope that helps.

     

     

    • Marked as answer by bbod Tuesday, December 20, 2011 1:51 PM
    Wednesday, November 23, 2011 12:03 AM
  • Also for a simpler example have a look at the Project Server 2010 SDK sample: WCFHelloProject_vs10_CfgEd, this one uses the uncompiled classes required (in place of the precomiled ProjectServerServices.DLL reference) and programatically sets the end points, to prevent any messy app.config configurations.

    http://msdn.microsoft.com/en-us/library/ms512767.aspx

    Either method works just as well as the next. ;)

     

    HTH,


    Martin Laukkanen (Project Server Blog - www.nearbaseline.com/blog)
    • Marked as answer by bbod Tuesday, December 20, 2011 1:51 PM
    Wednesday, November 23, 2011 11:26 PM
  • Hey! Thank you for your answers...

    So I need to generate server specific proxy classes in both ways?

    That means, everytime I want to install my solution on another server (test-system -> productive system) I have to generate specific proxy classes?

    Thank you

    Björn

    Thursday, December 1, 2011 4:23 PM