[英]System.ServiceModel error Operation not supported when consuming WCF embedded in Windows Service in ASP.NET Core API
I have to redesign an application.我必须重新设计一个应用程序。 The application was originally built in ASP.NET MVC Razor views with jQuery and consumed WCF embedded in Windows service at backend.
The application was originally built in ASP.NET MVC Razor views with jQuery and consumed WCF embedded in Windows service at backend. I have to redesign the application in ASP.Net Core API with Angular 8. I have to use the same WCF services in my application I cannot change that.
我必须使用 Angular 8 重新设计 ASP.Net Core API 中的应用程序。我必须在我的应用程序中使用相同的 WCF 服务,我无法更改它。 The original code was use System.ServiceModel library to initialize WCF endpoints which is working in the original application.
原始代码是使用 System.ServiceModel 库来初始化在原始应用程序中工作的 WCF 端点。 But same code is giving me an error in ASP.Net Core API.
但是相同的代码在 ASP.Net Core API 中给了我一个错误。 This is the original code.
这是原始代码。
public CleanupChannelFactory(string endpointConfigurationName, bool callInitializeEndpoint)
: base(typeof(TServiceContract))
{
if (callInitializeEndpoint)
InitializeEndpoint(endpointConfigurationName, null);
}
I'm getting the error on InitializeEndpoint(endpointConfigurationName, null).我在 InitializeEndpoint(endpointConfigurationName, null) 上收到错误。 The endpointConfigurationName contains the endpoint of the name of WCF Service.
endpointConfigurationName 包含名为 WCF Service 的端点。 I've searched for a few options and found out that WCF consumption is not supported in ASP.Net Core API.
我搜索了一些选项,发现 ASP.Net Core API 不支持 WCF 消耗。 Is there any workaround to this?
有什么解决方法吗?
Thanks谢谢
Yes, the wcf service is greatly restricted in .netcore.是的,wcf 服务在 .netcore 中受到很大限制。 This is the wcf feature supported in .netcore , and then this is a replacement for wcf in .netcore .
这是.netcore 中支持的 wcf 功能,然后这是.netcore 中 wcf 的替代品。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.