What are the challenges you face when working across database platforms? Take the survey
Options

WCF service fails on Smart Build Assembly

walter verhoevenwalter verhoeven Posts: 4
edited March 15, 2017 3:27PM in SmartAssembly
Hi There

I have an issue I can't seem to solve by myself.
On the release build, without smart assembly I have no issues, with smart assembly i get
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(System.ServiceModel.Description.ServiceEndpoint, System.String)



When I run the WCF Host using the version build with Smart Assembly, and the normal release build all if fine, just the client with smart assembly build crashes.
the {SA} crash report tells me:
System.InvalidOperationException: Could not find default endpoint element that references contract '{ApplicationName}.WCF.Interfaces.ICommunicationService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

why is this, the app.config files are the same... and I used ASCII just to be sure thats not the issue...

Walter

Comments

  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi Walter, thanks for your post and sorry to hear you're running into an issue!

    Just to confirm, is '{ApplicationName}.WCF.Interfaces.ICommunicationService' a type that exists in the assembly that you've obfuscated?

    I suspect that the application may be using reflection to find '{ApplicationName}.WCF.Interfaces.ICommunicationService' at runtime, but this is failing because this type name has been obfuscated and no longer exists. Can you kindly try excluding the type from obfuscation, either via the "Exclusions" link button in the obfuscation sections, or by adding the [DoNotObfuscateType] custom attribute to your code?

    Please let me know should that help or not!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • Options
    Hi Jessica

    Yes, sure it does, the project compiles fine, all dependent assemblies are integrated.

    Walter
  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi Walter,

    Thanks for your reply!

    Just to make sure I'm understanding correctly, do you mean that exlcuding{ApplicationName}.WCF.Interfaces.ICommunicationService from obfuscation resolved the error?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • Options
    i do not know when it works, it doesnt work with SmartAssembly, I have un-installed and removed the product, i use another provider and have no issues
  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi Walter,

    So sorry to hear it's come to that!

    If you ever want to give SmartAssembly another try, please let us know here and we can look further into the issues!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.