Hi
I need to create a MessageQueue in my C# service (running as SYSTEM). Users
will have no permissions on this queue, so I can't look if messages are
present. When setting MessageQueue.Se tPermissions, I have the problem of
knowing the Windows Group Name. I'd like to set Full Control to either Users
or Everyone (doesn't really matter), but the service might run under English
(Users, Everyone) or German Windows (Benutzer, Jeder). On a German Windows,
SetPermissions failes with "Everyone" and succeeds with "Jeder".
How can I get the locale-specific name of a role, say "Users"?
Or is there a much easier way to set Full Control Permissions on a
MessageQueue for Everyone?
Thanks a lot
Simon 4 5924
Can you p/invoke the LookupAccountNa me API, passing in the SID of the group
you want to use? Everyone and Authenticated Users are both well-known SID
values that don't change, so that might be a good way to get the localized
version.
It is too bad that the .NET MQ API won't take a SID directly as then you
would not have this problem.
Joe K.
"Simon Niederberger" <si***@sincore. ch> wrote in message
news:ec******** ******@TK2MSFTN GP14.phx.gbl... Hi
I need to create a MessageQueue in my C# service (running as SYSTEM). Users will have no permissions on this queue, so I can't look if messages are present. When setting MessageQueue.Se tPermissions, I have the problem of knowing the Windows Group Name. I'd like to set Full Control to either Users or Everyone (doesn't really matter), but the service might run under English (Users, Everyone) or German Windows (Benutzer, Jeder). On a German Windows, SetPermissions failes with "Everyone" and succeeds with "Jeder". How can I get the locale-specific name of a role, say "Users"?
Or is there a much easier way to set Full Control Permissions on a MessageQueue for Everyone?
Thanks a lot Simon
Great, got that to work. However, now my assembly has an Win32API call, so
for deployment, I need full trust on the client. I found that I should add a
custom action in the setup project, but apart from that, I'm stumped.
Can you direct me to a step-by-step guide on how to make my assembly being
distributed with a Setup Project be fully trusted on the client?
(Essentially run the .NET framework 1.1 Wizard "Trust assembly" as custom
action). I'm using VS 2003.
Thanks a lot
Simon
"Joe Kaplan (MVP - ADSI)" <jo************ *@removethis.ac centure.com> wrote
in message news:uL******** *****@TK2MSFTNG P14.phx.gbl... Can you p/invoke the LookupAccountNa me API, passing in the SID of the
group you want to use? Everyone and Authenticated Users are both well-known SID values that don't change, so that might be a good way to get the localized version.
It is too bad that the .NET MQ API won't take a SID directly as then you would not have this problem.
Joe K.
"Simon Niederberger" <si***@sincore. ch> wrote in message news:ec******** ******@TK2MSFTN GP14.phx.gbl... Hi
I need to create a MessageQueue in my C# service (running as SYSTEM). Users will have no permissions on this queue, so I can't look if messages are present. When setting MessageQueue.Se tPermissions, I have the problem of knowing the Windows Group Name. I'd like to set Full Control to either Users or Everyone (doesn't really matter), but the service might run under English (Users, Everyone) or German Windows (Benutzer, Jeder). On a German Windows, SetPermissions failes with "Everyone" and succeeds with "Jeder". How can I get the locale-specific name of a role, say "Users"?
Or is there a much easier way to set Full Control Permissions on a MessageQueue for Everyone?
Thanks a lot Simon
I thought you needed full trust to call into System.Messagin g anyway since
it doesn't have the AllowPartiallyT rustedCallersAt tribute. If your code is
being installed to the local machine, you will have full trust by default
anyway, so that probably isn't an issue. Are you actually get security
exceptions?
If you really feel like you need to change security policy, I'd suggest
starting a new thread as Nicole is much better at that stuff than me and can
provide you with more guidance.
Joe K.
"Simon Niederberger" <si***@sincore. ch> wrote in message
news:O$******** *****@TK2MSFTNG P10.phx.gbl... Great, got that to work. However, now my assembly has an Win32API call, so for deployment, I need full trust on the client. I found that I should add a custom action in the setup project, but apart from that, I'm stumped.
Can you direct me to a step-by-step guide on how to make my assembly being distributed with a Setup Project be fully trusted on the client? (Essentially run the .NET framework 1.1 Wizard "Trust assembly" as custom action). I'm using VS 2003.
Thanks a lot Simon
"Joe Kaplan (MVP - ADSI)" <jo************ *@removethis.ac centure.com> wrote in message news:uL******** *****@TK2MSFTNG P14.phx.gbl... Can you p/invoke the LookupAccountNa me API, passing in the SID of the group you want to use? Everyone and Authenticated Users are both well-known SID values that don't change, so that might be a good way to get the localized version.
It is too bad that the .NET MQ API won't take a SID directly as then you would not have this problem.
Joe K.
"Simon Niederberger" <si***@sincore. ch> wrote in message news:ec******** ******@TK2MSFTN GP14.phx.gbl... > Hi > > I need to create a MessageQueue in my C# service (running as SYSTEM). > Users > will have no permissions on this queue, so I can't look if messages are > present. When setting MessageQueue.Se tPermissions, I have the problem > of > knowing the Windows Group Name. I'd like to set Full Control to either > Users > or Everyone (doesn't really matter), but the service might run under > English > (Users, Everyone) or German Windows (Benutzer, Jeder). On a German > Windows, > SetPermissions failes with "Everyone" and succeeds with "Jeder". > How can I get the locale-specific name of a role, say "Users"? > > Or is there a much easier way to set Full Control Permissions on a > MessageQueue for Everyone? > > Thanks a lot > Simon > >
No Joe, you're absolutely right. That was an apparent newbie question. I was
testing my test.exe from a network share, which doesn't reflect the final
setup. If I move the exe to a local drive, everything is great.
So my final solution is:
Use code from http://www.codeproject.com/csharp/SidTranslator.asp
Install application locally (was gonna do that anyway)
Use SID S-1-1-0 for group "Everyone"
Thanks a lot, Joe
Simon
"Joe Kaplan (MVP - ADSI)" <jo************ *@removethis.ac centure.com> wrote
in message news:Oq******** *****@TK2MSFTNG P15.phx.gbl... I thought you needed full trust to call into System.Messagin g anyway since it doesn't have the AllowPartiallyT rustedCallersAt tribute. If your code
is being installed to the local machine, you will have full trust by default anyway, so that probably isn't an issue. Are you actually get security exceptions?
If you really feel like you need to change security policy, I'd suggest starting a new thread as Nicole is much better at that stuff than me and
can provide you with more guidance.
Joe K.
"Simon Niederberger" <si***@sincore. ch> wrote in message news:O$******** *****@TK2MSFTNG P10.phx.gbl... Great, got that to work. However, now my assembly has an Win32API call,
so for deployment, I need full trust on the client. I found that I should
add a custom action in the setup project, but apart from that, I'm stumped.
Can you direct me to a step-by-step guide on how to make my assembly
being distributed with a Setup Project be fully trusted on the client? (Essentially run the .NET framework 1.1 Wizard "Trust assembly" as
custom action). I'm using VS 2003.
Thanks a lot Simon
"Joe Kaplan (MVP - ADSI)" <jo************ *@removethis.ac centure.com>
wrote in message news:uL******** *****@TK2MSFTNG P14.phx.gbl... Can you p/invoke the LookupAccountNa me API, passing in the SID of the group you want to use? Everyone and Authenticated Users are both well-known SID values that don't change, so that might be a good way to get the localized version.
It is too bad that the .NET MQ API won't take a SID directly as then
you would not have this problem.
Joe K.
"Simon Niederberger" <si***@sincore. ch> wrote in message news:ec******** ******@TK2MSFTN GP14.phx.gbl... > Hi > > I need to create a MessageQueue in my C# service (running as SYSTEM). > Users > will have no permissions on this queue, so I can't look if messages
are > present. When setting MessageQueue.Se tPermissions, I have the problem > of > knowing the Windows Group Name. I'd like to set Full Control to
either > Users > or Everyone (doesn't really matter), but the service might run under > English > (Users, Everyone) or German Windows (Benutzer, Jeder). On a German > Windows, > SetPermissions failes with "Everyone" and succeeds with "Jeder". > How can I get the locale-specific name of a role, say "Users"? > > Or is there a much easier way to set Full Control Permissions on a > MessageQueue for Everyone? > > Thanks a lot > Simon > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ken Lindner |
last post by:
I have a need to become familiar with SQL Server 2000 for work.
Needless to say I am new to SQL Server any version, but not IT in
general. My employer has provided me with the SQL Server 2000
Personal disk from the SQL Server 2000 Enterprise kit as this is
reported here on the MSDN web site to be the version that is supported
on Windows XP. In fact so many of you kind people confess to having
succeeded in doing it.
I have tried...
|
by: Christian McArdle |
last post by:
REQUEST FOR DISCUSSION (RFD)
unmoderated group comp.os.ms-windows.programmer.64bit
This is a formal Request For Discussion (RFD) to create
comp.os.ms-windows.programmer.64bit as an unmoderated world-wide Usenet
newsgroup dedicated to the discussion of Microsoft Windows 64-bit
programming. This is not a Call for Votes (CFV); you cannot vote at
this time. Procedural details appear below. All followup discussion
should be crossposted to...
|
by: Steven Fox |
last post by:
============================================================
About DB2 Administration Tools Environment
============================================================
DB2 administration tools level:
Product identifier SQL08015
Level identifier 02060106
Level DB2 v8.1.5.449
Build level s040212
PTF WR21334...
|
by: pberna |
last post by:
Dear all,
I built a Web Form application to start and stop a Windows Service remotely.
I successful tested the application on Windows 2000 server + IIS. I must
include the ASPNET user
to the Administration group (on server side) to have the necessary
authorization to start a Windows Service (I don't understand why "Power
User" rights are not enough to do the same thing)
Although I'm able to start a service using windows 2000 server...
|
by: James |
last post by:
I have a VB windows forms application that accesses a Microsoft Access
database that has been secured using user-level security. The
application is being deployed using No-Touch deployment. The objective
in utilizing this new deployment method is to reduce the maintenance
overhead as well as making it easier for my users to setup and run the
application initially. I have VS 2002, Windows XP, Access XP(2000
format).
He is my problem....
| |
by: Amjad |
last post by:
Hi,
I just wrote a test Windows Service that creates a text file on startup
(please see my code below). The file is never created.
Protected Overrides Sub OnStart(ByVal args() As String)
Dim swLog As StreamWriter = File.CreateText("C:\myLog.txt")
swLog.WriteLine("My Windows Service has just started.")
swLog.Close() : swLog.Flush()
End Sub
|
by: =?Utf-8?B?Q2Fubm9kYWwxOQ==?= |
last post by:
I'm having a problem getting the accurate information to the guide.. Its
saying its soposted to be this one show, and its somthing else.. I've double
check my setting for what general area, and I have the right one.. Can't
figure it out,, I have another program from Hauppauge products, and that
version works and downloads the correct information.. but the one on windows
media is not correct..
Thanks for the help
|
by: =?Utf-8?B?SnJ4dHVzZXIx?= |
last post by:
I just started using Windows Live OneCare, I had been using Norton, but was
unable to fix the problems I was having. I have yet been unsuccessful with
OneCare as well. I keep getting the same warning from OneCare, one is for
Adware, the other is for a trojan, I clean both, but almost immediatly, I get
the same warning? My Windows Defender is also shut down, not by me as I have
no idea how to do this(or to turn it back on), but am still...
|
by: Max2006 |
last post by:
Hi,
I am trying to limit my wcf service endpoint to response to only given
windows user or group. How can I do that? Is there any way to configure that
in the .config file?
Thank you,
Max
|
by: josequinonesii |
last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet...
Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not work. Please review my work and let me know if you see that one little thing that is throwing me for a loop.
HTTPD.CONF
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the...
|
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: 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,...
|
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: 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: 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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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();...
| |
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
| |