Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi,
 
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 global.axa.cs 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 ?
 
Thanks,
Posted 24-Apr-13 10:16am
Comments
Sergey Alexandrovich Kryukov at 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?
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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?
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
v3
Comments
ThePhantomUpvoter at 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 at 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.
ThePhantomUpvoter at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

http://forums.asp.net/post/5377467.aspx
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 250
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 DamithSL 125
4 Afzaal Ahmad Zeeshan 120
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 29 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100