WCF Service Publishing - Metadata

Hi,

I've been trough the steps to publish the metadata for a Receive Location with transport type WCF-Net Tcp.

The web method is defined as One-way and has a small schema defined for the Request (Input) message as below:

Code Snippet

<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns:b="
http://schemas.microsoft.com/BizTalk/2003" xmlns="http://BizTalk_Server_Project1.Schema1" targetNamespace="http://BizTalk_Server_Project1.Schema1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Root">
<xs:complexType>
<xs:sequence>
<xs:element name="Field" type="xs:int" />
<xs:element name="Field2" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

This publishes to to the local IIS however when browsing in ie to get the WSDL to obtain the metadata the following exception occurs....

Root element is missing.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Xml.XmlException: Root element is missing.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[XmlException: Root element is missing.]

System.Xml.XmlTextReaderImpl.Throw(Exception e) +87

System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res) +109

System.Xml.XmlTextReaderImpl.ParseDocumentContent() +1906981

System.Xml.XmlTextReaderImpl.Read() +38

System.Xml.XmlReader.MoveToContent() +70

System.Xml.XmlReader.ReadStartElement(String name) +22

Microsoft.BizTalk.Adapter.Wcf.Metadata.ReceiveLocationProxy.ExtractProperties(String customCfg) +124

Microsoft.BizTalk.Adapter.Wcf.Metadata.ReceiveLocationProxy.CreateRLConfig() +29

Microsoft.BizTalk.Adapter.Wcf.Metadata.MexServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +325

System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +698

System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +31

System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +445

[ServiceActivationException: The service '/BizTalkWcfService99/Service1.svc' cannot be activated due to an exception during compilation.The exception message is: Root element is missing..]

System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +962

System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) +419

System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() +260

System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() +760

System.ServiceModel.Activation.HostedHttpModuleRequestAsyncResult.BeginRequest() +178

System.ServiceModel.Activation.HttpModule.StartBeginProcessRequest(Object sender, EventArgs e, AsyncCallback cb, Object extraData) +70

System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +195

System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

What xml is it referring to, how can I diagnose the problem?

Thanks in advance

BenECM

[16340 byte] By [BenECM] at [2008-1-7]
# 1

Check to make sure your IIS Virtual Directory is running ASP.NET 2.0 and not ASP.NET 1.1.

To do this goto->IIS MMC Snap in-> Default Web Site-> (Site that's having the problem)-> Properties-> ASP.NET Tab-> and verify that it's ASP.NET 2.0.

HTH

DwightGoins at 2007-10-2 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 2

This releates to the permision level of ASPNET to handle the request.

Looking in the event log provided information and a solution.

Error (Exception displayed)

WebHost failed to process a request.

Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/11809597

Exception: System.ServiceModel.ServiceActivationException: The service '/BizTalkWcfServiceABC/Service1.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.

Prior Warning

Access denied. The client user must be a member of one of the following accounts to perform this function.

SSO Administrators: SSO Administrators

SSO Affiliate Administrators: SSO Affiliate Administrators

Application Administrators: BizTalk Server Administrators

Application Users: -

Additional Data: MACHINEA\ASPNET {B7B461CA-A6C1-4F26-9541-4EA06F064519} WCF-NetTcp_RL_BizTalkServerApplication_{B7B461CA-A6C1-4F26-9541-4EA06F064519}

BenECM at 2007-10-2 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...