473,587 Members | 2,487 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.
Nov 20 '05 #1
0 861

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

Similar topics

0
1926
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...
2
14017
by: Paul Gronka | last post by:
I've got a VB.NET windows application (written in VS .NET 2003) that makes a call to WMI for retrieving the MAC Address from the client's PC. It works on 4 out of the 5 PC's tested so far. All the workstations are DELLs running XP SP1a with the 1.1 .NET Framework. The following line of code generates an exception on the one PC: Dim oMac...
116
7464
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...
10
1766
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...
8
1798
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...
7
1976
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...
2
2236
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...
1
1855
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...
0
1525
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...
8
13325
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
7920
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...
0
7849
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...
0
8215
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. ...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6626
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...
1
5718
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...
0
3844
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...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.