Tag: securityexception

SecurityException:必须将ECall方法打包到系统模块中

我有一个(C#)函数类似于以下内容。 private static bool SpecialCase = false; public void Foo() { if (SpecialCase) { InternalMethod(); return; } Console.WriteLine(); } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void InternalMethod(); 当我在debugging器中使用.NET Framework 4执行此操作时,该方法成功地将空白行打印到控制台并返回。 当我在debugging器外部执行它时,它会抛出一个exception,并显示以下消息: System.Security.SecurityException: ECall methods must be packaged into a system module. 当JIT编译器编译方法而不是调用(if) InternalMethod时,会出现exception。 有什么我能做的(例如属性)告诉CLI要么不抛出SecurityException ,要么延迟exception,直到实际调用方法? 使用案例的附注:使用Microsoft .NET Framework运行时, SpecialCase字段实际上是错误的,而在CLI的另一个(特定)实现下运行时,则为true。 在Microsoft .NET Framework下运行时,对InternalMethod的调用实际上是无法访问的。

源未find,但部分或全部事件日志无法search

我收到以下例外。 我已经完全控制了registry编辑中Eventlogs上的Asp.net帐户。 [SecurityException:未find源,但无法search部分或全部事件日志。 无法访问的日志:安全。] System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate) +664 System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate) +109 System.Diagnostics.EventLog.SourceExists(String source) +14 Microsoft.ApplicationBlocks.ExceptionManagement.DefaultPublisher.VerifyValidSource() +41 我猜这是由于服务器上的一些configuration问题?

Java SecurityException:签名者信息不匹配

像往常一样重新编译我的类,并突然得到以下错误信息。 为什么? 我该如何解决? 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)

Android:java.lang.SecurityException:权限拒绝:启动意图

我创build了一个应用程序,其中包含从其他应用程序调用的GWVectraNotifier活动,以显示通知。 在通知对话框中,将出现“显示”button和“closures”button。 点击“显示”button,相应的活动将开始。 要检查上述应用程序的function, 我从K9Mail应用程序启动了checkmail事件触发器的GWVectraNotifier活动。 我能够成功启动GWVectraNotifier活动,但是点击“显示”button,我将不得不启动K9mail的“MessageList”活动。为此,我写了下面的代码: Intent i = new Intent(); i.setComponent(new ComponentName("com.fsck.k9", "com.fsck.k9.activity.MessageList")); i.putExtra("account", accUuid); i.putExtra("folder", accFolder); startActivity(i); 其中抛出: WARN/ActivityManager(59): Permission denied: checkComponentPermission() reqUid=10050 WARN/ActivityManager(59): Permission Denial: starting Intent { cmp=com.fsck.k9/.activity.MessageList (has extras) } from ProcessRecord{43f6d7c8 675:com.i10n.notifier/10052} (pid=675, uid=10052) requires null WARN/System.err(675): java.lang.SecurityException: Permission Denial: starting Intent { cmp=com.fsck.k9/.activity.MessageList (has extras) } from ProcessRecord{43f6d7c8 […]