473,563 Members | 2,556 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The surrogate pair is invalid.

Hello All,

I have a console application that is run via a scheduled task everyday at 4
in the morning. For some reason, a couple of days ago, every time the
scheduled task is run (ether manually or by scheduled time) I get a "The
surrogate pair is invalid" error. When ever I manually run the app by
double clicking it, it runs fine. Any ideas what could be causing this
error? It used to run fine previously and am pretty sure nothing changed on
the server.

Its a C# 2.0 application.

TIA
Jul 9 '07 #1
3 3189
MikeB wrote:
Hello All,

I have a console application that is run via a scheduled task everyday at 4
in the morning. For some reason, a couple of days ago, every time the
scheduled task is run (ether manually or by scheduled time) I get a "The
surrogate pair is invalid" error. When ever I manually run the app by
double clicking it, it runs fine. Any ideas what could be causing this
error? It used to run fine previously and am pretty sure nothing changed on
the server.

Its a C# 2.0 application.
Are you using xml serialization? That error often comes up if there is
something invalid in the data that is being read/written to XML is
invalid or incorrect.

As to why you would only see this when running as a scheduled task
rather than when directly running the program, you need to look at
credentials. When you run the program manually it is running under the
context of the logged on user. What credentials does the scheduled task
run under (typically found in the properties for the scheduled task)?
My guess would be that the credentials that the task is running under do
not have access to some resource that the application assumes will
always be available.

If you can provide more details around where in the code the error is
being thrown and what the code is doing at that point, that would help
troubleshoot this problem further.
--
Tom Porterfield
Jul 9 '07 #2
I am running it under the same credentials as I am log in as so I am not
sure what is going on with that. I will have to add some more logging to
figure out exactly where this is happening at since it works fine when I
debug it. thanks
"Tom Porterfield" <tp******@mvps. orgwrote in message
news:O4******** ********@TK2MSF TNGP02.phx.gbl. ..
MikeB wrote:
>Hello All,

I have a console application that is run via a scheduled task everyday at
4 in the morning. For some reason, a couple of days ago, every time the
scheduled task is run (ether manually or by scheduled time) I get a "The
surrogate pair is invalid" error. When ever I manually run the app by
double clicking it, it runs fine. Any ideas what could be causing this
error? It used to run fine previously and am pretty sure nothing changed
on the server.

Its a C# 2.0 application.

Are you using xml serialization? That error often comes up if there is
something invalid in the data that is being read/written to XML is invalid
or incorrect.

As to why you would only see this when running as a scheduled task rather
than when directly running the program, you need to look at credentials.
When you run the program manually it is running under the context of the
logged on user. What credentials does the scheduled task run under
(typically found in the properties for the scheduled task)? My guess would
be that the credentials that the task is running under do not have access
to some resource that the application assumes will always be available.

If you can provide more details around where in the code the error is
being thrown and what the code is doing at that point, that would help
troubleshoot this problem further.
--
Tom Porterfield

Jul 9 '07 #3
Hi,

"MikeB" <md*@nowhere.co mwrote in message
news:uq******** ******@TK2MSFTN GP05.phx.gbl...
Hello All,

I have a console application that is run via a scheduled task everyday at
4 in the morning. For some reason, a couple of days ago, every time the
scheduled task is run (ether manually or by scheduled time) I get a "The
surrogate pair is invalid" error. When ever I manually run the app by
double clicking it, it runs fine. Any ideas what could be causing this
error? It used to run fine previously and am pretty sure nothing changed
on the server.
You will need to provide more details, is this a .net error? in which line
you get it?
You should handle AppDomain.Unhan dledException and log it somewhere.
Jul 9 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5264
by: Chris Mullins | last post by:
I've got a big unicode character, and i'm trying to build it into a string. The unicode character is in the range "0x10400", so it's going to require a surrogate pair. I've been through all the logic to iterate over strings that already have these pairs in them, but how do I encode this Unicode Character INTO the string? The string is...
2
3249
by: Chris Mullins | last post by:
I've spent a bit of time over the last year trying to implement RFC 3454 (Preparation of Internationalized Strings, aka 'StringPrep'). This RFC is also a dependency for RFC 3491 (Internationalized Domain Names / IDNA) which is something that I also need to support. The problem that I've been struggling with in .NET is that of Unicode Code...
6
2612
by: guy | last post by:
if a string contains surrogate chars (i.e. Unicode characters that consiste of more than 1 char) do functions that use an indexer or a string length into the string e.g. Mid, Len work correctly? guy
3
2001
by: Sakcee | last post by:
Hi In one of the data files that I have , I am seeing these characters \xed\xa0\xa0 . They seem to break the xsl. --------------------------------------------------------------- Extra content at the end of the document XML/XSL Error: </data><data ><![CDATA[ í Pls advice ----------------------------------------------------------------
3
4707
by: Bike | last post by:
Greetings, I have an application with several web services. They all connect to an Oracle database to retreive/save data. Some methods return datasets containning English and/or Arabic data. All these methods work fine most of the time, but sometimes I receive the following error: Server was unable to process request. --> There was an...
2
1709
by: JohnnyDeep | last post by:
Hi, I am creating an unique index on surrogate key column. The surrogate key is a generate number always increasing on my dimension table. The only operation on the table is insert (no update and no delete). 1- Can I specify pctfree=0 for the unique index on the surrogate key without getting page splits since I am only inserting an...
1
2747
by: Alexander Higgins | last post by:
>>Thanks for the response.... Point Taken but this is not the case. Thus, if a person writes a text file on her or his computer and does not use UNICODE to save it, the current code page is used. If this file is given to someone with some other current codepage, the file is not displayed correctly. Simply converting the file to Unicode...
0
2077
by: =?Utf-8?B?Qy4gSHVnaGVz?= | last post by:
Hello, I have a .net 2.0 application using a 'Settings.settings' configuration file to store application settings. The settings are modified at runtime and stored when the user exits the application. Occasionaly, this exception will occur when calling the Settings.Default.Save() method: Invalid high surrogate character (0xDE1C). A high...
0
888
by: abishflake | last post by:
Getting error "The surrogate pair is invalid."when serializing dataset to MemoryStream. Dataset contains some special characters like - and space code given below MemoryStream memoryStream = new MemoryStream(); BinaryFormatter binaryFormatter = new BinaryFormatter(); ...
0
7658
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7631
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5479
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5204
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3615
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2077
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.