473,472 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Create 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 3178
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****************@TK2MSFTNGP02.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.comwrote in message
news:uq**************@TK2MSFTNGP05.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.UnhandledException 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
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...
2
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...
6
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? ...
3
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...
3
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...
2
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...
1
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...
0
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...
0
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 ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
1
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
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.