Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > .NET Framework

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-28-2008, 06:41 PM
aimlab08@gmail.com
 
Posts: n/a
MarshalDirectiveEx exception: "Excessively long string"

We have a window application, which is written in .net 2003 (C#). One
of our users installed our latest version yesterday. When he tried to
open the application, he get an unhandling exception:
System.Runtime.InteropService.MarshalDirectiveEx: Excessively long
string.

We moved back to install the previous version, again he got the same
error, but the previous version work for him before. Now the user can
not run our program from his machine at all.

The application is running fine for other users.

Any idea how to solve this issue?

Thanks in advance.

Linda
Reply With Quote
  #2 (permalink)  
Old 08-28-2008, 07:22 PM
Peter Duniho
 
Posts: n/a
Re: MarshalDirectiveEx exception: "Excessively long string"

On Thu, 28 Aug 2008 10:41:04 -0700, <aimlab08@gmail.com> wrote:

> We have a window application, which is written in .net 2003 (C#). One
> of our users installed our latest version yesterday. When he tried to
> open the application, he get an unhandling exception:
> System.Runtime.InteropService.MarshalDirectiveEx: Excessively long
> string.
>
> We moved back to install the previous version, again he got the same
> error, but the previous version work for him before. Now the user can
> not run our program from his machine at all.
>
> The application is running fine for other users.
>
> Any idea how to solve this issue?


Find out why there's an "excessively long string" being passed around?

I know that sounds glib, but if you don't have any reason to expect
strings involved in your program to be excessively long, then the fact
that there is one suggests there's probably some corrupted data somewhere.

Ideally, you'd fix your program so that it provides a more informative
error, including being specific about what operation caused the error and
where the data came from. But at the very least, it's possible that a
complete uninstall and reinstall of the program and any data related to it
would cause the problem to go away.

Pete
Reply With Quote
  #3 (permalink)  
Old 08-28-2008, 08:08 PM
aimlab08@gmail.com
 
Posts: n/a
Re: MarshalDirectiveEx exception: "Excessively long string"

Pete,

The previous version worked fine for the same machine until we
installed the new version. Now the previous version also stop working.
Also other users do not have this issue. I did a internet search, some
one posted the same question before. But I did not see any solution
for this.

Maybe some window patch we should install?

Linda
Peter Duniho wrote:
> On Thu, 28 Aug 2008 10:41:04 -0700, <aimlab08@gmail.com> wrote:
>
> > We have a window application, which is written in .net 2003 (C#). One
> > of our users installed our latest version yesterday. When he tried to
> > open the application, he get an unhandling exception:
> > System.Runtime.InteropService.MarshalDirectiveEx: Excessively long
> > string.
> >
> > We moved back to install the previous version, again he got the same
> > error, but the previous version work for him before. Now the user can
> > not run our program from his machine at all.
> >
> > The application is running fine for other users.
> >
> > Any idea how to solve this issue?

>
> Find out why there's an "excessively long string" being passed around?
>
> I know that sounds glib, but if you don't have any reason to expect
> strings involved in your program to be excessively long, then the fact
> that there is one suggests there's probably some corrupted data somewhere.
>
> Ideally, you'd fix your program so that it provides a more informative
> error, including being specific about what operation caused the error and
> where the data came from. But at the very least, it's possible that a
> complete uninstall and reinstall of the program and any data related to it
> would cause the problem to go away.
>
> Pete

Reply With Quote
  #4 (permalink)  
Old 08-28-2008, 09:05 PM
Alex Clark
 
Posts: n/a
Re: MarshalDirectiveEx exception: "Excessively long string"

Is it possible that installing a new version of your app caused a
prerequisite to be installed (SP for .NET, or something similar?) which has
subtly altered the way the framework is handling long strings in interop
calls?

Judging by the error message, it looks like this might be the result of an
interop call, maybe a WinAPI call of some sort? If so, are you sure you
have all your API signatures correctly declared and that you're passing in
the right data types?



<aimlab08@gmail.com> wrote in message
news:d1354a71-ac0b-45b2-95e7-896a2ce8c7df@73g2000hsx.googlegroups.com...
> Pete,
>
> The previous version worked fine for the same machine until we
> installed the new version. Now the previous version also stop working.
> Also other users do not have this issue. I did a internet search, some
> one posted the same question before. But I did not see any solution
> for this.
>
> Maybe some window patch we should install?
>
> Linda
> Peter Duniho wrote:
>> On Thu, 28 Aug 2008 10:41:04 -0700, <aimlab08@gmail.com> wrote:
>>
>> > We have a window application, which is written in .net 2003 (C#). One
>> > of our users installed our latest version yesterday. When he tried to
>> > open the application, he get an unhandling exception:
>> > System.Runtime.InteropService.MarshalDirectiveEx: Excessively long
>> > string.
>> >
>> > We moved back to install the previous version, again he got the same
>> > error, but the previous version work for him before. Now the user can
>> > not run our program from his machine at all.
>> >
>> > The application is running fine for other users.
>> >
>> > Any idea how to solve this issue?

>>
>> Find out why there's an "excessively long string" being passed around?
>>
>> I know that sounds glib, but if you don't have any reason to expect
>> strings involved in your program to be excessively long, then the fact
>> that there is one suggests there's probably some corrupted data
>> somewhere.
>>
>> Ideally, you'd fix your program so that it provides a more informative
>> error, including being specific about what operation caused the error and
>> where the data came from. But at the very least, it's possible that a
>> complete uninstall and reinstall of the program and any data related to
>> it
>> would cause the problem to go away.
>>
>> Pete



Reply With Quote
  #5 (permalink)  
Old 08-28-2008, 09:21 PM
Peter Duniho
 
Posts: n/a
Re: MarshalDirectiveEx exception: "Excessively long string"

On Thu, 28 Aug 2008 12:08:45 -0700, <aimlab08@gmail.com> wrote:

> Pete,
>
> The previous version worked fine for the same machine until we
> installed the new version. Now the previous version also stop working.
> Also other users do not have this issue.


All of those things are consistent with the possibility that something
about that user's installation has become corrupted.

> I did a internet search, some
> one posted the same question before. But I did not see any solution
> for this.


The most likely explanation for that is that this isn't the kind of
question that can be answered simply by knowing the error message.

> Maybe some window patch we should install?


You could try. But, it's a shot in the dark. You'd be better off
actually trying to debug the issue so that you know how and why the error
is actually being caused.

Pete
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > .NET Framework


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:47 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Mobile Phones | Property for sale in Spain | Repair Bad Credit | Loans | Mobile Phones



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114