Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.ServiceModel.Description.TypeLoader.AddBehaviorsAtOneScope #3384

Closed
antsaia opened this issue Feb 7, 2019 · 9 comments
Closed

System.ServiceModel.Description.TypeLoader.AddBehaviorsAtOneScope #3384

antsaia opened this issue Feb 7, 2019 · 9 comments
Assignees
Labels
feature request Adding new functionality requiring adding an API to the public contract.

Comments

@antsaia
Copy link

antsaia commented Feb 7, 2019

I'm referencing these libraries in a .NETCORE2.0 project built to run on AWS Lambda. I need to get this working and wondering if you have any suggestions.

I'm getting an error that Operation is not supported on this platform.: PlatformNotSupportedException
at System.ServiceModel.Description.TypeLoader.AddBehaviorsAtOneScope[IBehavior,TBehaviorCollection](Type type, TBehaviorCollection descriptionBehaviors, ServiceInheritanceCallback2 callback) at System.ServiceModel.Description.TypeLoader.AddBehaviors(ContractDescription contractDesc, Type implType, Boolean implIsCallback, ContractReflectionInfo reflectionInfo) at System.ServiceModel.Description.TypeLoader.LoadContractDescriptionHelper(Type contractType, Type serviceType, Object serviceImplementation) at System.ServiceModel.Description.TypeLoader.LoadContractDescription(Type contractType) at System.ServiceModel.Description.ContractDescription.GetContract(Type contractType) at Microsoft.Xrm.Sdk.WebServiceClient.WebProxyClient1.CreateBaseServiceEndpoint(Uri serviceUrl, TimeSpan timeout)
at Microsoft.Xrm.Sdk.WebServiceClient.WebProxyClient1.CreateServiceEndpoint(Uri serviceUrl, Boolean useStrongTypes, TimeSpan timeout, Assembly strongTypeAssembly) at Microsoft.Xrm.Sdk.WebServiceClient.WebProxyClient1..ctor(Uri serviceUrl, Boolean useStrongTypes)

@Lxiamail
Copy link
Member

@antsaia Can you provide the repro program which ran into the issue?

@Lxiamail Lxiamail added this to the Future milestone Feb 16, 2019
@rstraszewski
Copy link

I had similiar problem, when I had contract with contract behavior as attribute. When I configured behavior in code (on channel factory), the problem was gone.

@Lxiamail
Copy link
Member

@rstraszewski Can you share a simple repro?

@rstraszewski
Copy link

@Lxiamail
https://github.com/rstraszewski/WcfCoreTestClient/blob/master/WcfCoreTestClient/Program.cs

It would be great, if it also worked for attributes - in our company, most of behaviors is set this way. It would make migration to .net core much easier.

@samlh
Copy link

samlh commented Feb 25, 2019

It would also be fine if we could disable the error message, and add the behavior manually, so that we could still use existing service definitions without having to make changes to the services.

@rstraszewski
Copy link

Yep, ignoring attributes, instead throwing exceptions also would be ok - it would make migration simpler.

@rstraszewski
Copy link

@Lxiamail
Any plans regarding support of attribute based behaviors?

@Lxiamail Lxiamail added the bug This is a product bug. label Mar 1, 2019
@Lxiamail Lxiamail modified the milestones: Future, 3.0 Mar 1, 2019
@Lxiamail
Copy link
Member

Lxiamail commented Mar 1, 2019

@rstraszewski Hope we can support it in the next release.

@Lxiamail Lxiamail self-assigned this Apr 1, 2019
@Lxiamail Lxiamail added feature request Adding new functionality requiring adding an API to the public contract. and removed bug This is a product bug. labels Apr 1, 2019
@Lxiamail
Copy link
Member

Lxiamail commented Apr 9, 2019

The fix has been checked in by #3529

@Lxiamail Lxiamail closed this as completed Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Adding new functionality requiring adding an API to the public contract.
Projects
None yet
Development

No branches or pull requests

4 participants