473,386 Members | 1,798 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,386 software developers and data experts.

Permissions for Mutex

I posted this in the ASP.net newsgroup with no response, so I will try it
here:

What needs to be changes to make this work? It is on a Windows 2003 shared
server.

This code:

Private Shared FileLockMutex As System.Threading.Mutex
Shared Sub New()
FileLockMutex = New System.Threading.Mutex(False,
"MyFileLockMutex")
End Sub

on an aspx page produces the following error message on one server I host
on.

Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the
permission of type System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

Nov 20 '05 #1
2 2990
William,
I don't have a specific answer. however:
on an aspx page produces the following error message on one server I host
on. Are you saying you have the same code on two or more servers, one gives you
the exception and the other does not?

Have you tried asking this in one of microsoft.public.dotnet.framework,
microsoft.public.dotnet.framework.clr,
microsoft.public.dotnet.framework.sdk, or microsoft.public.dotnet.security?
As this newsgroup is more for general VB.NET questions.

Which ASP.NET newsgroup? I would think either
microsoft.public.dotnet.framework.aspnet or
microsoft.public.dotnet.framework.aspnet.security would have supplied an
answer.

When did you post your question? There was a server glitch yesterday
morning, which may have made your post go MIA.

Hope this helps
Jay

"William LaMartin" <la******@tampabay.rr.com> wrote in message
news:OC******************@TK2MSFTNGP09.phx.gbl... I posted this in the ASP.net newsgroup with no response, so I will try it
here:

What needs to be changes to make this work? It is on a Windows 2003 shared server.

This code:

Private Shared FileLockMutex As System.Threading.Mutex
Shared Sub New()
FileLockMutex = New System.Threading.Mutex(False,
"MyFileLockMutex")
End Sub

on an aspx page produces the following error message on one server I host
on.

Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the
permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

Nov 20 '05 #2
The code works fine on my development server and on another server where I
have pretty liberal permissions for the aspnet account. However, on a
server that hosts many accounts in a shared environment it does not work. I
am thus trying to figure out what permissions are necessary for the code
below involving System.Threading.Mutex to work where I can pass that on to
the people hosting the site.

I have asked the question in dontnet.frameworkaspnet. I will try some of
the other newsgroups you suggest.

"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:eY****************@TK2MSFTNGP12.phx.gbl...
William,
I don't have a specific answer. however:
on an aspx page produces the following error message on one server I host on. Are you saying you have the same code on two or more servers, one gives

you the exception and the other does not?

Have you tried asking this in one of microsoft.public.dotnet.framework,
microsoft.public.dotnet.framework.clr,
microsoft.public.dotnet.framework.sdk, or microsoft.public.dotnet.security? As this newsgroup is more for general VB.NET questions.

Which ASP.NET newsgroup? I would think either
microsoft.public.dotnet.framework.aspnet or
microsoft.public.dotnet.framework.aspnet.security would have supplied an
answer.

When did you post your question? There was a server glitch yesterday
morning, which may have made your post go MIA.

Hope this helps
Jay

"William LaMartin" <la******@tampabay.rr.com> wrote in message
news:OC******************@TK2MSFTNGP09.phx.gbl...
I posted this in the ASP.net newsgroup with no response, so I will try it here:

What needs to be changes to make this work? It is on a Windows 2003

shared
server.

This code:

Private Shared FileLockMutex As System.Threading.Mutex
Shared Sub New()
FileLockMutex = New System.Threading.Mutex(False,
"MyFileLockMutex")
End Sub

on an aspx page produces the following error message on one server I host on.

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the
permission of type System.Security.Permissions.SecurityPermission,

mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

failed.



Nov 20 '05 #3

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

Similar topics

0
by: Srijit Kumar Bhadra | last post by:
Hello, Here is some sample code with pywin32 build 203 and ctypes 0.9.6. Best regards, /Srijit File: SharedMemCreate_Mutex_win32all.py # This application should be used with...
193
by: Michael B. | last post by:
I was just thinking about this, specifically wondering if there's any features that the C specification currently lacks, and which may be included in some future standardization. Of course, I...
2
by: Martin Maat | last post by:
Hi. I want to use the same mutex in different classes (web pages in an ASP.NET application). In global.asax.cs, the class that starts up first, I create a Mutex like this: static private...
1
by: Kris | last post by:
I want to set a mutex in one windows account and allow another windows account to access this mutex. For testing I have two forms that create a mutex using the C# mutex class. I am logging into...
16
by: Ed Sutton | last post by:
I use a mutex to disallow starting a second application instance. This did not work in a release build until I made it static member of my MainForm class. In a debug build, first instance got...
0
by: William LaMartin | last post by:
This code: Private Shared FileLockMutex As System.Threading.Mutex Shared Sub New() FileLockMutex = New System.Threading.Mutex(False, "MyFileLockMutex") End Sub on an aspx page produces the...
2
by: tony.newsgrps | last post by:
Hi there, I'm trying to understand the impact of killing a process that owns a system mutex (used to ensure there is only 1 instance of my program running) Here is my code pretty much: try...
3
by: NaeiKinDus | last post by:
Hello, i'm trying to program a thread that would be locked (by a mutex) and that would only be unlocked once that a function (generating data) is done. The purpose is to generate data, and unlock...
11
by: Lamont Sanford | last post by:
Given an object of type Mutex, what method or property should be called to determine if it is currently owned? I could call WaitOne(0,false) -- and if the return value is false, I could deduce...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...

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.