C# 带有命名管道的WPF和WCF
以下代码在WinForms中运行良好:C# 带有命名管道的WPF和WCF,c#,wpf,wcf,named-pipes,C#,Wpf,Wcf,Named Pipes,以下代码在WinForms中运行良好: if (System.Configuration.ConfigurationManager.AppSettings["Data.UseNamedPipes"] == "true") { AES.Cloud.DataAccessLayer.TheEDGEContext.UseLocalDb = true; string address = "net.pipe://localhost/" + Guid.NewGuid() + "/Da
if (System.Configuration.ConfigurationManager.AppSettings["Data.UseNamedPipes"] == "true")
{
AES.Cloud.DataAccessLayer.TheEDGEContext.UseLocalDb = true;
string address = "net.pipe://localhost/" + Guid.NewGuid() + "/DataManager";
var svc = AES.InProcFactory.CreateInstance<AES.Cloud.DataService.EstimatingDataService, AES.Cloud.DataService.IDataManager>(2147483647, 2147483647, address);
DataService<AES.TheEdge.Framework.Services.Contracts.IDataManager>._namedPipeAddress = address;
var ss = svc.GetNextKey(); //<-- Calling service here.
}
使用启动/主线程执行此类操作是否存在问题?困惑于木星
例外情况:
System.TimeoutException: This request operation sent to net.pipe://localhost/c1a59720-11fc-49c3-9d82-8185203a6f5d/DataManager did not receive a reply within the configured timeout (00:01:00). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.
我不知道从主线程调用命名管道有任何问题。您是否在执行此调用的同时执行任何其他任务或函数?我不知道还有其他任何事情发生,就像我说的,这比其他任何事情都更像WPF的症状。
System.TimeoutException: This request operation sent to net.pipe://localhost/c1a59720-11fc-49c3-9d82-8185203a6f5d/DataManager did not receive a reply within the configured timeout (00:01:00). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.