securityexception

WCF Security Exception caused by Directory.Delete()

Hi, I am encountering a strange issue: I call a WCF-Operation from my client. The operation deletes all files in a specified directory and finally deletes their parent directory too. ACtually, this works. No exception is thrown and the files within the folder and the folder itself are deleted successfully. But: the wcf context of my c...

UnauthorizedAccessException vs SecurityException

The MSDN constructor for a FileStream says that it may throw either an UnauthorizedAccessException or a SecurityException. Here's what MSDN says about these exceptions. UnauthorizedAccessException: The exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error. Security...

APTCA SecurityException with ASP.NET Development Server running against machine-level Full-Trust

The strange thing is that, my teammates and I are faced with APTCA SecurityException randomly when running our ASP.NET MVC website against ASP.NET Development Server (local development). Machine-level web.config shows that trustLevel is, by default, "Full". There is no override in application-level web.config. The exception happens rando...

SecurityException after adding ELMAH to WCF project

I'm having a problem with a WCF (.Net 3.5) site using ELMAH on IIS 7.5. This is the exception message: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. To verify that it was the combination of W...

(Fluent) NHibernate Security Exception - ReflectionPermission

I've upgraded an ASP.Net Web application to the latest build of Fluent NHibernate (1.0.0.636) and the newest version of NHibernate (v2.1.2.4000). I've checked a couple of times that the application is running in Full trust. But I keep getting the following error: Security Exception Description: The application attempted to perform an op...

.NET 4.0 application on network share causes SecurityException

Today I experienced a weird problem while trying to remotely debug an application built for the .NET 4.0 runtime. The application resides on a network share and executed by a remote machine. However the application crashes each time during load because of a SecurityException raised by a permission demand in the System.Configuration.Conf...

Distinguish between clientaccesspolicy.xml failure and untrusted cert in Silverlight

Does anyone know of a clever way to distinguish between an error communicating with a server due to a missing or invalid clientaccesspolicy.xml file vs. a server presenting an untrusted or self-signed certificate? This is a Silverlight 3 application talking to a self-hosted WCF service on a server. Currently both cases are returning the...

Java SecurityException : signer information does not match

I recompiled my classes as usual, and suddenly got the following error message, why ? How to fix it ? "java.lang.SecurityException: class "Chinese_English_Dictionary"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:776) ...

How can I write System preferences with Java? Can I invoke UAC?

How can I write system preferences with Java, using Preferences.systemRoot()? I tried with: Preferences preferences = Preferences.systemRoot(); preferences.put("/myapplication/databasepath", pathToDatabase); But I got this error message: 2010-maj-29 19:02:50 java.util.prefs.WindowsPreferences openKey VARNING: Could not open windows ...

Upgraded to Silverlight 4 cause System.Security.SecurityException

Trying to open a file dialog but I get an exception when calling ShowDialog. This pice of code have always worked fine but I think when I upgrade to Silverlight 4 it caused some problem. Code: var dlg = new OpenFileDialog { Filter = "CSV Files (*.csv)|*.csv" }; if (dlg.ShowDialog() == true) { Upload(dlg.File); } Exception: Di...

Determine if a specific activity in an application can be launched...

Applications can have any number of launchable activities. I know how to get the list of these activities via PackageManager. Is there a way to determine which activities can be launched via startActivity? For example, the Documents To Go app has different activities that will start Word, Excel, Powerpoint, PDF, etc... I am able to l...

Web site works in dev mode; when deployed on IIS causes Security Exception

My ASP.NET web site works fine in development/debug mode, but when I publish it, I'm getting the following error: Security Exception 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 ch...

TypeInitializationException when starting Windows Service because config section can not be created

I have a strange error on a specific Windows Server 2008 R2 machine (it works on other 2008 R2 machines) when starting a Windows Service. The service uses Common.Logging and log4net. However, on this specific machine the config section handler for Common.Logging can not be created. It fails with the following stack traces (formatted for...

Silverlight can't talk to HTTPS web service?

I've got a Silverlight app that talks to an HTTPS web service. On most machines it works fine, however, on some machines it fails consistently. On the machines it fails on, I receive a SecurityException when making a WebClient request to the HTTPS web service. The SecurityException itself doesn't give me any clues as to why it's reall...

How to avoid Java security exception due to mixed code

Hi, I have an applet which is present in a signed jar. This applet uses another 3rd party jar file which is unsigned. On launching the applet I get the Mixed code warning which I want to avoid. To solve this issue, I added "Trusted-Library: true" to the unsigned jar which is being used by my applet. But, it still throws SecurityExcept...

C# fully trusted assembly with SecuritySafeCritical funciton still throwing SecurityExceptions

I'm trying to create a sandboxed AppDomain for loading extensions/plugins. I have a MarshalByRefObject that in instantiate inside the appdomain to load the dll. I'm getting SecurityExceptions when trying to load the dll and I can't figure out how to get around them while still limiting what the third party code can do. All my projects...

Delete SUN_MICR.RSA, SUN_MICR.SF solves manifest signature file entry problem.

When I tried repacking all the jars into one jar, and run that one big jar, I got following exception java.lang.SecurityException: no manifiest section for signature file entry javax/activation/MimeType.class After googling I found a working solution at http://www.coderanch.com/t/133070/Security/Jar-File-java-lang-SecurityException T...

After throwing a Security Exception, redirect to Login page...

I'm using WebForms and Asp.Net Routing. When trying to implement security on a members folder, I'm following the directions here : http://blogs.msdn.com/b/mikeormond/archive/2008/06/21/asp-net-routing-and-authorization.aspx private IHttpHandler GeneratePage(string VN, RequestContext RC) { string virtualPath = string.Form...

Security Exception when Uploading From Silverlight to PHP

I am using the official Microsoft example and this example as the basis for my code to upload a file from Silverlight to a PHP script. I am calling **HttpWebRequest.BeginGetRequestStream()**, writing the file over a file stream, and then calling **HttpWebRequest.BeginGetResponse()** to get the response. When I call HttpWebResponse.End...

Java: Using Gson in an Applet causes SecurityException

I'm trying to use Google Gson in my Java Applet, but when I do I get Exception in thread "Thread-19" java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) at java.security.AccessCo...