-
Notifications
You must be signed in to change notification settings - Fork 559
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
Core 2.0 Issue in creation an instance of derived class of Client base for Consuming WCF service using System.servicemodel.Primitives #2293
Comments
Hi @pardhumeduri sorry for running into this. WCF on .NET Core does not support configuration, so as the error suggested, please choose other constructors of ClientBase that does not take configuration. |
Hi, @pardhumeduri I am glad you are able to make progress.
Certainly, you don't have to use the tool to generate the proxy code (using |
hi Zhenlan I have done the following steps
{System.InvalidOperationException: An error occurred while loading attribute 'OperationContractAttribute' on method 'test' in type 'TestService'. Please see InnerException for more details. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified. |
Good to see further progress. In your .NET Core 2.0 app, you should not reference assemblies from the full framework (eg. 4.5.2). May I know why you need to do this? |
we have some applications in .Net 4.5.2 which we is source for .Net Core 2.0 application. We get the MVC Models from .Net 4.5.2 which is common models for Core and .Net applications. we do not want re create model solution in core because if any changes done in source will not be in sync. hence we wanted to refer .Net 4.5.2 dlls in core 2.0 |
we have tested the .net4.5.2 dll reference in Core 2.0 web and console application we are able to use the models in them, however when we try to do the same with WCF services then we are facing system.servicemodel.dll" not found issue. |
@pardhumeduri this is because a shim that forwards WCF APIs from full framework to .NET Core was missing. We are rebuilding System.ServiceModel.Primitives package to include this shim (#2375) and hopefully, we can have the package released soon after testing etc. (in weeks). In the meanwhile, it will be great if you can give the package built out of master branch a try to see if it fixes your issue. |
@pardhumeduri we just released to nuget.org an update of https://www.nuget.org/packages/System.ServiceModel.Primitives/4.4.1-servicing-25917-01 |
Sure .. will try and update you back.
…On Nov 20, 2017 8:31 PM, "Zhenlan Wang" ***@***.***> wrote:
@pardhumeduri <https://github.com/pardhumeduri> we just released to
nuget.org an update of System.ServiceModel.Primitives package, which
contains the System.ServiceModel.dll shim you would need. Can you please
update your project to reference this package and see if it solves your
problem?
https://www.nuget.org/packages/System.ServiceModel.
Primitives/4.4.1-servicing-25917-01
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2293 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADLAxFdo5idQTACtGHYzmo2YHrEbvgQsks5s4ifogaJpZM4Pbk_n>
.
|
A stable version of |
The problem still is not solved |
@zhenlan This issue is still an issue even when referencing System.ServiceModels.Primitives >= 4.5.3. Any guidance on solving that issue. |
I solved this by explicitly specifying the binding and the endpointAddress. My understanding is; if given all parameters, there is no need to look for a configuration file - which is the culprit. This, of course, rests on the availabily of a constructor, which allows your to explicitly configuring the consumerclient. |
we don't want to go with proxy generation approach for consuming WCF services.
We have tried to call the WCF using System.servicemodel.Primitives and deriving from clientBase class.
however when we try to create instance of child class of Clientbase it is giving the following error
System.PlatformNotSupportedException: 'Configuration files are not supported.'
The text was updated successfully, but these errors were encountered: