none
Using PSI with WCF - error 503 RRS feed

  • Question

  • Hi,

    I'm trying to connect to the PSI using wcf. I'm following the  Walkthrough: Developing PSI Applications Using WCF at http://msdn.microsoft.com/en-us/library/ee767691.aspx#pj14_DevelopingUsingWCF_CompleteCode and the "How to: Create a Proxy Assembly for WCF Services" at http://msdn.microsoft.com/en-us/library/ff621594.aspx#pj14_CreateProxyAssembly_Changes and "Prerequisites for WCF-Based Code Samples" at http://msdn.microsoft.com/en-us/library/ee872368.aspx.

    In all cases when I use the psi url to add a reference to the wcf I get the following error:

    There was an error downloading 'http://localhost:32843/psi/project.svc'.
    The request failed with HTTP status 503: Service Unavailable.
    Metadata contains a reference that cannot be resolved: 'http://localhost:32843/psi/project.svc'.
    The HTTP service located at http://localhost:32843/psi/project.svc is too busy.
    The remote server returned an error: (503) Server Unavailable.
    If the service is defined in the current solution, try building the solution and adding the service reference again."

    I've tried iisreset again, checking permissions (I'm using the administrator), using the asmx url but nothing helps.

    What am I doing wrong?

     

     Ive changed the includeExceptionDetailInFaults to true and following is the detailed error:

    There was an error downloading 'http://localhost:32843/e793cadf7e0444f69ba8cc6cd4916a71/PSI/resource.svc'.
    The request failed with the error message:
    --
    <HTML><HEAD><STYLE type="text/css">#content{ FONT-SIZE: 0.7em; PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP: 0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE><TITLE>Service</TITLE></HEAD><BODY><DIV id="content"><P class="heading1">Service</P><BR/><P class="intro">The service encountered an error.</P><PRE>An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
    System.InvalidOperationException: An exception was thrown in a call to a policy export extension.
    Extension: System.ServiceModel.Channels.TransportSecurityBindingElement
    Error: Security policy export failed. The binding contains a TransportSecurityBindingElement but no transport binding element that implements ITransportTokenAssertionProvider. Policy export for such a binding is not supported. Make sure the transport binding element in the binding implements the ITransportTokenAssertionProvider interface. ----> System.InvalidOperationException: Security policy export failed. The binding contains a TransportSecurityBindingElement but no transport binding element that implements ITransportTokenAssertionProvider. Policy export for such a binding is not supported. Make sure the transport binding element in the binding implements the ITransportTokenAssertionProvider interface.
       at System.ServiceModel.Channels.TransportSecurityBindingElement.System.ServiceModel.Description.IPolicyExportExtension.ExportPolicy(MetadataExporter exporter, PolicyConversionContext policyContext)
       at System.ServiceModel.Description.MetadataExporter.ExportPolicy(ServiceEndpoint endpoint)
       --- End of inner ExceptionDetail stack trace ---
       at System.ServiceModel.Description.ServiceMetadataBehavior.MetadataExtensionInitializer.GenerateMetadata()
       at System.ServiceModel.Description.ServiceMetadataExtension.EnsureInitialized()
       at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.InitializationData.InitializeFrom(ServiceMetadataExtension extension)
       at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.GetInitData()
       at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.TryHandleDocumentationRequest(Message httpGetRequest, String[] queries, Message& replyMessage)
       at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.ProcessHttpRequest(Message httpGetRequest)
       at SyncInvokeGet(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</PRE></DIV></BODY></HTML>
    --.
    Metadata contains a reference that cannot be resolved: 'http://localhost:32843/e793cadf7e0444f69ba8cc6cd4916a71/PSI/resource.svc'.
    Metadata contains a reference that cannot be resolved: 'http://localhost:32843/e793cadf7e0444f69ba8cc6cd4916a71/PSI/resource.svc'.
    If the service is defined in the current solution, try building the solution and adding the service reference again. 

     


    Id
    Wednesday, July 14, 2010 6:27 PM

Answers

All replies

  • I found the problem. I re-entered the credentials of the user running the app-pool


    Id
    Thursday, July 15, 2010 6:44 PM
  • Hi,

    I am facing the same error but didnt get how you resolved it. Can you please explain how did u get to solve this problem

    Thanks

    Friday, December 17, 2010 1:37 PM
  • There are three ways to get a reference for WCF PSI services.

    1-You can edit the web.config file to add a service ref through visual studio. Not recommended for PROD. At this time you can browse the service using a web browser. No other time, disabled front door by default see the documentation. Re enable original web.config for WCF after you add reference.

    2-You can compile the proxy classes using the SDK script and then add them to your VS 2010 solution

    3- Compile a projectserverservices.dll assembly using the SDK (instructions therein) and then add this to your solution.

     

    ps the backdoor uses the GUID of the project server services application in the URL if you use step 1.

    Ray

    Friday, December 17, 2010 4:46 PM
  • geo_d,

    Go to the IIS management screen. Find the app pool that runs the PSI (under your project server guid). In advanced settings re-enter the user name and password for the user who runs the app pool. In my case, someone chagned the user password so the app pool never run.

     

    Id


    Id
    Saturday, December 18, 2010 1:33 PM
  • I am also getting the same error, i changed the credential but still its giving the same error.

    When i am trying to add reference like http://Project-ServerName/_vti_bin/psi/project.asmx?wsdl its able to access but when when i am trying to add like

    http://Project-serverName:32843/5c5740cc018f45538cc77a851fdaa6b3/PSI/Project.svc it is giving error "The request failed with HTTP status 503: Service Unavailable." Can you please help me to find the issue. I am new for WCF and PSI. Your help will be highly appreciated.

    Monday, December 27, 2010 3:39 PM
  • can you please let me know easiest and best way to add PSI refernece. I am not able to add reference.
    Monday, December 27, 2010 3:41 PM
  • Bagish M,

    I tried all the different ways to add the service reference. The best one to use is compiling the proxy classes using the SDK script and then adding them to your VS 2010 solution unless you need to use another service for its other benefits. This is the easiest and simplest because the script generates a dll file that you need to add your project as a reference by browsing the location of this dll and thats it. All service functions are then available for use. There is no need to modify the web.config or change anything else.

    Friday, January 14, 2011 12:38 PM