當我嘗試創建的dotnet核2.0的WCF客戶端的連接,我收到一個平臺不支持的錯誤:WCF在.net中的核心(TransportWithMessageCredential)
System.PlatformNotSupportedException: 'The value 'TransportWithMessageCredential' is not supported in this context for the binding security property 'securityMode'.'
如果我刪除BasicHttpSecurityMode
,我收到參數異常: System.ArgumentException:'提供的URI方案'https'無效;預計'http'。''
代碼:
ChannelFactory<BlackBoxContract> factory = null;
BlackBoxContract serviceProxy = null;
Binding binding = null;
binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportWithMessageCredential);
factory = new ChannelFactory<BlackBoxContract>(binding, new EndpointAddress("https:......."));;
serviceProxy = factory.CreateChannel();
是任何人發現,因爲這可能是長遠路線圖解決方法? https://github.com/dotnet/wcf/issues/8
能WCF客戶端代碼進入一個面向.NET標準的類庫?然後你可以從.NET Core調用庫。這[SO回答](https://stackoverflow.com/a/45550508/444244)可能是相關的。 – Boggin
您是否使用WCF連接的服務? https://marketplace.visualstudio.com/items?itemName=WCFCORETEAM.VisualStudioWCFConnectedService – Tseng
WCF連接服務給我一個錯誤,出於同樣的原因。不支持,該錯誤信息只是略有不同.. https://github.com/dotnet/wcf/issues/1274 –