L
lankylad
I have developed a Web Service for internal company use that consumes a public web service over the web. This works perfectly on my local development machine, but bombs out on the production machine with the following:
System.Net.WebException: The request was aborted: The request was canceled. ---> System.TypeInitializationException: The type initializer for "HeaderEncoding" threw an exception. ---> System.ArgumentException: Invalid or unsupported code page type.
at System.Text.CodePageEncoding.GetCPMaxCharSizeNative(Int32 codePage)
at System.Text.CodePageEncoding..ctor(Int32 codepage)
at System.Text.Encoding.GetEncodingRare(Int32 codepage)
at System.Text.Encoding.GetEncoding(Int32 codepage)
at System.Net.HeaderEncoding..cctor()
--- End of inner exception stack trace ---
at System.Net.HeaderEncoding.GetBytes(String myString, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex)
at System.Net.HttpWebRequest.MakeRequest()
at System.Net.HttpWebRequest.EndSubmitRequest()
at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean ignoreShutDownCheck)
--- End of inner exception stack trace ---
at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean ignoreShutDownCheck)
at System.Net.ConnectStream.CloseInternal(Boolean internalCall)
at System.Net.ConnectStream.Close()
at MyWS.Search.SendMessage(Object dsout, Object dsin) in c:\inetpub\wwwroot\MyWS\Search.asmx.vb:line 321
Line 321 is:
myStream.Close()
The context is:
myRequest = System.Net.HttpWebRequest.Create(CHurl)
myRequest.ContentType = "text/xml; charset=utf-8"
myRequest.Timeout = 60000
myRequest.Method = "POST"
myStream = myRequest.GetRequestStream()
dsout.WriteXml(myStream)
myStream.Close()
myStream = Nothing
I am completely lost and would really appreciate some help
System.Net.WebException: The request was aborted: The request was canceled. ---> System.TypeInitializationException: The type initializer for "HeaderEncoding" threw an exception. ---> System.ArgumentException: Invalid or unsupported code page type.
at System.Text.CodePageEncoding.GetCPMaxCharSizeNative(Int32 codePage)
at System.Text.CodePageEncoding..ctor(Int32 codepage)
at System.Text.Encoding.GetEncodingRare(Int32 codepage)
at System.Text.Encoding.GetEncoding(Int32 codepage)
at System.Net.HeaderEncoding..cctor()
--- End of inner exception stack trace ---
at System.Net.HeaderEncoding.GetBytes(String myString, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex)
at System.Net.HttpWebRequest.MakeRequest()
at System.Net.HttpWebRequest.EndSubmitRequest()
at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean ignoreShutDownCheck)
--- End of inner exception stack trace ---
at System.Net.ConnectStream.CloseInternal(Boolean internalCall, Boolean ignoreShutDownCheck)
at System.Net.ConnectStream.CloseInternal(Boolean internalCall)
at System.Net.ConnectStream.Close()
at MyWS.Search.SendMessage(Object dsout, Object dsin) in c:\inetpub\wwwroot\MyWS\Search.asmx.vb:line 321
Line 321 is:
myStream.Close()
The context is:
myRequest = System.Net.HttpWebRequest.Create(CHurl)
myRequest.ContentType = "text/xml; charset=utf-8"
myRequest.Timeout = 60000
myRequest.Method = "POST"
myStream = myRequest.GetRequestStream()
dsout.WriteXml(myStream)
myStream.Close()
myStream = Nothing
I am completely lost and would really appreciate some help