Click here to Skip to main content
15,669,524 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)

I want to know how to configure my application in iis(5.1/6.0) to launch an executable in parallel from the application_start function in the file?

With the integreted web server in visual studio, it works but not in iis : the executable start but it dies after and i don't know why?

Can anyone suggest me a solution ?

Sergey Alexandrovich Kryukov 24-Apr-13 15:34pm    
Not enough information. If it starts, why are you asking about "authorization"? What is that executable, what's it's purpose? How do you know that this is a Windows application compiled to the target instruction-set architecture compatible with the one of the server host?

Who is running what? That's the question to ask here.
It's not you to run IIS. IIS uses a different user, Local System or Network System or something like that. And it is a service. It runs in Session 0 which is not your user session and cannot interact with it (session isolation). And IIS need not run on your local machine - in a production environment, it will be a server machine, and no user will have a session running on it.
Now look at th requirements: what is that executable expected to do? Does your architecture reflect the requirements and constraints correctly?
Share this answer
You say that i have to solve the problem from the config file.
Well as i said from the beginning that i don't have the source code and the config file has just some keys/values informations who the native dll reads(no directory is configurable in that file).
The definition of the path to this config is determinate inside the dll.
the real example is when a call is made from this native dll by the iis process (in my case), the working directory is "c:\windows\systems\inetserv" and when the native dll search the config file in that directory (the dll is based on the working directory from the invoker).
in conclusion, the invoker must have inside his directory all the things that the dll need.
Share this answer
[no name] 26-Apr-13 9:55am    
If this is not a solution, then why did you post it as it it were a solution? Sounds more like you are trying to fix something by over complicating the actual problem. The solution to a path problem is not to create a bunch of other programs to deal with it. Fix the path to your configuration file problem that you have.
hemigueti 26-Apr-13 13:01pm    
I post it were a solution because i can't add more information from my first post.
The problem that i have is that i have no source code of the native dll written in c++ and otherwise the problem would be resolved.
The problem is that when the service(some operations methods in the wcf service) invoke some method of the native dll : the dll looks for the external ".ini" file and it's supposed that this file is in the same directory that the native dll (bin directory of the application)but the iis process path is different and it's in "c:\windows\system32\inerserv\..." and i do not want to put the .ini" file in this directory (bad pratice).
The solution that I thought is to make a console application (a host) and in the startup of the service web application (global.asax) : i call the StartInfo to start this host because i can set the working dirctory path of the process and this solution works in visual studio and when a customer query an operation from the main application(wcf with anothers operations), the main application send the query to the console host application(who managed the native dll) and this host re-send the response to the main application to send to the customer.
If i had windows 7 : this console application would be a windows service (WAS) but in xp i can't.
[no name] 26-Apr-13 18:38pm    
So again why are you post this as a solution instead of clicking the "improve question" button and then clearly explaining what the exact problem is?

Again, you are trying to solve a simple problem with a nuclear weapon when a simple hammer would do.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900