![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | WCF - Contract name could not be found Hi, I get the following error when I try to access *.svc file "The contract name 'WCFService.IHello1' could not be found in the list of contracts implemented by the service 'HelloService'. " Stack Trace: [InvalidOperationException: The contract name 'WCFService.IHello1' could not be found in the list of contracts implemented by the service 'HelloService'.] System.ServiceModel.Description.ConfigLoader.LookupContract(String contractName, String serviceName) +4321718 System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress) +175 System.ServiceModel.ServiceHostBase.ApplyConfiguration() +146 System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses) +182 System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses) +236 System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) +28 System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +323 System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +698 System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +31 System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +445 [ServiceActivationException: The service '/WCFService/FirstWCFService.svc' cannot be activated due to an exception during compilation. The exception message is: The contract name 'WCFService.IHello1' could not be found in the list of contracts implemented by the service 'HelloService'..] 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.HttpHandler.ProcessRequest(HttpContext context) +43 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64 Any ideas? Sapnil |
My System Specs![]() |
| | #2 (permalink) |
| | Re: WCF - Contract name could not be found 2 things to look at first: a: does HelloService actually implement IHello1 b: is IHello1 marked [ServiceContract], with methods marked [OperationContract]? Marc |
My System Specs![]() |
| | #3 (permalink) |
| | Re: WCF - Contract name could not be found a: does HelloService actually implement IHello1 - yes b: is IHello1 marked [ServiceContract], with methods marked [OperationContract]? Yes I also tried to run the WCF samples available on MSDN, but I get the same error Sapnil "Marc Gravell" wrote: > 2 things to look at first: > a: does HelloService actually implement IHello1 > b: is IHello1 marked [ServiceContract], with methods marked > [OperationContract]? > > Marc > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: WCF - Contract name could not be found Do you have inetpub directory set as wcf demand , just a hint ? Arkady "Sapnil" <Sapnil@discussions.microsoft.com> wrote in message news:7277C3C4-477A-44C5-8E39-41D27BF7C23C@microsoft.com... > a: does HelloService actually implement IHello1 - yes > b: is IHello1 marked [ServiceContract], with methods marked > [OperationContract]? Yes > > I also tried to run the WCF samples available on MSDN, but I get the same > error > > Sapnil > > "Marc Gravell" wrote: > >> 2 things to look at first: >> a: does HelloService actually implement IHello1 >> b: is IHello1 marked [ServiceContract], with methods marked >> [OperationContract]? >> >> Marc >> >> >> |
My System Specs![]() |
| | #5 (permalink) |
| | Re: WCF - Contract name could not be found I mean did all from http://msdn2.microsoft.com/en-us/library/ms751527.aspx done ? Arkady "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message news:eZYwWtMfHHA.3648@TK2MSFTNGP05.phx.gbl... > Do you have inetpub directory set as wcf demand , just a hint ? > Arkady > > "Sapnil" <Sapnil@discussions.microsoft.com> wrote in message > news:7277C3C4-477A-44C5-8E39-41D27BF7C23C@microsoft.com... >> a: does HelloService actually implement IHello1 - yes >> b: is IHello1 marked [ServiceContract], with methods marked >> [OperationContract]? Yes >> >> I also tried to run the WCF samples available on MSDN, but I get the same >> error >> >> Sapnil >> >> "Marc Gravell" wrote: >> >>> 2 things to look at first: >>> a: does HelloService actually implement IHello1 >>> b: is IHello1 marked [ServiceContract], with methods marked >>> [OperationContract]? >>> >>> Marc >>> >>> >>> > > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: WCF - Contract name could not be found Yes, I have done every thing mentioned in the article. I am facing this problem only when I try to host the service in IIS Self hosting works fine Regards, Sapnil "Arkady Frenkel" wrote: > I mean did all from http://msdn2.microsoft.com/en-us/library/ms751527.aspx > done ? > Arkady > > "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message > news:eZYwWtMfHHA.3648@TK2MSFTNGP05.phx.gbl... > > Do you have inetpub directory set as wcf demand , just a hint ? > > Arkady > > > > "Sapnil" <Sapnil@discussions.microsoft.com> wrote in message > > news:7277C3C4-477A-44C5-8E39-41D27BF7C23C@microsoft.com... > >> a: does HelloService actually implement IHello1 - yes > >> b: is IHello1 marked [ServiceContract], with methods marked > >> [OperationContract]? Yes > >> > >> I also tried to run the WCF samples available on MSDN, but I get the same > >> error > >> > >> Sapnil > >> > >> "Marc Gravell" wrote: > >> > >>> 2 things to look at first: > >>> a: does HelloService actually implement IHello1 > >>> b: is IHello1 marked [ServiceContract], with methods marked > >>> [OperationContract]? > >>> > >>> Marc > >>> > >>> > >>> > > > > > > > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: WCF - Contract name could not be found That's strange because that article exactly for IIS, do IIS service run at all ? Arkady "Sapnil" <Sapnil@discussions.microsoft.com> wrote in message news:9E7F0A62-70BB-4D8E-8B70-A2DC56B871A1@microsoft.com... > Yes, I have done every thing mentioned in the article. > > I am facing this problem only when I try to host the service in IIS > Self hosting works fine > > Regards, > > Sapnil > > "Arkady Frenkel" wrote: > >> I mean did all from >> http://msdn2.microsoft.com/en-us/library/ms751527.aspx >> done ? >> Arkady >> >> "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message >> news:eZYwWtMfHHA.3648@TK2MSFTNGP05.phx.gbl... >> > Do you have inetpub directory set as wcf demand , just a hint ? >> > Arkady >> > >> > "Sapnil" <Sapnil@discussions.microsoft.com> wrote in message >> > news:7277C3C4-477A-44C5-8E39-41D27BF7C23C@microsoft.com... >> >> a: does HelloService actually implement IHello1 - yes >> >> b: is IHello1 marked [ServiceContract], with methods marked >> >> [OperationContract]? Yes >> >> >> >> I also tried to run the WCF samples available on MSDN, but I get the >> >> same >> >> error >> >> >> >> Sapnil >> >> >> >> "Marc Gravell" wrote: >> >> >> >>> 2 things to look at first: >> >>> a: does HelloService actually implement IHello1 >> >>> b: is IHello1 marked [ServiceContract], with methods marked >> >>> [OperationContract]? >> >>> >> >>> Marc >> >>> >> >>> >> >>> >> > >> > >> >> >> |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Contract of Friendship | Chillout Room | |||