mkus
mkus

Reputation: 3487

Configuration-Based Activation Problem In My Wcf Service

I want to use new .Net framework 4.0 feature "Configuration-Based Activation".

I wrote that lines into web.config.

<system.serviceModel>
     <serviceHostingEnvironment>
        <serviceActivations>
           <add factory="MyCompany.Core.Hosting.WcfHostFactory" relativeAddress="Greeting.svc" service="MyCompany.Core.Services.GreetingService, MyCompany.Core.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=1ccaa18r85yu07a4"/> 
        </serviceActivations>
     </serviceHostingEnvironment>
</system.serviceModel>

But when I try to browse http://localhost/MyCompany.Core/Greeting.svc, the browser says "The resource cannot be found. HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly."

How can I solve that problem?

Thanks for your help.

Upvotes: 0

Views: 762

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364299

check that your site is configured correctly and that URL points to correct resource. HTTP 404 is not related to activation configuration. If there could be any problem with activation you should get HTTP 500.

Did you define any endpoints for your service? If so check that http endpoint is also defined. If you didn't define any endpoints check that site has http binding configured.

Best regards, Ladislav

Upvotes: 1

Related Questions