securityexception

Security exception when writting to an EventLog from an ASP.NET MVC application

[亡魂溺海] 提交于 2019-12-03 12:37:28
I have a library that I created with some business logic that includes writing to a System.Diagnostics.EventLog instance. The library is normally called from a Windows Service application, but now I'm trying to call those same library functions from my ASP.NET MVC application. I tried this code inside my controller to create the EventLog instance that I pass into the method that needs to write to the log. Dim log = New EventLog("Application", My.Computer.Name, "MyMVCApp") The following error is generated when the code within the library method tries to write to the log: [SecurityException:

UnauthorizedAccessException vs SecurityException

天涯浪子 提交于 2019-12-03 09:42:12
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. SecurityException: The exception that is thrown when a security error is detected. How are these two similar exceptions different? What situations will trigger either of them? A UnauthorizedAccessException is thrown when there is a permissions error accessing the file on

WebView java.lang.SecurityException: No permission to modify given thread

寵の児 提交于 2019-12-03 05:42:24
I have an application that uses multiple WebViews. Nowhere do I set the priority of the render thread through the WebSettings though I still get the exception below. So far it only seems to happen on android 4.0.4, which I haven't found the source code for. Anyone run into this and/or knows a solution? Thanks! java.lang.SecurityException: No permission to modify given thread at android.os.Process.setThreadPriority(Native Method) at android.webkit.WebViewCore$WebCoreThread$1.handleMessage(WebViewCore.java:712) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop

Silverlight Requests, Failures & Fiddler

久未见 提交于 2019-12-02 17:54:44
问题 I've got a Silverlight application that makes a cross-domain request. The clientaccesspolicy.xml file exists on the server I am making a request to and is correctly configured. I know that it is correctly configured because when I use the application to make a request from my machine I receive a response with no problem. When a second individual on a corporate network about 300 miles away tries to use the same application, launched from the same URL, to make the same request, he instead gets

SecurityException when downloading Images with the Universal-Image-Downloader

孤人 提交于 2019-12-02 11:58:30
问题 On my application I used universal image downloader BaseImageDownloader class for syncronious loading contents of gallery.For the same content from Imageloader.getInstance().loadImage asyncronious function it does not gives any security exception and loads the image as it is ment to be but when I try to download it syncroniously using BaseImageDownloader (Also Imageloader.getInstance().loadImage() makes the same) i get this security Exception 09-02 18:49:43.971: W/System.err(4244): java.lang

Silverlight Requests, Failures & Fiddler

血红的双手。 提交于 2019-12-02 11:02:00
I've got a Silverlight application that makes a cross-domain request. The clientaccesspolicy.xml file exists on the server I am making a request to and is correctly configured. I know that it is correctly configured because when I use the application to make a request from my machine I receive a response with no problem. When a second individual on a corporate network about 300 miles away tries to use the same application, launched from the same URL, to make the same request, he instead gets a security exception. Here's the odd part. I requested that he download Fiddler so that I could see the

Creating directories in medium trust environment?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 10:45:41
I've got an ASP.NET Web Application running in a medium trust environment with a shared hosting provider. The following code causes a SecurityException to be thrown: private void TestButton_Click(object sender, EventArgs e) { string directory = Server.MapPath("~/MyFolder/") + "_TestDirectory"; if (!Directory.Exists(directory)) Directory.CreateDirectory(directory); } The full text of the error is: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed

java.lang.SecurityException: signer information does not match signer information of other classes in the same package

一曲冷凌霜 提交于 2019-12-02 09:12:40
问题 We have renewed security certificates in our java applications and suddenly we have started receiving below mentioned exception: java.lang.SecurityException: class "org.hibernate.cfg.Configuration"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:806) [rt.jar:1.6.0_37] at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487) [rt.jar:1.6.0_37] at java.lang.ClassLoader.defineClassCond

java.lang.SecurityException: signer information does not match signer information of other classes in the same package

徘徊边缘 提交于 2019-12-02 08:22:07
We have renewed security certificates in our java applications and suddenly we have started receiving below mentioned exception: java.lang.SecurityException: class "org.hibernate.cfg.Configuration"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:806) [rt.jar:1.6.0_37] at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487) [rt.jar:1.6.0_37] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:625) [rt.jar:1.6.0_37] at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0

Android Open Mobile API Release Difficulties

落花浮王杯 提交于 2019-12-02 08:03:05
I am using the "org.simalliance.openmobileapi.jar" file from SDK. I copied it to my libs folder and added the dependency like this Case #1: working fine (in debug mode) In app Gradle file I have: provided files('libs/org.simalliance.openmobileapi.jar') Case #2: not working (in release mode - without minifyEnabled) In app Gradle file I have: compile files('libs/org.simalliance.openmobileapi.jar') In case #2 I get the following exception: (java.lang.SecurityException: Access Control Enforcer: no APDU access allowed!) What could cause the problem? First of all, you need to use the "provided"