我正在运行BizTalk 2013r2并遇到发布向导的问题。
我按照以下步骤使用了BizTalk WCF发布向导:
仅元数据端点(MEX),发布接收位置 将架构发布为WCF服务 更新Web服务描述树视图以提供单个单向Web方法 提供目标命名空间(当前使用http://tempuri.org/) 输入网站位置(使用localhost),选择覆盖现有位置,允许匿名访问 生成的服务摘要如下:
<?xml version="1.0" encoding="utf-16"?>
<WcfServiceDescription xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="BizTalkWcfService" TargetNamespace="http://tempuri.org/" xmlns="http://schemas.microsoft.com/BizTalk/2006/01/Adapter/Wcf/Publishing">
<LocationSettings Location="http://localhost/BTS-Store6" Overwrite="true" AuthAnonymous="true" />
<ApplicationSettings CreateReceiveLocations="false" ApplicationName="" />
<AdapterSettings AdapterName="" />
<MetadataSettings EnableMetadata="false" MetadataOnly="true" ReceiveLocationName="RcvStore6POS_WCF" />
<WcfServices>
<WcfService Name="OnRamp">
<WcfOperations>
<WcfOperation Name="POSTransaction" Flow="OneWay">
<WcfMessages>
<WcfMessage Name="Request" Direction="Input">
<WcfMessageType Category="XsdType" TypeName="BTS.GO.Store6.Schemas.BT.POSTranaction" AssemblyName="BTS.GO.Core.Store6.Schemas, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a9764041befeb8b" AssemblyLocation="C:\Windows\Microsoft.Net\assembly\GAC_MSIL\BTS.GO.Core.Store6.Schemas\v4.0_1.0.0.0__0a9764041befeb8b\BTS.GO.Core.Store6.Schemas.dll" TargetNamespace="http://BTE.ESB.StoreInputModel.POSTransaction" RootName="POS" IsAnyType="false" IsEnvelope="false" />
</WcfMessage>
</WcfMessages>
</WcfOperation>
</WcfOperations>
</WcfService>
</WcfServices>
</WcfServiceDescription>
问题是,在发布网站之后,我可以浏览到.svc,并使用WCF风暴来使用WSD - 一切都很好。但是,在离开它大约30分钟后 - 当我下次尝试访问该服务时,会抛出以下错误:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="System.ServiceModel 4.0.0.0"/>
<EventIDQualifiers="49154">3</EventID>
<Level>2</Level>
<Task>5</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2015-01-12T12:26:41.000000000Z"/>
<EventRecordID>293995</EventRecordID>
<Channel>Application</Channel>
<Computer>000alien004.gooutdoors.local</Computer>
<Security UserID="S-1-5-21-1638455640-2704731959-1606034848-1010"/>
</System>
<EventData>
<Data>System.ServiceModel.Activation.HostedHttpRequestAsyncResult/11812267</Data>
<Data>System.ServiceModel.ServiceActivationException: The service '/BTS-Store6/OnRamp.svc' cannot be activated due to an exception during compilation. The exception message is: Error in the application.. ---> System.ApplicationException: Error in the application. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext() at Microsoft.BizTalk.Adapter.Wcf.Metadata.ConfigurationInfo.GetReceiveLocation(String receiveLocationName) at Microsoft.BizTalk.Adapter.Wcf.Metadata.MexServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) --- End of inner exception stack trace --- at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)</Data>
<Data>w3wp</Data>
<Data>21772</Data>
</EventData>
</Event>
异常消息含糊不清,如“应用程序中的错误......”我对可能造成这种情况的原因感到茫然。我已经尝试了很多次。通常,但并非总是如此,从向导重新发布站点后,我可以浏览到该服务。后来,由于只有经过的时间是一个变化的因素,它失败了。
有什么想法吗?