Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - WCF - Contract name could not be found

 
 
Old 04-11-2007   #1 (permalink)
Sapnil


 
 

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 SpecsSystem Spec
Old 04-11-2007   #2 (permalink)
Marc Gravell


 
 

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 SpecsSystem Spec
Old 04-11-2007   #3 (permalink)
Sapnil


 
 

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 SpecsSystem Spec
Old 04-12-2007   #4 (permalink)
Arkady Frenkel


 
 

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 SpecsSystem Spec
Old 04-12-2007   #5 (permalink)
Arkady Frenkel


 
 

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 SpecsSystem Spec
Old 04-12-2007   #6 (permalink)
Sapnil


 
 

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 SpecsSystem Spec
Old 04-15-2007   #7 (permalink)
Arkady Frenkel


 
 

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

Thread Tools


Similar Threads
Thread Forum
Contract of Friendship Chillout Room


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46