System.ExecutionEngineException occurred in mscorlib.dll.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
i'm currently developping a c# application with VS studio .net 2003,.net
framework 1.1.
This application binds Wininet.dll to establish an ftp connection.

I send a "LIST" ftpCommand, then i open the returned handle with
InternetReadFile. So i get the filenames to download.
After that i close this handle via InternetCloseHandle.
Whithout this close the call to FtpGetFileSize(fileName) fails (couldn't
find file).
If the filesize is bigger than 0 i donwload the file via FtpGetFile.
At this time the file is well on disk and i can open it with any text editor.
Nevertheless when i try to read this file on disk, ex: via
System.IO.File.OpenText(filePath)
The following error occurs:
An unhandled exception of type 'System.ExecutionEngineException' occurred in
mscorlib.dll.

Is it a framework bug ? How can I bypass this problem ?

Jérôme Hordies
Developper
Pulsar Consulting
 
Hi,

we finaly found that a precedent call of wininet was the cause of this.
In fact i was using a frist functionn call with a too small buffer to
retrieve the size of the buffer from the error.
This function has probably overwritten some memory of the framework.

Jérôme Hordies

"Jérôme" a écrit :
 
Back
Top