473,786 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7064
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 SecurityPermiss ionFlag.Unmanag edCode 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.ne t> wrote in message
news:eV******** ******@TK2MSFTN GP02.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
SecurityPermiss ionFlag.Unmanag edCode 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.co m> wrote in message
news:97******** *************** ***********@mic rosoft.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.c om> wrote in message
news:eu******** ******@TK2MSFTN GP03.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.co m> wrote in message
| news:97******** *************** ***********@mic rosoft.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******** ******@TK2MSFTN GP03.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.c om> wrote in message
news:eu******** ******@TK2MSFTN GP03.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.co m> wrote in message
| news:97******** *************** ***********@mic rosoft.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
5724
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 System.Collections Imports System.Configuration Imports System.Data Imports System.Data.Common Imports System.Reflection
1
412
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: Access is denied. at MSXML2.ServerXMLHTTP40Class.send(Object varBody)
1
2001
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 same steps, the auto complete works, the compiler likes my code, but when I test, pressing the button that triggers the code segment gives me an access is denied error and a stack trace that claims the problem is in my instantiation. (Error cut...
12
3099
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 asp editing (like I used to be able to do with 2K/IIS5) where I use VS.NET, open an asp file, make changes, save and refresh my browser. Problem is that I get an Access is Denied error when I try to save the file and then the file gets wiped on...
8
1763
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 is identical except that the test site has a different IP and some path changes were made in web.config to match the different location. First site still working fine, but test site gets access denied trying to create folders under the Temporary...
4
4011
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 = (window.screen.availWidth/2)+130; width2 = (window.screen.availWidth/2)-130; height = (window.screen.availheight);
1
2151
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 installation why is it not having rights to create a view. How can i make this possible
0
9647
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
9491
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
10357
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
10163
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
9959
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
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
7510
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
6744
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();...
3
2894
bsmnconsultancy
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...

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.