[英]System.ServiceModel error Operation not supported when consuming WCF embedded in Windows Service in ASP.NET Core API
我必須重新設計一個應用程序。 The application was originally built in ASP.NET MVC Razor views with jQuery and consumed WCF embedded in Windows service at backend. 我必須使用 Angular 8 重新設計 ASP.Net Core API 中的應用程序。我必須在我的應用程序中使用相同的 WCF 服務,我無法更改它。 原始代碼是使用 System.ServiceModel 庫來初始化在原始應用程序中工作的 WCF 端點。 但是相同的代碼在 ASP.Net Core API 中給了我一個錯誤。 這是原始代碼。
public CleanupChannelFactory(string endpointConfigurationName, bool callInitializeEndpoint)
: base(typeof(TServiceContract))
{
if (callInitializeEndpoint)
InitializeEndpoint(endpointConfigurationName, null);
}
我在 InitializeEndpoint(endpointConfigurationName, null) 上收到錯誤。 endpointConfigurationName 包含名為 WCF Service 的端點。 我搜索了一些選項,發現 ASP.Net Core API 不支持 WCF 消耗。 有什么解決方法嗎?
謝謝
是的,wcf 服務在 .netcore 中受到很大限制。 這是.netcore 中支持的 wcf 功能,然后這是.netcore 中 wcf 的替代品。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.