FileLoadException when launching new version of exe via href

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

Guest

Does anyone know what causes and how to prevent getting
System.IO.FileLoadException everytime
you launch a new version of an .exe via a href. ?

The error reads...An exception 'System.IO.FileLoadException' has
occured in IEExec.exe.

2nd attempt works fine. Its just the initial download after updating the .exe.

I've seen various other people having the same problem, but no explanations
or solutions. I also read somewhere, though i can't remember where, that this
was a known issue and would be fixed in a later version of .net, however it
still seems to be present in visual studio 2005, running .net framework v2.0

Thanks in advance.
Cheers.
 
Hi,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you are getting a FileLoadException
when trying to launch a new version of an .exe via a href. If there is any
misunderstanding, please feel free to let me know.

Basically with Automatic setting in the browser, IE may or may not ask a
file. It's basing on it's own internal algorithm. In the case where we use
to go to a page, then again, just hitting enter to go request for the same
file again, it does NOT request for the file. In Framework 1.1 we introduce
this hash value check for security purposes. Using IE on the client machine
and browse to a .net EXE, MIME filter stores a hash value about this .NET
EXE. MIME Filter's hash value changes when IE makes the request.

Now we close the .NET EXE and leaves IE open. We go to the server and
upload newer version of the .NET EXE. Go back machine, and use the SAME
browser and hit Enter to get the .NET EXE. The browser did NOT make the
request for the .NET EXE with the setting automatic. It sends ieexec/fusion
the one it has in the cache. Fusion will ask WININET to check to the server
if the server has a newer version. Server returns a new file and when it
performs a has check, it did not match with the MIME Filter and thus throws
the exception. WININET is a component of IE uses for requesting file. When
fusion asks WININET to request for a file, WININET still respecting the
settings in IE. But since it's a new process (IEEXEC.exe ) is requesting
for the file, it went and ask the server.

Please note that if we close IE and then reopen, it's a new process and
also with the Automatic setting will request if the server has a new file
or not. It's quite a bit of information, if you aren't clear on any of the
above, please
let me know. Reference about Fusion always ask for .NET assembly that is
not strong named:

http://blogs.gotdotnet.com/alanshi/CategoryView.aspx/Assembly Download

This issue hasn't been fixed yet. Sorry for the inconvenience.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Thanks for taking the time to give such a detailed reply. Very informative.

I can confirm that requesting the new version in a new instance of IE fixes
the problem.

This answer at least confirms its a known issue and not something ive done
incorrectly. I now understand the problem and can suggest a work around,
even if it is to just launch a new instance of IE on a regular basis.

Just to clarify though...

This is a known issue that will be fixed at some point ? If so, do you know
when ?

This problem results from how IE caches files, and isn't really anything to
do with the .net framework itself.

Thanks again. Much appreciated.
 
Hi,

Currently, I'm not sure when it is going to be fix. But thanks for sharing
your experience with all the people here. If you have any questions, please
feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi,

I am also facing similler problem. My problem is I have web application
which is loading perticular dll. If I access this web application from some
machine other than one on which it is installed, then i get exception with no
other information then one question mark in ex.Message ("?"). If I do
ex.ToString() I get FileLoadException.

But once web site is launched from the same machine in which installation is
done then then onwards it don’t give exception **even if it is accessed from
from any other machine**.

I am working on this problem since last two days but not able to find
solution. Is it problem with framework?

Thanks
Prafulla.
 
Back
Top