Silverlight enabled WCF Service error

Discussion in 'Site Programming, Development and Design' started by andyg, Apr 16, 2010.

  1. I get an error while trying to access a service.

    The type 'Service', provided as the Service attribute value in the ServiceHost directive could not be found.

    Someone know what kind of error this is? I have not found anything on google that worked...
     
  2. Ray

    Ray

    You have a URL we can look at?
     
  3. Ray

    Ray

    Did you upload all the necessary files/assemblies/components in your applications Bin folder. The error is stating that it is looking for something but cannot find it.

    The type 'GjermshusBizService', provided as the Service attribute value in the ServiceHost directive could not be found.
     
  4. I just used the publish.. function in vs2010.
    How can I control that everything is uploaded?

    it uploaded a svc file and the web.config file. It also uploaded a .dll file and a .pdb file into the bin directory.
     
  5. Is it possible to debug so I can find out what its looking for and where it trying to find it?
     
  6. Ray

    Ray

    Last edited by a moderator: Oct 14, 2015
  7. So there is no way I can figure out what file it cant find?
    I just have to try and fail until I figure it out?
     
  8. Ray

    Ray

  9. The Application start point did the trick!

    After I added a Application starting point I got the error: This collection already contains an address with scheme http

    I found help for that error on an other thread at this forum, so now everything works

    Thank you for the help!
     
  10. To make WCF services work on a shared environment .....

    a trick I learned from hosting on godaddy ... and have tested successfully on Winhost

    You have to remove a prefix from WCF calls so they connect ...

    So .. in your web.config file


    <system.serviceModel>
    ...
    <baseAddressPrefixFilters>
    <add prefix="http://www.Yourdomain.com/"/>
    </baseAddressPrefixFilters>
    </system.serviceModel>

    removes the noise and works for me
     
    Last edited by a moderator: Oct 14, 2015
  11. Ray

    Ray

    Did you mean removing this line...

    <add prefix="http://www.Yourdomain.com/"/>

    My understanding is that WCF cannot work without this.
     
  12. Silverlight 4 WCF access error

    My site is a Silverlight 4.0 app hosted in a Web App using .NET Framework 4.0

    Silverlight gets data from a WCF Service hosted in website-root/Services/eBiondaServices.svc.

    My site works fine in my development machine, but it won't at the host. First, I wanted to make sure I was able to hit the service from the browser

    http://ebiondac.w03.Winhost.com/Services/eBiondaServices.svc

    and I got this error:

    Parser Error Message: Unrecognized attribute 'multipleSiteBindingsEnabled'. Note that attribute names are case-sensitive.

    Source Error:

    Line 30: </behaviors>
    Line 31: <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
    Line 32: multipleSiteBindingsEnabled="true" />
    Line 33: <bindings>
    Line 34: <basicHttpBinding>


    Is there any setting I'm missing to set? I'm assuming once this error is fixed, I would be able to hit the wcf service from the xap silverlight file Thanks for the help

    Alex
     
    Last edited by a moderator: Oct 14, 2015
  13. removed but still not working

    I removed the 'bad' attribute, and it did not break me locally, so I won't miss it. I also set up myfolder "Service" as an application folder, as suggested in another thread I read.

    Now I'm getting this:
    [InvalidOperationException: The type 'eBionda.Web.Services.eBiondaServices', provided as the Service attribute value in the ServiceHost directive could not be found.]
    System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +4077562
    System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +11666348
    System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +42
    System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479

    [ServiceActivationException: The service '/services/eBiondaServices.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'eBionda.Web.Services.eBiondaServices', provided as the Service attribute value in the ServiceHost directive could not be found..]
    System.ServiceModel.AsyncResult.End(IAsyncResult result) +11536522
    System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
    System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
    System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +23
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


    Obviously it's related to the host server, since it's fine locally.

    The site is getting an error, which I can only imagine is the same as the one described.

    Any suggestion?

    Alex
     
  14. Application start point did not work for me

    Hi Andy,
    I'm having the same error you had, and did what worked for you, but wasn't that lucky. Any suggestion you may have for me to do?

    this is my service if you would like to try and see:

    http://ebiondac.w03.Winhost.com/Services/eBiondaServices.svc

    Wonder if the use of the secondary url might not be transparent with this issue.

    Thanks for the help
    Alex
     
    Last edited by a moderator: Oct 14, 2015
  15. Ray

    Ray

    Did you upload all the required files/components/assemblies in your applications Bin folder. This error...

    The type 'eBionda.Web.Services.eBiondaServices', provided as the Service attribute value in the ServiceHost directive could not be found.

    ...is pretty straight forward which means it cannot find something to make the application run.
     
  16. Ray

    Ray

    eBionda, this is a different error. Totally different from the original post. This error means that the application is looking for a file and it cannot find it.

    Exception Details: System.InvalidOperationException: The type 'eBionda.Web.Services.eBiondaServices', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

    Make sure you uploaded all the required files to your application Bin folder.
     
  17. Hey Ray
    I wish it was that easy... but I ftp'ed everything I have under my root in my local machine, including the dll and the pdb files under my bin dir.
    Seems to me it's being caused by something else, and not the absense of the right dll.

    Alex
     
  18. Agree 100% it seems I'm missing something. But I'm sending everything in the bin. And I know I sound like a broken record, but if the dll works locally, then there's got to be something else causing this.
    Any way to check the event viewer...
     
  19. Ray

    Ray

    Have you checked the web service your application is calling out to? It it accessible?

    The errors are quite clear on the matter.

    [ServiceActivationException: The service '/services/eBiondaServices.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'eBionda.Web.Services.eBiondaServices', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found..]

    Also check the address you are calling to. Since you are using "ebiondac.w03.Winhost.com" make sure the bindings are specifically coded to that address.
     
    Last edited by a moderator: Oct 14, 2015

Share This Page