Solved

running an .exe file from a web application using asp.net?

Posted on 2007-03-19
6
232 Views
Last Modified: 2010-04-16
Greetings,

I am running ASP.NET 2.0 on a Win 2003 w/ IIS6 ...

I am unable to run an executable from an asp.net application ... some of the code I ran seemed ok ... but the application would not execute ... I believe that it has to do with permissions (I currently have: Everyone, ASPNET, Administrator, IUSER and even a new User dedicate to the process with full permissions).

I have tried over a dozen different ways I have found on EE ... I have spent way to many hours trying to solve this issue ... any help will be much appreciated.

I am trying to run a complex executable … that executable compiles an executable on the fly using wise.

This is my folder structure:
C:\Domains\MyDomainName.com\wwwroot\textexe - The ASP.NET 2.0 application folder where the ASPX file is located
C:\Domains\MyDomainName.com\wwwroot - where the web site root is
C:\Domains\MyDomainName.com\Files\Exe - where the executable is located
C:\Domains\MyDomainName.com\Files\Downloads - where the final product is saved
C:\Domains\MyDomainName.com\Files- where some of the executable support files exist
C:\Program Files\Wise - where a compiler the executable runs is located
The executable also calls command prompt

I currently have the application pool identity set to LOCAL SYSTEM … I have also tried passing the administrator & a specific user login information … No luck

I have tried every solution on the first pages of: http://search.experts-exchange.com/simpleSearch.jsp?sfZoneID=-1&TAFilterID=865&sfQuery=run+an+executable&rlStart=1&rlOrderBy=3&rlSort=-1

Please help.
0
Comment
Question by:web4net
  • 3
  • 3
6 Comments
 
LVL 3

Expert Comment

by:Kate12
ID: 18753740
You should consider using click-once. From VS.NET go to your Project Properties and select the Click-once tab... select the virtal directory you want to deploy de app. Click-once will configure all your security and permissions in your virtual directory.

HTH
0
 
LVL 5

Author Comment

by:web4net
ID: 18753799
Isn't click once used when you are trying to execute a program on the client side? I am trying to execute a windows program on the server.
0
 
LVL 3

Expert Comment

by:Kate12
ID: 18753822
I got ya.
1. how are you executing this file? Using the System.Diagnostics.Process?
2. Is this a Managed .NET executable? If it so, are you trying to Execute by loading it to the current appDomain or a sandbox one?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 5

Author Comment

by:web4net
ID: 18753895
Hi Kate,

1. Yes I am using System.Diagnostics.Process.

2. No it is not a Managed .Net executable.

Thank you for the quick reply.
0
 
LVL 3

Accepted Solution

by:
Kate12 earned 500 total points
ID: 18753908
I had that issue in the past. I believe is because the worker process can not interact with the desktop by default. have a look at the following KBs:

Unable to Start a Process from ASP.NET
http://support.microsoft.com/kb/555134

Process and request identity in ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;317012

HTH
0
 
LVL 5

Author Comment

by:web4net
ID: 18757032
:((

Your solutiions make sense ... but, they do not work ... I am missing something.

I need to go back to basics ... do you have a code that will lunch iexplorer (or any other application) on the server.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now