none
WCF NetTcp service publishing problem RRS feed

  • Question

  • HI,

    I created a WCF NetTcp receive location. After I published it and tried to
    add the service reference or browse it, I got "root element is missing"
    error. Other than the detailed error message shown below, there is no other
    helpful errors or warnings. Any suggestions?  Thanks!

    Event Type: Error

    WebHost failed to process a request.
    Sender Information:
    System.ServiceModel.ServiceHostingEnvironment+HostingManager/33711845
    Exception: System.ServiceModel.ServiceActivationException: The service
    '****_RcvIN.svc' cannot be activated due to an exception during compilation. 
    The exception message is: Root element is missing.. --->
    System.Xml.XmlException: Root element is missing.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       at System.Xml.XmlReader.MoveToContent()
       at System.Xml.XmlReader.ReadStartElement(String name)
       at
    Microsoft.BizTalk.Adapter.Wcf.Metadata.ReceiveLocationProxy.ExtractProperties(String customCfg)
       at
    Microsoft.BizTalk.Adapter.Wcf.Metadata.ReceiveLocationProxy.CreateRLConfig()
       at
    Microsoft.BizTalk.Adapter.Wcf.Metadata.MexServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
       at
    System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
       at
    System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
       at
    System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
       --- End of inner exception stack trace ---
       at
    System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
       at
    System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
    Process Name: w3wp
    Process ID: 5368

    For more information, see Help and Support Center at
    http://go.microsoft.com/fwlink/events.asp.
    Tuesday, August 4, 2009 2:37 PM

All replies

  • I have gotten this error before in the same situation as you. Ironically, it usually occurs when the app pool identity for the published web service does not have access to the BizTalk databases. You usually need to modfy the app pool identity to be the one for the BizTalk isolated host account or the BizTalk host account or one that matches one of these in regards to group membership and permissions.

    I think the error could be better named - it is misleading what the actual problem is. The Process Name is helpful here - w3wp which is part of IIS.

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Wednesday, August 5, 2009 12:57 AM
    Moderator
  • Ben, thanks for the reply. However, I was actually using BizTalk isolated host account for the app pool. And, this app pool is being used by another Wcf ws-http service  which is working well. The difference here is that this is a NetTcp.
    Wednesday, August 5, 2009 3:49 PM
  • Sorry, I am a little confused. Are you hosting it in WAS?

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Thursday, August 6, 2009 3:20 PM
    Moderator
  • Nope. I have a single orchestration which is exposed as WCF service. This Service has two end points (i.e., two receive locations in BizTalk), one is Ws-http, one is NetTcp. Ws-Http one is working fine. This NetTcp one is givnig me problems. Hopefully, this is clearer to you. Thanks!
    Thursday, August 6, 2009 4:39 PM
  • I see what you mean. Are you by chance working with BizTalk 2006 R2 on IIS7 like on Windows Server 2008? I remember publishing a BizTalk orchestration as 2 WCF bindings and this would cause problems with IIS 7 and lead to some of the settings in IIS 7 being erased. Only BizTalk 2009 is supported on Windows Server 2008.

    From the stack trace it looks like it is opening the config file and then is not able to find the type referred to in the .svc file to expose the service. I would check in the .svc file - this might give you some more details on what to research to find the issue.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Friday, August 7, 2009 2:49 AM
    Moderator