Solved

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

Posted on 2007-03-19
6
234 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Modal Popup Extender control 1 22
tutorial for ebay api 3 35
Import a txt file into a DataGridView and TextBox 20 38
VB.Net WebRequest Code from JSON curl 9 16
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 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