2011-07-09 14 views
0

.Net 4.0でWCF Restサービスを使用しましたが、ローカルIIS 7.5を使用するとこのサービスは正常に動作します。しかし、私はWebホスティングパッケージを持っています。彼らにサービスを公開すると、エラータイプのエラーメッセージが表示されます。前のセクションでは、.Net 4.0の他の種類のWCFサービスを公開しています。サービスを展開する会社はArvixeです。彼らのサポートに連絡して、ハンドラをweb.configに追加するように指示しました。しかし、これは再び働かない。WCF Rest Deploy

これは私が私のWCFサービスの操作を呼び出すときにこれは私のトレースログで

<validation validateIntegratedModeConfiguration="false"/> 

<modules runAllManagedModulesForAllRequests="true"> 
    <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
</modules> 

<handlers> 
    <!-- Make sure we can use this handler for any URL because we're using ReST. The default is 
     for it to be used only for .svc --> 
    <remove name="svc-Integrated-4.0" /> 
    <add name="svc-Integrated-4.0" path="*" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" /> 

    <add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 

</handlers> 

私のweb.configファイルです!

System.ServiceModelエラー:131075:http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.ThrowingException.aspx例外の発生./LM/W3SVC/703/ROOT-3- 129547865876462000System.ArgumentException、mscorlib、Version = 4.0.0.0、Culture = neutral、PublicKeyToken = b77a5c561934e089このコレクションには、すでにスキームhttpのアドレスが含まれています。このコレクションには、スキームごとに最大1つのアドレスが存在します。サービスがIISでホストされている場合は、 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled'をtrueに設定するか、 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'を指定して問題を解決できます。 パラメータ名:System.ServiceModel.UriSchemeKeyedCollection..ctorでSystem.Collections.Generic.SynchronizedCollection 1.Add(T item) at System.ServiceModel.UriSchemeKeyedCollection..ctor(Uri[] addresses) at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses) at System.ServiceModel.Activation.WebServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) at System.ServiceModel.Activation.ServiceHostFactory.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) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state) at System.ServiceModel.AspNetPartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequestWithFlow(Object state) at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped) at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP) </StackTrace><ExceptionString>System.ArgumentException: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'. Parameter name: item</ExceptionString></Exception></TraceRecord> System.ServiceModel Error: 131074 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error"><TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.EventLog.aspx</TraceIdentifier><Description>Wrote to the EventLog.</Description><AppDomain>/LM/W3SVC/703/ROOT-3-129547865876462000</AppDomain><ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/DictionaryTraceRecord"><CategoryID.Name>WebHost</CategoryID.Name><CategoryID.Value>5</CategoryID.Value><InstanceID.Name>WebHostFailedToProcessRequest</InstanceID.Name><InstanceID.Value>3221356547</InstanceID.Value><Value0>System.ServiceModel.ServiceHostingEnvironment+HostingManager/50346327</Value0><Value1>System.ServiceModel.ServiceActivationException: The service '/ForgetTrafficService.svc' cannot be activated due to an exception during compilation. The exception message is: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'. Parameter name: item. ---&amp;gt; System.ArgumentException: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. If your service is being hosted in IIS you can fix the problem by setting 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled' to true or specifying 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'. Parameter name: item at System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index, Uri item) at System.Collections.Generic.SynchronizedCollection 1.Add(Tアイテム) (URI [におけるSystem.ServiceModel.UriSchemeKeyedCollection.InsertItemの項目(のInt32インデックス、ウリアイテム) System.ServiceModel.ActivationでSystem.ServiceModel.Activation.WebServiceHostFactory.CreateServiceHost(タイプのServiceType、ウリ[] baseAddresses)でSystem.ServiceModel.ServiceHost..ctorで】アドレス) (タイプのServiceType、URIは[] baseAddresses) 。 ServiceHostFactory.CreateServiceHost(String constructorString、Uri [] baseAddresses) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.Hostin System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailableでSystem.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(文字列normalizedVirtualPath) ---内部例外スタックトレースの終わり--- でgManager.ActivateService(文字列normalizedVirtualPath) (文字列normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) System.ServiceModelエラー:131074:http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.EventLog.aspxがEventLogに書き込まれました。 /LM/W3SVC/703/ROOT-3-129547865876462000WebHost5WebHostFailedToProcessRequest3221356547System.ServiceModel.Activation.HostedHttpRequestAsyncResult/37535352System.ServiceModel.ServiceActivationException:サービス '/ForgetTrafficService.svc'をアクティブ化できませんコンパイル中に例外が発生したためです。例外メッセージは次のとおりです。このコレクションにはすでにスキームhttpのアドレスが含まれています。このコレクションには、スキームごとに最大1つのアドレスが存在します。サービスがIISでホストされている場合は、 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled'をtrueに設定するか、 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'を指定して問題を解決できます。 パラメータ名:item。 --- & gt; System.ArgumentException:このコレクションにはすでにスキームhttpのアドレスが含まれています。このコレクションには、スキームごとに最大1つのアドレスが存在します。サービスがIISでホストされている場合は、 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled'をtrueに設定するか、 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'を指定して問題を解決できます。 パラメータ名:項目 System.ServiceModel.UriSchemeKeyedCollection.InsertItem(のInt32インデックス、ウリアイテム)System.ServiceModel.UriSchemeKeyedCollection..ctorでSystem.Collections.Generic.SynchronizedCollection`1.Add(Tアイテム) で(URIでSystem.ServiceModel.Activationの )で をSystem.ServiceModel.ServiceHost..ctor(タイプserviceType、Uri [] baseAddresses) でSystem.ServiceModel.Activation.WebServiceHostFactory.CreateServiceHost(type serviceType、Uri [] baseAddresses)に設定します。 .ServiceHostFactory.CreateServiceHost(String constructorString、Uri [] baseAddresses) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.Hos System.Runtime.AsyncResult.End [TAsyncResult](たIAsyncResult結果でSystem.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(文字列normalizedVirtualPath) ---内部例外スタックトレースの終了時tingManager.ActivateService(文字列normalizedVirtualPath) --- ) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)

+0

私はこの問題を解決します。理由はわかりませんが、というサービスタグが削除されました。 – mastervv

答えて

1

どのようなエラーが発生しているかわからずにアドバイスすることは本当に困難です。 http://msdn.microsoft.com/en-us/library/ms733025.aspx

+1

私のログトレースを見ることはできますか?彼のコレクションにはすでにスキームhttpのアドレスが含まれています。このコレクションには、スキームごとに最大1つのアドレスが存在します。サービスがIISでホストされている場合は、 'system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled'をtrueに設定するか、 'system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters'を指定して問題を解決できます。私は知りませんが、この意味! – mastervv

+0

私は、web configにattr を追加しようとしました! – mastervv