I need to be able to kill a process programmaticall y under ASP.NET. IIS
runs under the local system account. The user accessing the web is using
anonymous access.
We would prefer NOT to grant elevated security to the proxy used for
anonymous access. Is there a way to either establish a temporary
security context, programmaticall y for the .NET Framework Process.Kill
to operate under? Or perhaps a way to give the compiled binary produced
this privilege? We may be willing to hard code a username credential in
code in order to help limit the broad scope assignment of privileges.
The need for this comes from what I believe to be a bug in EXCEL. We use
automation in ASP.NET code. We wind everything down, call the various
closes, and release all references, but we find the web server to be
soon littered with many orphaned EXCEL processes. One for each instance
made via automation.
We have developed an approach to see the new EXCEL process being created
at the very moment we instance EXCEL, and track the PID. When we have
done absolutely everything we can to release the workbook, and close
EXCEL, and it still has not gone away, then we kill the process. This
has worked in many contexts, but falls on its face in an ASP.NET
webservice due to the fact that it has insufficient privileges.
Thanks for your help. Best regards - Lee Gillie, Spokane WA 1 3601
He Lee,
It seems to me that you'd want to create a special password-protected page
and implement impersonation for that page. The impersonation would use the
ID/password of an account that has sufficient privileges (admin?) to execute
Process.Kill. http://msdn.microsoft.com/library/de...ersonation.asp
The account will have to have broad permissions:
"SecurityPermis sion for calling any members of System.Diagnost ic.Process
with full trust. Associated enumeration: PermissionState .Unrestricted "
"Lee Gillie" <Le*@nospam.odp .com> wrote in message
news:42******** ******@nospam.o dp.com... I need to be able to kill a process programmaticall y under ASP.NET. IIS runs under the local system account. The user accessing the web is using anonymous access.
We would prefer NOT to grant elevated security to the proxy used for anonymous access. Is there a way to either establish a temporary security context, programmaticall y for the .NET Framework Process.Kill to operate under? Or perhaps a way to give the compiled binary produced this privilege? We may be willing to hard code a username credential in code in order to help limit the broad scope assignment of privileges.
The need for this comes from what I believe to be a bug in EXCEL. We use automation in ASP.NET code. We wind everything down, call the various closes, and release all references, but we find the web server to be soon littered with many orphaned EXCEL processes. One for each instance made via automation.
We have developed an approach to see the new EXCEL process being created at the very moment we instance EXCEL, and track the PID. When we have done absolutely everything we can to release the workbook, and close EXCEL, and it still has not gone away, then we kill the process. This has worked in many contexts, but falls on its face in an ASP.NET webservice due to the fact that it has insufficient privileges.
Thanks for your help. Best regards - Lee Gillie, Spokane WA This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ted |
last post by:
How do I grant all privileges for a schema that has a large number of
existing tables, procedures, functions, etc to a newly created role,
without having to issue a grant statement for each object and each
privilege? I want the role to have all of the rights of the schema
owner.
Is there any kind of blanket granting of all privileges to a role?
|
by: Tim Werth |
last post by:
I have a Windows Service that is running as an administrator account. Some
of it methods create files for a COM+ client to digest and puts them in
C:\Documents and Settings\All Users\Application Data\... The file is
created with a StreamWriter.
When the COM+ client (running as a non-admin user) is finished with the
file, it tries to clean it up but gets a Permission denied error.
How can the service programmatically grant delete...
|
by: Steve Long |
last post by:
In writing a Windows service with .NET, I'm noticing that the process for
some services can not be killed with specifically stopping the service. If
you try to kill the process with, say task manager, you get an access denied
message. I just wrote a test service and I can kill the process for this
service without actually stopping the service. Can someone tell me how to
keep the process for my service from being killed without actually...
|
by: Kris |
last post by:
I have a Windows Service in C# talking to a serial port and using Remoting.
It also uses several COM objects. On customer's computer the service will
occassionally hang somewhere - the service still shows on a Task Manager
list. In Services it says it is still running. However there is no way to
stop it other than by rebooting the whole computer. No exception (including
non-CLS) is ever generated. I added a separate System.Timers.Timer...
|
by: Shalini |
last post by:
Hi
I am posting this again.Sorry for the trouble.
I just have a third party dll which does some custom functionality.
The Dll have some apis which run only when the user is an administrator.
I made a simple windows GUI application which makes use of the dll. Good it
works fine when i am logged in as the Administrator.
I made a Webservice which uses PInvoke thereby making use of the DLL.
The DLL reported Error as the WebService is not...
| |
by: zxo102 |
last post by:
Hi there,
I have a python application (many python scripts) and I start the
application like this
python myServer.py start
in window. It is running in dos window. Now I would like to put it in
background as NT service. I got a example code: SmallestService.py from
chapter 18 of the book "Python Programming On Win32" by Mark Hammond
etc. The code is as follows and runs well as an NT service.
|
by: kkt49 |
last post by:
# vim: et sw=4 ts=8 sts
from wxPython.wx import *
import sys, os, time
import pywintypes
import win32serviceutil
import win32service
import win32event
import win32process
|
by: Peter Bradley |
last post by:
Hi,
I'm writing a Web service (the first one I've ever written in anger, by the
way) that has to do some AD manipulation and then has to create some
directories on some remote servers. Doing the AD stuff is fine, because I
can pass in suitable credentials: however this is not the case (AFAIK) with
the folder manipulation code. Here's an example of the kind of thing I want
to do:
....
|
by: EricBlair |
last post by:
Hello, I wrote a windows service that is supposed to start an interactive GUI app. I realize a service will not readily do this so I've pieced together the code below to bypass that. However, the call to CreateProcessAsUser always returns a 1314 error: 'A required privilege is not held by the client.'
I realize from the doc's that the calling process must have SE_TCB_NAME privilaege to assign new privileges to the new process and I have done...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |