Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 895159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:30:58+00:00 2026-05-15T14:30:58+00:00

Getting the following thrown error when calling a web service. Have googled without any

  • 0

Getting the following thrown error when calling a web service. Have googled without any results other then people asking the same question.

Server was unable to process request. ---> The surrogate pair (0xD860, 0x27) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF)."} 
System.Exception {System.Web.Services.Protocols.SoapException

The web service returns a series of simple text fields from a view by running the view and opening a dataset and reading in the data and returning it as formatted XML.

EDIT

Was able to resolve this using the following regex which strips out the bad characters which happened to be MSWord/Excel characters

string re = @"[^\x09\x0A\x0D\x20-\xD7FF\xE000-\xFFFD\x10000-x10FFFF]";
return Regex.Replace(text, re, string.Empty);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:30:59+00:00Added an answer on May 15, 2026 at 2:30 pm

    What might be happening is that:

    • The XML file contains the bytes ED A1 A0 27. According to chardet, this was most likely intended to be эба' encoded in IBM866.
    • But it lacks an encoding declaration, so the parser assumes that it’s UTF-8.
    • The text gets decoded into the UTF-16 string D860 0027.
    • This string is not valid UTF-16 because of the unpaired surrogate D860, so you get the exception.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am getting following error message on calling WCF service: The formatter threw an exception
I'm getting the following error thrown in a test of mine: unknown file: error:
I am getting null-exception throw error in the following code. What can be the
I'm getting a strange NullPointerException, evidently thrown by the following line of code: Iterator<Note>
I am Getting following error on exporting the video using [exportSession exportAsynchronouslyWithCompletionHandler:^ Error: -[TiBlob
I am getting following error while installing the application on my device. before running
i am getting following error while getting data from dictionary -[__NSCFString objectForKey:]: unrecognized selector
I'm getting following error when I try to log onto phpMyAdmin. User * *
I am getting following error when I am trying to get WebResponse using WebResponse
I'm getting the following error in my AutoIt script: Array variable subscript badly formatted.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.