Permissions for Mutex

W

William LaMartin

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.
 
J

Jay B. Harlow [MVP - Outlook]

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
 
W

William LaMartin

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top