Welcome to HostingForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Running External Processes in .NET with Win2K3/IIS 6

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Author Message
user2003

External


Since: Aug 05, 2004
Posts: 13



(Msg. 1) Posted: Wed Jun 29, 2005 1:51 pm
Post subject: Running External Processes in .NET with Win2K3/IIS 6
Archived from groups: microsoft>public>inetserver>iis (more info?)

I have an interesting problem that I believe has to do with some IIS 6
settings that I am not aware of and I have just about exhausted searching
google and this discussion group. Hopefully, someone here can shed some
light on the issue I am having.

Anyway, in my .NET web application, I am using a third party class library
(bzwhll.dll) to communicate with a backend IBM z800 host system. This
library spawns a process (bzmd.exe) and interacts with it to read and write
to mainframe host screens using a combnation of DDE, telnet and winHLLAPI. I
developed the web app on a winXP system with IIS5 installed. On this
development system, the app works just fine. When I moved the app to our
win2k3/IIS6 development server, however, the web app did not work properly.
The bzmd.exe process is spawned just fine (I can see it running as NETWORK
SERVICE in the task manager) but it doesn't seem like the w3wp.exe process
can interact with the bzmd.exe process once that process is started (it
doesn't even kill the process after the script has finished running even
though it did on the winXP/IIS5 system and the code calls those commands).

When I run the script, there are no messages in the Event logs to indicate
any error nor are there any exceptions thrown in the code. ASP.NET is
installed correctly on the server and is working fine.

Some things I have already tried:

-I've tried running the w3wp.exe process as my user account (which is an
administrator), and running the iis admin and w3 publishing services as my
user with "interact with desktop" checked. One thing that I noticed in this
situation was that, when remote desktoped into this machine and running this
test script, the bzmd.exe processes were running under my user account but
did not show up as an active window on the desktop (I guess this is because
IIS6 runs processes in it's own isolated space?).

-I've also given "Everyone" full permissions to the entire C: drive with
the same problem, so I don't think it's a folder/file permission issue.
Maybe a security policy issue in IIS6?

To make matters even worse, I wrote a small .NET console app that uses the
SAME exact classes libraries and code as the webapp (which I then ran under
the same admin account that I ran the webapp as), that connected to the
mainframe and ran fine. I am at wits end here about this solution, which
works fine on another machine running winXP/IIS5 but not on this win2k3/IIS6
machine, even though the console app with the same permissions ran on the
win2k3 server just fine.

I appreciate ANY help or guidance anyone has to offer about this problem and
thank you in advance for your time,

Ed

 >> Stay informed about: Running External Processes in .NET with Win2K3/IIS 6 
Back to top
Login to vote
someone9

External


Since: Aug 25, 2003
Posts: 2419



(Msg. 2) Posted: Wed Jun 29, 2005 3:08 pm
Post subject: Re: Running External Processes in .NET with Win2K3/IIS 6 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Several problems with what you have already tried:
1. To make w3wp.exe (and any process it launches) show up on the desktop,
you just need to set W3SVC to Interact with desktop and restart W3SVC
service. Subsequently, you can attach debuggers to w3wp.exe so it shows up
on screen by default, and so do other EXEs that you launch from it (for
example, I can launch notepad.exe from a web app run by IIS and have it show
up on screen).
2. IIS6 does not have any security policy nor such issues. It just runs code
with the users and privileges that are either assigned by default or
user-defined, so IIS6 doesn't have a policy or configuration that says "make
your situation fail".
3. If you can make the same piece of code run on the same machine from the
console but not from IIS, then it is likely due to differences in the user
logon performed by IIS and WINLOGON (what you use to login to the console).
The logon affect privileges on the user token, which may affect other
privileges for API calls *regardless* of file system ACLs (this is yet
another reason why you are going about this backwards).

The first thing I would do is contact support for your third party library
regarding their support of IIS6. My suspicion is that their code is relying
on some privilege to work, and they need to tell you what it is instead of
you guessing and trying to figure out what permissions their code needs.

My suspicion is that bzcmd.exe spawns, hits an error with *something*, and
just sits there forever. So, w3wp.exe cannot communicate with it. Obtaining
support for bzcmd.exe is where I would start.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Ed" <Ed RemoveThis @discussions.microsoft.com> wrote in message
news:A0B6E2AF-99C2-4BB0-86C9-7030F8369011@microsoft.com...
I have an interesting problem that I believe has to do with some IIS 6
settings that I am not aware of and I have just about exhausted searching
google and this discussion group. Hopefully, someone here can shed some
light on the issue I am having.

Anyway, in my .NET web application, I am using a third party class library
(bzwhll.dll) to communicate with a backend IBM z800 host system. This
library spawns a process (bzmd.exe) and interacts with it to read and write
to mainframe host screens using a combnation of DDE, telnet and winHLLAPI.
I
developed the web app on a winXP system with IIS5 installed. On this
development system, the app works just fine. When I moved the app to our
win2k3/IIS6 development server, however, the web app did not work properly.
The bzmd.exe process is spawned just fine (I can see it running as NETWORK
SERVICE in the task manager) but it doesn't seem like the w3wp.exe process
can interact with the bzmd.exe process once that process is started (it
doesn't even kill the process after the script has finished running even
though it did on the winXP/IIS5 system and the code calls those commands).

When I run the script, there are no messages in the Event logs to indicate
any error nor are there any exceptions thrown in the code. ASP.NET is
installed correctly on the server and is working fine.

Some things I have already tried:

-I've tried running the w3wp.exe process as my user account (which is an
administrator), and running the iis admin and w3 publishing services as my
user with "interact with desktop" checked. One thing that I noticed in this
situation was that, when remote desktoped into this machine and running this
test script, the bzmd.exe processes were running under my user account but
did not show up as an active window on the desktop (I guess this is because
IIS6 runs processes in it's own isolated space?).

-I've also given "Everyone" full permissions to the entire C: drive with
the same problem, so I don't think it's a folder/file permission issue.
Maybe a security policy issue in IIS6?

To make matters even worse, I wrote a small .NET console app that uses the
SAME exact classes libraries and code as the webapp (which I then ran under
the same admin account that I ran the webapp as), that connected to the
mainframe and ran fine. I am at wits end here about this solution, which
works fine on another machine running winXP/IIS5 but not on this win2k3/IIS6
machine, even though the console app with the same permissions ran on the
win2k3 server just fine.

I appreciate ANY help or guidance anyone has to offer about this problem and
thank you in advance for your time,

Ed

 >> Stay informed about: Running External Processes in .NET with Win2K3/IIS 6 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]