I'm calling a TCP-hosted WCF from an http-hosted WCFlike this:
Client.Write_dat_File_String(BigString, FileNameString)
BigString has between 12,000 and 25,000 characters. The string passes to the WCF, which looks like this:
Public Sub Write_dat_File_String(ByVal datString As String, ByVal FileName As String) Implements IService1.Write_dat_File_String
'Write the datString to a text file (.dat)
Using writer As StreamWriter = New StreamWriter(System.Configuration.ConfigurationManager.AppSettings("ExStream_TXT_WriteFilePath") & FileName.ToString & ".dat", False)
writer.Write(datString)
End Using
End Sub
Problem is I'm getting this error:
The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'Write_dat_File_String'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.
Any ideas? I've already upped the maxStringContentLength in my config files to 22008192. The above code works beautifully, so long as I have less than appx 12,000 characters in my string. Problem is, I need to pass anywhere from 30,000 to 50,000 characters.
Any help is GREATLY appreciated.
Thanks,
Jason
Client.Write_dat_File_String(BigString, FileNameString)
BigString has between 12,000 and 25,000 characters. The string passes to the WCF, which looks like this:
Public Sub Write_dat_File_String(ByVal datString As String, ByVal FileName As String) Implements IService1.Write_dat_File_String
'Write the datString to a text file (.dat)
Using writer As StreamWriter = New StreamWriter(System.Configuration.ConfigurationManager.AppSettings("ExStream_TXT_WriteFilePath") & FileName.ToString & ".dat", False)
writer.Write(datString)
End Using
End Sub
Problem is I'm getting this error:
The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'Write_dat_File_String'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.
Any ideas? I've already upped the maxStringContentLength in my config files to 22008192. The above code works beautifully, so long as I have less than appx 12,000 characters in my string. Problem is, I need to pass anywhere from 30,000 to 50,000 characters.
Any help is GREATLY appreciated.
Thanks,
Jason