質問編集履歴
3
追記及び解決策
title
CHANGED
File without changes
|
body
CHANGED
@@ -71,7 +71,7 @@
|
|
71
71
|
|
72
72
|
const string addr = "net.pipe://localhost/test1";
|
73
73
|
var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
|
74
|
-
// 追記1
|
74
|
+
// 追記1(解決策)
|
75
75
|
binding.MaxReceivedMessageSize = 64000000;
|
76
76
|
binding.MaxBufferSize = 64000000;
|
77
77
|
var readerQuotas = new XmlDictionaryReaderQuotas();
|
@@ -101,6 +101,15 @@
|
|
101
101
|
|
102
102
|
const string addr = "net.pipe://localhost/test1";
|
103
103
|
var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
|
104
|
+
// 解決策
|
105
|
+
binding.MaxReceivedMessageSize = 64000000;
|
106
|
+
binding.MaxBufferSize = 64000000;
|
107
|
+
var readerQuotas = new XmlDictionaryReaderQuotas();
|
108
|
+
readerQuotas.MaxArrayLength = 64000000;
|
109
|
+
readerQuotas.MaxStringContentLength = 64000000;
|
110
|
+
readerQuotas.MaxDepth = 32;
|
111
|
+
binding.ReaderQuotas = readerQuotas;
|
112
|
+
// 解決策ここまで
|
104
113
|
var host = DuplexChannelFactory<IHost>.CreateChannel(new InstanceContext(new Callback()), binding, new EndpointAddress(addr));
|
105
114
|
|
106
115
|
host.ByteArrRequest();
|
2
プログラム追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -71,6 +71,15 @@
|
|
71
71
|
|
72
72
|
const string addr = "net.pipe://localhost/test1";
|
73
73
|
var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
|
74
|
+
// 追記1
|
75
|
+
binding.MaxReceivedMessageSize = 64000000;
|
76
|
+
binding.MaxBufferSize = 64000000;
|
77
|
+
var readerQuotas = new XmlDictionaryReaderQuotas();
|
78
|
+
readerQuotas.MaxArrayLength = 64000000;
|
79
|
+
readerQuotas.MaxStringContentLength = 64000000;
|
80
|
+
readerQuotas.MaxDepth = 32;
|
81
|
+
binding.ReaderQuotas = readerQuotas;
|
82
|
+
// 追記1ここまで
|
74
83
|
sh = new ServiceHost(typeof(Host));
|
75
84
|
sh.AddServiceEndpoint(typeof(IHost), binding, addr);
|
76
85
|
sh.Open();
|
1
修正依頼対応
title
CHANGED
File without changes
|
body
CHANGED
@@ -64,6 +64,7 @@
|
|
64
64
|
}
|
65
65
|
}
|
66
66
|
|
67
|
+
ServiceHost sh;
|
67
68
|
public MainWindow()
|
68
69
|
{
|
69
70
|
InitializeComponent();
|