SecurityException indicates a security violation and is thrown when a security error is detected.
Questions tagged [securityexception]
329 questions
16
votes
9 answers
Programmatically install an apk in Android 7 / api24
I am trying to get my app to automatically install an apk. This works fine for api<24. But for 24, it is failing. Android has implemented extra security:
For apps targeting Android 7.0, the Android framework enforces the StrictMode API policy…

elsie
- 163
- 1
- 1
- 4
16
votes
6 answers
Avoid SecurityException because of "No active admin owned by"
How to avoid this Exception
E/AndroidRuntime(26113): Caused by: java.lang.SecurityException: No active admin owned by uid XXXX for policy #3
when calling this:
public static void lockScreen(Context context) {
Log.d(TAG, "lockScreen");
…

ViliusK
- 11,345
- 4
- 67
- 71
15
votes
4 answers
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…

Ronald Wildenberg
- 31,634
- 14
- 90
- 133
14
votes
2 answers
SecurityException: getSerial: The user 10134 does not meet the requirements to access device identifiers
I want to get the Build.getSerial() from the Android phone. Up to Android O i needed the Manifest.permission.READ_PHONE_STATE permission. However in Android 10 i get the above exception.
What i did is added this permission to the…

james04
- 1,580
- 2
- 20
- 46
13
votes
7 answers
Firefox not able to enumerate document.styleSheets[].cssRules[]
Here is the code:
http://jsfiddle.net/salman/2hyYg/
http://jsfiddle.net/salman/2hyYg/show/
You'll notice the alert(document.styleSheets[x].cssRules.length) fails with a "security exception". Any workaround for this. I am asking because there are a…

Salman A
- 262,204
- 82
- 430
- 521
13
votes
4 answers
How do I resolve a System.Security.SecurityException with custom code in SSRS?
I've created an assembly and referenced it in my Reporting Services report. I've tested the report locally (works), and I then uploaded the report to a report server (doesn't work).
Here is the error that is thrown by the custom code I've…

Ian Robinson
- 16,892
- 8
- 47
- 61
13
votes
4 answers
C#: Simple Windows Service gives Security Exception
I am doing the walkthrough in the following link:
http://msdn.microsoft.com/en-us/library/zt39148a%28VS.80%29.aspx
I have followed it exactly, line by line. I installed the service successfully, however, when I try to run it, the following error…

sbenderli
- 3,654
- 9
- 35
- 48
13
votes
1 answer
WebView java.lang.SecurityException: No permission to modify given thread
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…

Geert Weening
- 1,480
- 1
- 13
- 17
12
votes
2 answers
InApp Billing: java.lang.SecurityException Requires READ_PHONE_STATE
I am getting lot of exceptions in crash report for my app in google store.
Can somebody hep me what could cause this? I am using android:targetSdkVersion=19
java.lang.SecurityException: Requires READ_PHONE_STATE: Neither user 10131 nor current…

Vijay Bansal
- 141
- 4
10
votes
4 answers
.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…

David
- 103
- 1
- 5
10
votes
1 answer
log4net throwing Security Exception in ASP.Net MVC web application
I have written 3 ASP.net MVC web applications, and all are deployed on shared hosting servers with my ISP.
All 3 applications are very similar in configuration and settings. The 1st application is deployed to a different server than the 2nd and 3rd.…

Saajid Ismail
- 8,029
- 11
- 48
- 56
9
votes
2 answers
java.lang.SecurityException: Permission Denial: opening provider com.android.providers.media.Media
I am getting-
java.lang.SecurityException: Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider from ProcessRecord{f1d408f 5594:firebasejobscheduler.test.com.firbasejobschedulerdemo/u0a1227} (pid=5594, uid=11227)…

Android Developer
- 9,157
- 18
- 82
- 139
9
votes
0 answers
Apache Derby startup error java.lang.SecurityException: sealing violation: package org.apache.derby.impl.services.timer is sealed
I am using Ubuntu 14.04 and have installed Derby 10.12.1.1. I have followed installation instructions from Apache website.
My CLASSPATH has been set…

Maz
- 193
- 2
- 10
9
votes
3 answers
Security exception when writting to an EventLog from an ASP.NET MVC application
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…

CoderDennis
- 13,642
- 9
- 69
- 105
8
votes
3 answers
How do I get rid of the SecurityException error when trying to use Automapper in ASP.NET MVC?
I'm developing an ASP.NET MVC application with NHibernate and I'm trying to use Automapper to hide the Domain objects from the DTO objects sent to the view:
ClassLibrary with my Domain (for NHibernate) and DTO objects
Class library to make a…

Felipe Oriani
- 37,948
- 19
- 131
- 194