securityexception

SecurityException: getSerial: The user 10134 does not meet the requirements to access device identifiers

﹥>﹥吖頭↗ 提交于 2020-05-16 03:53:12
问题 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 manifest <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" tools:ignore="ProtectedPermissions"/> And in the activity i need to request for the permission but there is not such a permission ActivityCompat.requestPermissions(this

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

情到浓时终转凉″ 提交于 2020-01-25 06:04:31
问题 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 registry node Software\JavaSoft\Prefs at root 0x80000002. Windows RegOpenKey(...) returned error code 5. Exception in thread "AWT-EventQueue-0" java.lang

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

那年仲夏 提交于 2020-01-25 06:04:11
问题 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 registry node Software\JavaSoft\Prefs at root 0x80000002. Windows RegOpenKey(...) returned error code 5. Exception in thread "AWT-EventQueue-0" java.lang

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

南笙酒味 提交于 2020-01-25 06:04:05
问题 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 registry node Software\JavaSoft\Prefs at root 0x80000002. Windows RegOpenKey(...) returned error code 5. Exception in thread "AWT-EventQueue-0" java.lang

SSRS: Cannot figure out permission set for enumerating files in directory

微笑、不失礼 提交于 2020-01-17 02:41:27
问题 I have a problem figuring out the permission set to get Directory.GetFiles() to work in an assembly used by SQL Server reporting services. Background Basically, I use this assembly to perform two things: read images from a file share enumerate all images in a folder on that share. Feature 1: Reading an image (works fine) Reading images works using a custom permission set: <PermissionSet class="NamedPermissionSet" version="1" Name="MyCustomImagePermissionSet" <IPermission class=

MySql.Data in GAC, still SecurityException

早过忘川 提交于 2020-01-04 05:41:08
问题 I have a problem with MySql.Data in a partial trusted environment. I've added MySql.Data to the GAC (by installing it with the MSI from the mysql.com site). As you can see here: >gacutil /l | grep -i mysql MySql.Data, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL MySql.Data.CF, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c4 4d, processorArchitecture=MSIL MySql.Data.Entity, Version=6.5.4.0, Culture=neutral, PublicKeyToken

Signed Java Applet Throws Security Exception on Connect to a Webservice

南笙酒味 提交于 2020-01-03 02:57:20
问题 I have an java applet running on tomcat 5.5. It is signed ( -selfcert). I still get an java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader) Exception, when my Applet tries to connect to a webservice (already in this line): ws_locator = new My_WebserviceLocator(ws_adress + "?wsdl", new javax.xml.namespace.QName("http://impl.webservice", "My_Webservice")); Since there are some similar questions here, an i read them: Yes, the applet is signed. I

Calling WCF Service from Silverlight

我只是一个虾纸丫 提交于 2020-01-02 05:13:29
问题 Im calling a locally hosted wcf service from silverlight and I get the exception below. Iv created a clientaccesspolicy.xml, which is situated in the route of my host. <?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="*"/> </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </grant-to> </policy> </cross-domain-access> </access-policy> An error occurred while trying to make a request to URI

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

无人久伴 提交于 2020-01-01 02:10:09
问题 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

Android SecurityException on PDF Send Intent

六眼飞鱼酱① 提交于 2019-12-30 05:16:25
问题 I'm getting the following exception during an ACTION_SEND intent with a data type application/pdf : java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.SEND typ=application/pdf flg=0x3080000 cmp=com.adobe.reader/.ARSendForSignature (has extras) } This brings up a dialog to choose the desired application to receive the PDF. I believe the SecurityException is being thrown when a user chooses Adobe Reader from the list, although it appears to be opening