Run .NET Exe from Web

  • Thread starter Thread starter Janez
  • Start date Start date
J

Janez

Hi,

I have developed .NET Windows forms applicaton (eg. myapp.exe). Each
user has this application installed on the local machine and accesses
SQL Server database on the server from the application through LAN
connection.
However, couple of days ago a special intranet site has been developed
so users want to run this windows forms application from the link on
this intranet site.

So I uninstalled application from each of the client machine (I left
..NET redistributable) and installed the application on the server.
After that I have created virtual directory on the intranet site which
points to the physical folder on the disk where the application
resides.
However, when users try to start the application from the intranet
site in Internet Explorer(eg. http://intranet/myapp/myapp.exe)they do
not receive the usual Open/Save dialog box, but instead the error:
"Application has generated exception that could not be handled." is
displayed. It is not even possible to start this application from the
server's IE, the same error is displayed.
There is no problem running, for example notepad.exe from this
intranet site or some application developed with Visual studio 6. It
seems the problem is only present with .NET application.
The application is developed with VS.NET 2003 for .NET 1.1.

Any suggestions?

Regards
Janez
 
when the users click on the link if they are running IE5(.01?) or better IE
tries to run the .NET application as a smart client via No Touch Deploy.
The exception you are receiving could be related to security violations.
..NET exe(or dlls) run from the web are subject to some fairly strict
security limitations by default. Search msdn/google/newsgroups on No Touch
Deploy (also called href exe) there are several articles around that go over
what's allowed and what will throw a security exception

hope this helps,
-paul
 
My first suggestion would be to check the details of that exception. My
guess is that it is a security exception because once you run it from the
Intranet or Internet, you application "loses" privileges relative to the
Local Machine zone -- and one of these is the ability to do file I/O.

To fix it, you will have to adjust security for that assembly...
 
Hi Janez,

You may start the smart client app using

ieexec "http://intranet/myapp/myapp.exe"

under command prompt, and see if it will show you any unhandled exceptions
with detail call stacks. These info will help you make clear the cause of
the problem.

ieexec.exe is under your .NET framework directory like:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

If you have any problem when trying my suggestion, please feel free to
update this thread.

Good Luck!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
Hi,

I tried this procedure from Internet Explorer on my development
machine.
I have received an exception, then started the debugger from the
dialog and this is what I have received in VS.NET 2003 debugger:
An unhandled exception of type 'System.Security.SecurityException'
occurred in IEExec.exe
Additional information: Request failed.

So I increased assembly trust at the client for the assembly at the
URL and it started to work.

Regards
Janez
 
Back
Top