王者荣耀太乙真人台词为什么经籦an

【已解决】Windows Service服务 出现System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可访问的日志: Security。 - 博客频道 - CSDN.NET
青阳十五的专栏
bat文件 内容为
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\
InstallUtil.exe &
InstallUtil F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.exe
Net Start Service1
其中C:\Windows\Microsoft.NET\Framework\v4.0.30319\为installutil的路径
WindowsServiceTest.exe为Windows Service服务的应用程序,
Service1为服务名
ps:.bat与WindowsServiceTest.exe在同一路径
运行结果:
正在运行事务处理安装。
正在开始安装的“安装”阶段。
查看日志文件的内容以获得 F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.exe 程
序集的进度。
该文件位于 F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.InstallLog。
正在安装程序集“F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.exe”。
受影响的参数是:
&& logtoconsole =
&& logfile = F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.InstallLog
&& assemblypath = F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.exe
正在安装服务 Service1...
正在日志 Application 中创建 EventLog 源 Service1...
在“安装”阶段发生异常。
System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。& 不
可访问的日志: Security。
正在开始安装的“回滚”阶段。
查看日志文件的内容以获得 F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.exe 程
序集的进度。
该文件位于 F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.InstallLog。
正在回滚程序集“F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.exe”。
受影响的参数是:
&& logtoconsole =
&& logfile = F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.InstallLog
&& assemblypath = F:\WindowsServiceTest_1_0_0_0\WindowsServiceTest.exe
正在将事件日志还原到源 Service1 的前一状态。
在 System.Diagnostics.EventLogInstaller 安装程序的“回滚”阶段发生异常。
System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。& 不
可访问的日志: Security。
在安装的“回滚”阶段发生异常。将忽略该异常并继续回滚。但是,在完成回滚后计算机可
能无法完全还原到它的初始状态。
“回滚”阶段已成功完成。
已完成事务处理安装。
安装失败,已执行回滚。
F:\WindowsServiceTest_1_0_0_0&Net Start Service1
服务名无效。
请键入 NET HELPMSG 2185 以获得更多的帮助。
很明显了,是权限问题。
【解决方案】
右键管理员权限打开.bat文件
yemoweiliang
排名:千里之外
(9)(9)(12)(1)(1)(1)(3)(3)(16)(3)(1)(1)(2)(0)(3)I have two applications.
I'm trying to share a file from application A to application B using a FileProvider.
Application A calls the insert method on a ContentProvider in Application B to insert a record. The data inserted includes the Uri to the file I want to share from App A.
The ContentProvider in App B would then try to read the shared file from App A.
Since I'm not using an Intent to share the file, I'm calling Context.grantUriPermission in App A to allow the read (and at times write):
mContext.grantUriPermission(MyPackageName, contentUri, Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
However, executing this line gives me (Names changed to protect the innocent):
java.lang.SecurityException: Uid 10066 does not have permission to uri content://au.com.example.AppA.fileprovider/MyFolder/MyFileName
at android.os.Parcel.readException(Parcel.java:1322)
at android.os.Parcel.readException(Parcel.java:1276)
at android.app.ActivityManagerProxy.grantUriPermission(ActivityManagerNative.java:2374)
at android.app.ContextImpl.grantUriPermission(ContextImpl.java:1371)
at android.content.ContextWrapper.grantUriPermission(ContextWrapper.java:400)
App A has the following in the Manifest file:
android:name="android.support.v4.content.FileProvider"
android:authorities="au.com.example.AppA.fileprovider"
android:exported="false"
android:grantUriPermissions="true"
android:readPermission="au.com.example.READ_CONTENT"
android:writePermission="au.com.example.WRITE_CONTENT" &
&meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" /&
&/provider&
filepaths.xml has:
&files-path
name="MyFolder"
path="MyFolder/" /&
Both App A and App B have the following:
&uses-permission android:name="au.com.example.READ_CONTENT" /&
&uses-permission android:name="au.com.example.WRITE_CONTENT" /&
I've tried defining the permissions in both apps. They are both signed with the same debug signature:
&permission
android:name="au.com.example.READ_CONTENT"
android:permissionGroup="MyGroup"
android:protectionLevel="signature" &
&/permission&
&permission
android:name="au.com.example.WRITE_CONTENT"
android:permissionGroup="MyGroup"
android:protectionLevel="signature" &
&/permission&
The actual path the file ends up in is:
/data/.example.AppA/files/MyFolder
At this point I'm stumped. I don't know why I can't grant permission for a file I just created within the same application.
So my questions are: Why am I getting this exception and how can I successfully grant permission to App B?
解决方案 Well, after a week and a lot of trial and error, it seems the answer is to not specify permissions.
So the App A Manifest should instead contain:
android:name="android.support.v4.content.FileProvider"
android:authorities="au.com.example.AppA.fileprovider"
android:exported="false"
android:grantUriPermissions="true" &
&meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" /&
&/provider&
ie, I removed the read and write permissions. My initial understanding, and failing to find documentation that said otherwise, was these were necessary to restrict access.
However, I've found they actually interfere and cause Context.grantUriPermission to fail. Access is limited already.
To complete the picture, and answer the second part of my question, I found the following:
I had to add:
final long token = Binder.clearCallingIdentity();
[retrieve file here]
} finally {
Binder.restoreCallingIdentity(token);
to the Content Provider in App B.
Otherwise it would get security errors as well.
本文地址: &
我有两个应用程序。我想用一个FileProvider分享从应用程序中的一个文件,应用程序B。应用A调用在应用程序B ContentProvider的插入方法插入一条记录。插入的数据包括开放的我们在附录二我要分享的文件从应用程序答的ContentProvider然后将尝试读取应用程序A的共享文件
因为我没有使用一个Intent共享的文件,我打电话 Context.grantUriPermission 在应用程序中的允许读取(有时写):
mContext.grantUriPermission(MyPackageName,contentUri,Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
但是,在执行此行给我(名称变更为保护无辜者):
java.lang.SecurityException异常:的Uid 10066无权到URI内容://au.com.example.AppA.fileprovider/MyFolder/MyFileName
在android.os.Parcel.readException(Parcel.java:1322)
在android.os.Parcel.readException(Parcel.java:1276)
在android.app.ActivityManagerProxy.grantUriPermission(ActivityManagerNative.java:2374)
在android.app.ContextImpl.grantUriPermission(ContextImpl.java:1371)
在android.content.ContextWrapper.grantUriPermission(ContextWrapper.java:400)
应用程序中的有以下清单文件中:
<供应商
机器人:名称=“android.support.v4.content.FileProvider”
机器人:当局=“au.com.example.AppA.fileprovider”
机器人:出口=“假”
机器人:grantUriPermissions =“真”
机器人:readPermission =“au.com.example.READ_CONTENT”
机器人:writePermission =“au.com.example.WRITE_CONTENT”>
&所述;元数据
机器人:名称=“android.support.FILE_PROVIDER_PATHS”
机器人:资源=“@ XML /文件路径”/>
< /供应商>
filepaths.xml有:
<路径>
<文件路径
NAME =“MyFolder的”
路径=“MyFolder中/”/>
< /路径>
这两个应用程序A和应用程序B具有以下内容:
<使用-权限的Android:名称=“au.com.example.READ_CONTENT”/>
<使用-权限的Android:名称=“au.com.example.WRITE_CONTENT”/>
我试图定义在这两个应用程序的权限。它们都具有相同的调试签名进行签名:
机器人:名称=“au.com.example.READ_CONTENT”
机器人:permissionGroup =“MYGROUP”
安卓的ProtectionLevel =“签名”>
< /许可>
机器人:名称=“au.com.example.WRITE_CONTENT”
机器人:permissionGroup =“MYGROUP”
安卓的ProtectionLevel =“签名”>
< /许可>
文件结束了在实际的路径是:
/data/.example.AppA/files/MyFolder
在这一点上我很为难。我不知道为什么我不能为我一样的应用程序中创建的文件授予权限。所以,我的问题是:为什么我会得到这个例外,我怎么能成功地授予权限,附录二
解决方案 好了,一个星期,大量的试验和错误之后,似乎答案是没有指定的权限。因此,应用程序中的清单而应该包括:
<供应商
机器人:名称=“android.support.v4.content.FileProvider”
机器人:当局=“au.com.example.AppA.fileprovider”
机器人:出口=“假”
机器人:grantUriPermissions =“真正的”>
&所述;元数据
机器人:名称=“android.support.FILE_PROVIDER_PATHS”
机器人:资源=“@ XML /文件路径”/>
< /供应商>
也就是说,我删除了读取和写入权限。我最初的理解,并没有找到文档说,否则,是这些是必要的,以限制访问。然而,我发现他们实际上干扰而引起的 Context.grantUriPermission 失败。访问已经有限。
要完成的图片,并回答了我的问题的第二部分,我发现了以下内容:
Android拒绝的权限在控件RemoteViewsFactory的内容
我不得不添加:
最后长令牌= Binder.clearCallingIdentity();
[点击这里获取文件]
Binder.restoreCallingIdentity(标记);
到内容提供商在应用程序B.否则,它会得到安全的错误也是如此。
本文地址: &
扫一扫关注官方微信[求助] weblogic 起不来了,前几天 都没问题 今天 突然就 起不来【java吧】_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:627,789贴子:
[求助] weblogic 起不来了,前几天 都没问题 今天 突然就 起不来收藏
具体错误信息如下:Exception in thread &main& java.lang.NoClassDefFoundError: weblogic.security.SecurityLogger
at weblogic.security.utils.SecurityUtils.turnOffCryptoJDefaultJCEVerification(SecurityUtils.java:81)
at weblogic.Server.main(Server.java:67)Caused by: java.lang.ClassNotFoundException: weblogic.security.SecurityLogger
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
... 2 more然后,现在网上也没有 相应的 解答,求助啊!!!
找人 帮忙!!!
Caused by: java.lang.ClassNotFoundException: weblogic.security.SecurityLogger目测weblogic 中有文件丢失了
找找补上。
登录百度帐号推荐应用查看: 5272|回复: 6
java.lang.SecurityException和NoSuchFieldException
签到天数: 2 天连续签到: 1 天[LV.1]初来乍到主题帖子e币
<td class="t_f" id="postmessage_-26 16:36:32.935: E/DatabaseUtils(2959): java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
02-26 16:36:32.935: E/DatabaseUtils(2959): & & & & at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13082)
02-26 16:36:32.935: E/DatabaseUtils(2959): & & & & at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
02-26 16:36:32.935: E/DatabaseUtils(2959): & & & & at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:577)
02-26 16:36:32.935: E/DatabaseUtils(2959): & & & & at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
02-26 16:36:32.935: E/DatabaseUtils(2959): & & & & at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:273)
02-26 16:36:32.935: E/DatabaseUtils(2959): & & & & at android.os.Binder.execTransact(Binder.java:388)
02-26 16:36:32.935: E/DatabaseUtils(2959): & & & & at dalvik.system.NativeStart.run(Native Method)
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): java.lang.NoSuchFieldException: Container with Id 1 does not exists
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): & & & & at com.sec.enterprise.knox.EnterpriseContainerManager.&init&(EnterpriseContainerManager.java:706)
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): & & & & at com.sec.enterprise.knox.EnterpriseKnoxManager.getEnterpriseContainerManager(EnterpriseKnoxManager.java:243)
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): & & & & at com.sec.knox.containeragent.core.ContainerServiceAdapter.getInstance(ContainerServiceAdapter.java:55)
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): & & & & at com.sec.knox.containeragent.app.util.ContainerNotification.updateModechangeNotification(ContainerNotification.java:158)
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): & & & & at com.sec.knox.containeragent.service.notification.EnterpriseNotificationCenter$5.onReceive(EnterpriseNotificationCenter.java:998)
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): & & & & at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:781)
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): & & & & at android.os.Handler.handleCallback(Handler.java:730)
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): & & & & at android.os.Handler.dispatchMessage(Handler.java:92)
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): & & & & at android.os.Looper.loop(Looper.java:137)
02-26 16:39:25.860: E/EnterpriseKnoxManager(2959): & & & & at com.android.server.ServerThread.run(SystemServer.java:1866)
签到天数: 2 天连续签到: 1 天[LV.1]初来乍到主题帖子e币
谁遇到过这两个异常
该用户从未签到主题帖子e币
根据提示,缺少android.permission.INTERACT_ACROSS_USERS_FULL权限,请在AndroidManifest里声明。
已经加过这个权限了还是报这个错误怎么破&
该用户从未签到主题帖子e币
该用户从未签到主题帖子e币
首先你要在AndroidManifest当中加入读写sd卡的权限,
不知道你的路径,你是想打开文件还是下载文件进行存储
如果是下载存储:
你需要检测手机中是否有sd卡,如果有sd卡就可以正常下载,存储在你设定的文件夹,如果检测到没有sd卡则需要存储到项目当中data/data中
如果是打开文件:
打开sd卡当中的文件一切正常,如果访问的项目中的文件,属于内部存储,需要添加权限,然后就可以打开文件
签到天数: 4 天连续签到: 1 天[LV.2]偶尔看看I主题帖子e币
这个也太多了1!
签到天数: 62 天连续签到: 1 天[LV.6]常住居民II主题帖子e币
根据提示,缺少android.permission.INTERACT_ACROSS_USERS_FULL权限,请在AndroidManifest里声明。 ...
已经加过这个权限了还是报这个错误怎么破
QQ已认证,此人靠谱
推荐阅读热门话题
61887420384328283281261252226218208204201192715
22&分钟前1&小时前2&小时前3&小时前4&小时前5&小时前5&小时前5&小时前6&小时前昨天&23:56昨天&21:50昨天&16:27昨天&14:40昨天&09:38昨天&09:15昨天&09:04
Powered by

我要回帖

更多关于 王者荣耀太乙真人 的文章

 

随机推荐