2011-07-09 2 views
0

J'ai un service de repos WCF sur .Net 4.0 et ce service fonctionne bien lorsque j'utilise mon IIS local 7.5. Mais j'ai un paquet d'hébergement Web, quand je publie le service à eux recevoir une erreur d'application sans détailler le type d'erreur. Précédent J'ai édité d'autres genres de service de WCF sur. Net 4.0 et c'est OK. La société qui déploie le service est Arvixe J'ai contacté leur support et ils m'ont dit d'ajouter le gestionnaire à mon web.config. Mais cela ne marche pas encore.WCF Rest Deploy

Ceci est mon fichier web.config

<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> 

Ceci est mon journal de suivi quand je l'appelle une opération sur mon service WCF !!

System.ServiceModel Erreur: 131075: http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.ThrowingException.aspxThrowing un exception./LM/W3SVC/703/ROOT-3- 129547865876462000System.ArgumentException, mscorlib, Version = 4.0.0.0, Culture = neutre, PublicKeyToken = b77a5c561934e089Cette collection contient déjà une adresse avec le schéma http. Il peut y avoir au plus une adresse par schéma dans cette collection. Si votre service est hébergé dans IIS, vous pouvez résoudre le problème en définissant "system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled" sur "true" ou en spécifiant "system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters". Nom du paramètre: pièce à System.ServiceModel.UriSchemeKeyedCollection.InsertItem (indice Int32, point Uri) à 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 (point T) à System.ServiceModel.UriSchemeKeyedCollection..ctor (Uri [ ] adresses) à System.ServiceModel.ServiceHost..ctor (type serviceType, Uri [] baseAddresses) à System.ServiceModel.Activation.WebServiceHostFactory.CreateServiceHost (type serviceType, Uri [] baseAddresses) à System.ServiceModel.Activation. ServiceHostFactory.CreateServiceHost (String constructorString, Uri [] baseAddresses) à System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService (String normalizedVirtualPath) à System.ServiceModel.ServiceHostingEnvironment.Hostin gManager.ActivateService (String normalizedVirtualPath) à System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable (String normalizedVirtualPath) --- Fin de trace de pile d'exception interne --- à System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable (String normalizedVirtualPath) à System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast (String relativeVirtualPath) System.ServiceModel Erreur: 131074: http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.EventLog.aspxWrote au journal des événements. /LM/W3SVC/703/ROOT-3-129547865876462000WebHost5WebHostFailedToProcessRequest3221356547System.ServiceModel.Activation.HostedHttpRequestAsyncResult/37535352System.ServiceModel.ServiceActivationException: le service '/ForgetTrafficService.svc' ne peut pas être activé en raison d'une exception lors de la compilation. Le message d'exception est: Cette collection contient déjà une adresse avec le schéma http. Il peut y avoir au plus une adresse par schéma dans cette collection. Si votre service est hébergé dans IIS, vous pouvez résoudre le problème en définissant "system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled" sur "true" ou en spécifiant "system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters". Nom du paramètre: item. --- & gt; System.ArgumentException: Cette collection contient déjà une adresse avec le schéma http. Il peut y avoir au plus une adresse par schéma dans cette collection. Si votre service est hébergé dans IIS, vous pouvez résoudre le problème en définissant "system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled" sur "true" ou en spécifiant "system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters". Nom du paramètre: article à System.ServiceModel.UriSchemeKeyedCollection.InsertItem (indice Int32, point Uri) à System.Collections.Generic.SynchronizedCollection`1.Add (T item) à System.ServiceModel.UriSchemeKeyedCollection..ctor (Uri [] adresses) à System.ServiceModel.ServiceHost..ctor (type serviceType, Uri [] baseAddresses) à System.ServiceModel.Activation.WebServiceHostFactory.CreateServiceHost (type serviceType, Uri [] baseAddresses) à System.ServiceModel.Activation .ServiceHostFactory.CreateServiceHost (String constructorString, Uri [] baseAddresses) à System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService (String normalizedVirtualPath) à System.ServiceModel.ServiceHostingEnvironment.Hos tingManager.ActivateService (String normalizedVirtualPath) à System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable (String normalizedVirtualPath) --- Fin de trace de pile d'exception interne --- à System.Runtime.AsyncResult.End [TAsyncResult] (suite IAsyncResult at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End (résultat IAsyncResult)

+0

Ok Je Résoudre ces problèmes Je ne sais pas exactement pourquoi mais quand je supprime la balise mon service a commencé à fonctionner! – mastervv

Répondre

1

Il est vraiment difficile de conseiller quoi que ce soit sans savoir quelle erreur vous obtenez. J'ai permis à WCF traces de résoudre le problème plus loin, http://msdn.microsoft.com/en-us/library/ms733025.aspx

+1

Pouvez-vous regarder sur ma trace de journal! sa collection contient déjà une adresse avec le schéma http. Il peut y avoir au plus une adresse par schéma dans cette collection. Si votre service est hébergé dans IIS, vous pouvez résoudre le problème en définissant "system.serviceModel/serviceHostingEnvironment/multipleSiteBindingsEnabled" sur "true" ou en spécifiant "system.serviceModel/serviceHostingEnvironment/baseAddressPrefixFilters". Je ne sais pas et cela signifie !! – mastervv

+0

J'ai essayé de marquer ajouter l'attr sur la config web! – mastervv