System.ArgumentException: Invalid or unsupported code page type.

Discussion in 'ASP .Net Web Services' started by lankylad, Jun 26, 2004.

  1. lankylad

    lankylad Guest

    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
    lankylad, Jun 26, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Craig Deelsnyder
    Replies:
    1
    Views:
    4,624
    =?Utf-8?B?U2hhd24gS2VubmV5?=
    Jul 19, 2004
  2. Simon Harris
    Replies:
    2
    Views:
    2,581
    Simon Harris
    Apr 27, 2005
  3. Simon Harris
    Replies:
    0
    Views:
    731
    Simon Harris
    Apr 27, 2005
  4. AndyB
    Replies:
    0
    Views:
    675
    AndyB
    May 23, 2005
  5. Timbo
    Replies:
    1
    Views:
    5,926
    bruce barker \(sqlwork.com\)
    May 5, 2006
Loading...

Share This Page