locked
System.InvalidCastException: [A]ProfileCommon cannot be cast to [B]ProfileCommon RRS feed

  • Question

  • User911209228 posted

    Hi,

    I have asp.net Ajax application. I have a load balance server A,B and C.I have just copied the entire project  to IIS virtual directory path.

    When my application is working fine if my load balance server  is on A or C. but if my application on Load balance server B, getting an InvalidCastException , and the  error details as

    follows as,

    System.InvalidCastException: [A]ProfileCommon cannot be cast to [B]ProfileCommon. Type A originates from 'App_Code.gerhjby9, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\site1\72113dc4\e9d65023\App_Code.gerhjby9.dll'. Type B originates from 'App_Code.exfj_hx2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\site1\72113dc4\e9d65023\App_Code.exfj_hx2.dll'.

    How can fix this issue?.

    Thanks & regards,

    Dileep

    Sunday, February 17, 2019 7:33 AM

All replies