質問編集履歴

3

追記及び解決策

2019/09/05 06:24

投稿

kawauso
kawauso

スコア56

test CHANGED
File without changes
test CHANGED
@@ -144,7 +144,7 @@
144
144
 
145
145
  var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
146
146
 
147
- // 追記1
147
+ // 追記1(解決策)
148
148
 
149
149
  binding.MaxReceivedMessageSize = 64000000;
150
150
 
@@ -204,6 +204,24 @@
204
204
 
205
205
  var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
206
206
 
207
+ // 解決策
208
+
209
+ binding.MaxReceivedMessageSize = 64000000;
210
+
211
+ binding.MaxBufferSize = 64000000;
212
+
213
+ var readerQuotas = new XmlDictionaryReaderQuotas();
214
+
215
+ readerQuotas.MaxArrayLength = 64000000;
216
+
217
+ readerQuotas.MaxStringContentLength = 64000000;
218
+
219
+ readerQuotas.MaxDepth = 32;
220
+
221
+ binding.ReaderQuotas = readerQuotas;
222
+
223
+ // 解決策ここまで
224
+
207
225
  var host = DuplexChannelFactory<IHost>.CreateChannel(new InstanceContext(new Callback()), binding, new EndpointAddress(addr));
208
226
 
209
227
 

2

プログラム追記

2019/09/05 06:24

投稿

kawauso
kawauso

スコア56

test CHANGED
File without changes
test CHANGED
@@ -144,6 +144,24 @@
144
144
 
145
145
  var binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
146
146
 
147
+ // 追記1
148
+
149
+ binding.MaxReceivedMessageSize = 64000000;
150
+
151
+ binding.MaxBufferSize = 64000000;
152
+
153
+ var readerQuotas = new XmlDictionaryReaderQuotas();
154
+
155
+ readerQuotas.MaxArrayLength = 64000000;
156
+
157
+ readerQuotas.MaxStringContentLength = 64000000;
158
+
159
+ readerQuotas.MaxDepth = 32;
160
+
161
+ binding.ReaderQuotas = readerQuotas;
162
+
163
+ // 追記1ここまで
164
+
147
165
  sh = new ServiceHost(typeof(Host));
148
166
 
149
167
  sh.AddServiceEndpoint(typeof(IHost), binding, addr);

1

修正依頼対応

2019/09/05 06:14

投稿

kawauso
kawauso

スコア56

test CHANGED
File without changes
test CHANGED
@@ -130,6 +130,8 @@
130
130
 
131
131
 
132
132
 
133
+ ServiceHost sh;
134
+
133
135
  public MainWindow()
134
136
 
135
137
  {