473,625 Members | 2,853 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Security Problems accessing System.Manageme nt.dll from a Windows Service

Ger
Hi,

I have a problem with a Windows Service that I have created accessing
System.Manageme nt.dll on a W2k3 environment. The Service runs fine on
an XP machine but the same Service causes an error once it tries to
access System.Manageme nt.Dll. The service is run using a Domain Admin
acoount.

The code is trying to set permissions for a file and looks like this:
Dim objFile As New ManagementObjec t(New
ManagementPath( "Win32_Logicalf ileSecuritySett ing='" + _
FolderPath.Repl ace("\", "\\") + "'"))

Dim options As New InvokeMethodOpt ions(Nothing, New TimeSpan(0, 0, 0,
5))

Dim outparams As ManagementBaseO bject =
objFile.InvokeM ethod("GetSecur ityDescriptor", Nothing, options)


It is the last line where the following error happens:

"MESSAGE: Not found

STACK TRACE: at System.Manageme nt.ManagementEx ception.ThrowWi thExtendedInfo( ManagementStatu s
errorCode)
at System.Manageme nt.ManagementOb ject.InvokeMeth od(String
methodName, ManagementBaseO bject inParameters, InvokeMethodOpt ions
options)
at Permissions_Ser vice.MgmtModule .AddRoleToFolde r(String
FolderPath, String[] SIDsToAdd)"

I added a strong name to the Service and added the approriate
permissions using the Runtime Security Policy tool. Then I got the
same error when I run the service on XP as I did with W2K3.

I would really appreciate any help on this.

Thank in advance.

Ger.
Jul 21 '05 #1
0 1928

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

116
7485
by: Mike MacSween | last post by:
S**t for brains strikes again! Why did I do that? When I met the clients and at some point they vaguely asked whether eventually would it be possible to have some people who could read the data and some who couldn't but that it wasn't important right now. And I said, 'sure, we can do that later'. So now I've developed an app without any thought to security and am trying to apply it afterwards. Doh!, doh! and triple doh!
10
1770
by: Jayme Pechan | last post by:
I wrote a very simply web application and I'm having all sorts of problems with the security getting in the way. All the web application does is load an out-of-process COM server that is running as a service. The code is here written for both a WinForm C# application (which works correctly) and a Web application (which does not work correctly): // C# application xtapisvrLib.XtapiConfig x = new xtapisvrLib.XtapiConfigClass(); ...
0
863
by: Ger | last post by:
Hi, I have a problem with a Windows Service that I have created accessing System.Management.dll on a W2k3 environment. The Service runs fine on an XP machine but the same Service causes an error once it tries to access System.Management.Dll. The service is run using a Domain Admin acoount. The code is trying to set permissions for a file and looks like this:
8
1802
by: Manfred Braun | last post by:
Hello All! I am writing a management application, which has to access remote machines registry via System.Diagnostics.EventLog.CreateEventSource . For each machine, I connect to, I create a DirectoryEntry and connect to that machine specifying credentials. That's becauase the running user does not has the right permissions . The application is written in C# and the action taken is done with threads from the threadpool.
7
1977
by: Magdelin | last post by:
Hi, My security team thinks allowing communication between the two IIS instances leads to severe security risks. Basically, we want to put our presentation tier on the perimeter network and the business tier inside the fire wall or internal network. The biz tier will be developed and deployed as web services on IIS. I know microsoft recommends this architecture but I am not able to convince my security team. They say IIS is vulnerable...
2
2240
by: KaNos | last post by:
Hello world, I've made a webservice (c# v2) to install in a server IIS 6 on a Windows 2000 last SP. We can use the webservice in local, throw the pages wich present the methods, with a windows mode connection (<authentication mode="Windows"/>) if impersonate is false (<identity impersonate="false"/>). Note that i use the administrator user to be sure. But when I change impersonate element (<identity impersonate="true"/>) a system...
1
1856
by: Ian | last post by:
I am developing a .NET Web Service that acts as a thin calling layer for a larger object. Thus the larger object runs in the context of the web service that is calling it, and is therefore subject to the security restrictions of the Web Server the web service is run through. All well and good. At the end of the main method call of the larger object, it instantiates and calls (through a RCW) a method of a legacy COM object that writes...
0
1529
by: jacorona | last post by:
Hello all, I have found a problem accesing a web service hosted in IIS 5.0 in a W2K box. The web service site is configured to accept both integrated windows authentication and client certificates. I have a WinForm 2.0 client application and when it presents a certificate it works fine, but when it tries to access the web service using integrated security it times out. Both accesses are via an https: uri. Moreover, an .aspx page in the...
8
13329
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi, I created a web service and hosted it in Windows Services. It is working fine. Now I am trying to implement the X509 certificates for message layer security. But it is throwing the following exception: An unhandled exception of type 'System.ServiceModel.Security.SecurityNegotiationException' occurred in mscorlib.dll
0
8253
marktang
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...
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8692
Oralloy
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...
0
8635
jinu1996
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...
0
7182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6116
isladogs
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...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4192
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.