473,383 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Access denied while trying to create a mutex.

UJ
Has anybody seen an 'Access denied' error when trying to create a mutex? If
so - what does that mean? I though Mutex's were not supposed to error out.

TIA - Jeff.
Jun 5 '06 #1
7 7020
Hello, UJ!

U> Has anybody seen an 'Access denied' error when trying to create a mutex?
U> If so - what does that mean? I though Mutex's were not supposed to error
U> out.

AFAIK to create mutex, your code has to have SecurityPermissionFlag.UnmanagedCode flag.

Also if you're "creating" mutex that already exists you can have no access to it, if its creator had set appropriate ACLs

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Jun 5 '06 #2
UJ
The thing that is weird is it happens only occasionally. If we restart the
program, it will work.

"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:eV**************@TK2MSFTNGP02.phx.gbl...
Hello, UJ!

U> Has anybody seen an 'Access denied' error when trying to create a
mutex?
U> If so - what does that mean? I though Mutex's were not supposed to
error
U> out.

AFAIK to create mutex, your code has to have
SecurityPermissionFlag.UnmanagedCode flag.

Also if you're "creating" mutex that already exists you can have no access
to it, if its creator had set appropriate ACLs

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Jun 5 '06 #3
Hello, UJ!

Interesting, give us more context for the problem: what is creating mutex, how it is used, are there any security related operations in the application etc.?

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Jun 5 '06 #4
I recomend look at these threads
http://groups.google.com/group/micro...a3b2ea6976b16d

http://groups.google.com/group/micro...1e34df50df665f

BTW, Did u create windows service and use mutex there?
The thing that is weird is it happens only occasionally. If we restart the
program, it will work.


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jun 5 '06 #5
UJ
It's in stand alone programs. I've got multiple programs trying to write to
a log file so I mutex around the writes. That seems to be where the problem
lies.

I haven't done anything with security so it should be OK.

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:97**********************************@microsof t.com...
I recomend look at these threads
http://groups.google.com/group/micro...a3b2ea6976b16d

http://groups.google.com/group/micro...1e34df50df665f

BTW, Did u create windows service and use mutex there?
The thing that is weird is it happens only occasionally. If we restart
the
program, it will work.


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not
cease to be insipid." (c) Friedrich Nietzsche

Jun 5 '06 #6
Make sure all you program run in the same logon session as the owner of the
mutex, that is, make sure no-one impersonates when accessing the mutex.

Willy.
"UJ" <fr**@nowhere.com> wrote in message
news:eu**************@TK2MSFTNGP03.phx.gbl...
| It's in stand alone programs. I've got multiple programs trying to write
to
| a log file so I mutex around the writes. That seems to be where the
problem
| lies.
|
| I haven't done anything with security so it should be OK.
|
| "Michael Nemtsev" <ne*****@msn.com> wrote in message
| news:97**********************************@microsof t.com...
| >I recomend look at these threads
| >
http://groups.google.com/group/micro...a3b2ea6976b16d
| >
| >
http://groups.google.com/group/micro...1e34df50df665f
| >
| > BTW, Did u create windows service and use mutex there?
| >
| >>> The thing that is weird is it happens only occasionally. If we restart
| >>> the
| >>> program, it will work.
| >
| > --
| > WBR,
| > Michael Nemtsev :: blog: http://spaces.msn.com/laflour
| >
| > "At times one remains faithful to a cause only because its opponents do
| > not
| > cease to be insipid." (c) Friedrich Nietzsche
| >
| >
|
|
Jun 5 '06 #7
UJ
I originally had all the programs in the startup group. I now have a program
that launches each of the programs in order. I'm doing nothing with security
so I have to assume that I'm the same user for each program.

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:ea**************@TK2MSFTNGP03.phx.gbl...
Make sure all you program run in the same logon session as the owner of
the
mutex, that is, make sure no-one impersonates when accessing the mutex.

Willy.
"UJ" <fr**@nowhere.com> wrote in message
news:eu**************@TK2MSFTNGP03.phx.gbl...
| It's in stand alone programs. I've got multiple programs trying to write
to
| a log file so I mutex around the writes. That seems to be where the
problem
| lies.
|
| I haven't done anything with security so it should be OK.
|
| "Michael Nemtsev" <ne*****@msn.com> wrote in message
| news:97**********************************@microsof t.com...
| >I recomend look at these threads
| >
http://groups.google.com/group/micro...a3b2ea6976b16d
| >
| >
http://groups.google.com/group/micro...1e34df50df665f
| >
| > BTW, Did u create windows service and use mutex there?
| >
| >>> The thing that is weird is it happens only occasionally. If we
restart
| >>> the
| >>> program, it will work.
| >
| > --
| > WBR,
| > Michael Nemtsev :: blog: http://spaces.msn.com/laflour
| >
| > "At times one remains faithful to a cause only because its opponents
do
| > not
| > cease to be insipid." (c) Friedrich Nietzsche
| >
| >
|
|

Jun 5 '06 #8

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

Similar topics

3
by: Ian | last post by:
The beginning of my assembly that I am getting the access error from looks like this. ********************************* Imports System.EnterpriseServices Imports System Imports...
1
by: Cristiano Trebian | last post by:
Hi all, This is my problem: I try to create the Msxml 4.0 object in an vb.net class in an asp.net project and it return me the following error message: System.UnauthorizedAccessException:...
1
by: Ben Pryhoda | last post by:
I have already used a third party com object in my code, and it went easily. Add the reference, call the methods, and get my results. But I am integrating a legacy com object and I follow the...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
8
by: lightcap | last post by:
Server Windows 2003. Created one web site, everything works fine. Copied the content to another folder and created another web site pointing to the copied contecnt for test purposes. Configuration...
4
by: Chrisser | last post by:
Hi I have an Intranet webpage starting with a mainpage from which the user can open a new window using a link that is calling a function: function openWindows(){ var left, top; width =...
1
by: vamsioracle | last post by:
I am working on discoverer reports on 10g. When i create a new EUL, it says the user (SCOTT) doesn't have enough privileges to create a view. Though the user scott is created at the time of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.