none
Developing PSI using WCF Error in browsing! RRS feed

  • Question

  • i tried to browse Project.svc from http://localhost:32843/6ae0a54e6313461c8144c3fbab329c15/PSI/Project.svc

    but i got 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.

    then i set IncludeExceptionDetailInFaults = true , but it shows the following error

    The service encountered an error.

    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)

    Any advice ...

    Thanks in advance

    • Moved by Alexander.BurtonModerator Tuesday, September 7, 2010 10:47 AM Moving to customisation and programming forum (From:Project Server General Questions and Answers)
    Tuesday, September 7, 2010 7:18 AM

Answers

  • Hi Mohamed,

    That behavior is by design in WCF-based service applications in SharePoint 2010, such as Project Web App. Project Server 2010 uses the front-end ProjectServer.svc to access all back-end services (such as Project.svc), through a proxy file or assembly for the PSI.

    More information about ProjectServer.svc is in Overview of WCF and the PSI. In particular, is the note:

    "In Project Server 2010, the Project Server service for Project Web App ([Program Files]\Common Files\Microsoft Shared\Web Server Extensions\14\isapi\PSI\ProjectServer.svc) acts only as a router for external access to PSI services on the computer running Project Server. Accordingly, ProjectServer.svc is disabled for publishing metadata. If you try to view http://ServerName/ProjectServerName/_vti_bin/psi/ProjectServer.svc in Internet Explorer, you get an error: The webpage cannot be found. This is normal behavior, and you should not try to enable metadata publishing for ProjectServer.svc."

    You can get the proxy files for all of the public Project Server services in the SDK download, and use the wcfProject.cs file in your application, or compile a PSI proxy assembly by using the script in the download. See Prerequisites for WCF-Based Code Samples.

    If you really want to show Project.svc in IE, you must temporarily swap out the PWA web.config file, as described in How to: Create a Proxy Assembly for WCF Services.

    That's the price we pay for moving to the more flexible and secure WCF services.

    --Jim

    • Marked as answer by Jim Corbin Wednesday, September 8, 2010 1:45 PM
    Tuesday, September 7, 2010 5:29 PM