locked
Assembly could not be load RRS feed

  • Question

  • Hi,

    I am creating a WCF service with a Silverlight CLient

    I added a reference to System.ServiceModel.PollingDuplex in Silverlight 3.

    I modified the web.config

    When I run, I am getting this error.

     

    Could not load file or assembly 'System.ServiceModel.PollingDuplex, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
    
    

    Please help.

    Thanks

    Wednesday, July 7, 2010 8:10 AM

Answers

  • Hi Jayesh,

    Is your web application(in which you host the silverlight and WCF service) hosted in IIS 7? If so, check the application pool of the application virtual directory. It is possible that the application pool is configured to use .NET framework 4.0 which cause the runtime looking for 4.0 version of the 'System.ServiceModel.PollingDuplex assembly.

    If your application is designed for .NET 3.5, just switch the application pool to .NET 2.0.

     #Specify a .NET Framework Version for an Application Pool (IIS 7)
    http://technet.microsoft.com/en-us/library/cc754523(WS.10).aspx

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Mog Liang Thursday, July 15, 2010 1:49 AM
    Thursday, July 8, 2010 11:18 AM

All replies

  • Hello!

    Maybe there is problem with target framework version. You may use 3.5 and try to load  assembly for 4.0.

    Wednesday, July 7, 2010 8:49 AM
  • Hi,

     

    I checked that and changed to 3.0.0.0 , it is now throwing this error:

     

    binding has invalid child element pollingDuplexHttpBinding

     

    Wednesday, July 7, 2010 8:58 AM
  • Hi Jayesh,

    Is your web application(in which you host the silverlight and WCF service) hosted in IIS 7? If so, check the application pool of the application virtual directory. It is possible that the application pool is configured to use .NET framework 4.0 which cause the runtime looking for 4.0 version of the 'System.ServiceModel.PollingDuplex assembly.

    If your application is designed for .NET 3.5, just switch the application pool to .NET 2.0.

     #Specify a .NET Framework Version for an Application Pool (IIS 7)
    http://technet.microsoft.com/en-us/library/cc754523(WS.10).aspx

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Mog Liang Thursday, July 15, 2010 1:49 AM
    Thursday, July 8, 2010 11:18 AM