System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志

win7下用c#开发windows服务 在win7系统下用C#开发windows服务程序,解决了 “未找到源,但未能搜索某些或全部事件日志。不可访问的日志: Security。”的解决方法。 立即下载

好久没写C#的代码了,结果今天就遇到个郁闷的问题:
WindowsService写好以后,居然安装不上,异常如下:
======================================================

正在运行事务处理安装。

正在开始安装的“安装”阶段。
查看日志文件的内容以获得 D:\VSProjects\WindowsService2\WindowsService2\bin\Debug\WindowsService2.exe 程序集的进度。
该文件位于 D:\VSProjects\WindowsService2\WindowsService2\bin\Debug\WindowsService2.InstallLog。

在“安装”阶段发生异常。
System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可访问的日志: Security。

正在开始安装的“回滚”阶段。
查看日志文件的内容以获得 D:\VSProjects\WindowsService2\WindowsService2\bin\Debug\WindowsService2.exe 程序集的进度。
该文件位于 D:\VSProjects\WindowsService2\WindowsService2\bin\Debug\WindowsService2.InstallLog。

“回滚”阶段已成功完成。

已完成事务处理安装。
========================================================
主要是红色的那句,百度了一下,很幸运,一下就找到了解决办法:

1.这种情况是出现在Windows7系统下的,所以你的系统如果不是,那应该和我情况不一样
2.将安装的命令写成BAT文件,注意路径
3.点击右键,“以管理员身份运行”
4.OK!

system.Security.SecurityException 不受信任 NULL 博文链接:https://duanfei.iteye.com/blog/2437258 立即下载

相关推荐

使用C#实现写入系统日志

因为我不想使用自己写文件,我的软件是绿色的,所以把日志写到 Windows 日志。 首先告诉大家什么是系统日志,请看下面 如果需要写日志,需要管理员权限,如果没有权限会出现下面异常 System.Security.SecurityException:“未找到源,但未能搜索某些或全部事件日志。 不可访问的日志: Security 需要判断当前是否已经存在日志,下面我来创建一个事件叫 “德熙” if (EventLog.SourceExists("德熙")) { EventLog.CreateEventSource("德熙", "Application"); } 这里的 Ap

无法从命令行或调试器启动服务,必须首先安装Windows服务....。在“安装”阶段发生异常。 System.Security.SecurityException:未找到源

无法从命令行或调试器启动服务,必须首先安装Windows服务(使用installutil.exe),然后用ServerExplorer、Windows服务器管理工具或NET START命令启动它。 Windows Service服务 出现System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可访问的日志: Security。...

qq_52940988的博客 2万+

告别黑盒调试:用MMSegmentation可视化工具链,从训练到评估一目了然

本文介绍了如何利用MMSegmentation的可视化工具链,从训练到评估实现语义分割模型的透明化调试。通过整合日志分析、混淆矩阵、PR曲线等工具,开发者可以快速定位模型问题,优化性能。文章详细展示了训练曲线分析、性能剖析、混淆矩阵解读和PR曲线应用等关键步骤,帮助用户告别黑盒调试,提升模型开发效率。

weixin_29100927的博客 104

【已解决】Windows Service服务 出现System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可访问的日志: Security。

bat文件 内容为 %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe WindowsServiceTest.exe Net Start Service1 pause 其中%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe为instal

青阳十五的专栏 2万+

给爸妈买的红米12C想装个老年桌面?先别急,解锁BL和Root前你得知道这些

本文详细解析了红米12C解锁BL和Root的利弊,为想要为长辈简化手机操作的用户提供全面指南。文章对比了BL解锁与Root的技术差异,推荐优先使用MIUI内置的极简模式等官方功能,并评估了Root的实际必要性。若必须Root,提供了安全操作流程和长期维护建议,帮助用户做出明智选择。

weixin_30265103的博客 318

【SLAM】探索explore_lite在移动机器人自主建图中的高效边界检测策略

本文深入解析了explore_lite在移动机器人自主建图中的应用,重点探讨了其高效的贪婪边界检测策略。该工具包专为资源受限平台设计,通过直接利用SLAM生成的地图信息,以极低的计算开销实现快速、稳定的未知区域探索,并与move_base导航框架无缝协作,是轻量级机器人自主探索的优选方案。

purple的博客 1067

Windows Service服务 出现System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志

【已解决】Windows Service服务 出现System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可访问的日志: Security。 青阳十五 2016-12-24 23:37:12 15574 收藏 分类专栏: C# 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 本文链接:https://blog.csdn.net/yemoweiliang/article/details/53..

huiguoyuan的博客 3255

matlab电偶极子源码,电偶极子的MATLAB场模拟

电偶极子周围电场电势分布的MATLAB三维模拟Matlab可以用于模拟四维场的效果,本文以电偶极子的电场和电势场为例展示MATLAB在该方面领域的应用。摘要电偶极子由一个正电荷和一个负电荷组成,其电场和空间电势分布与单电荷相比具有一些重要的特性。本文将给出电场和电势场的近似表达式。这两个量的精确表达式是复杂的,不太常用,因此 MATLAB 被采用来操作精确值和绘制三维分布的远区域, 近区域和一侧区...

weixin_35135480的博客 3150

【已解决】C#WindowsService System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。 不可访问的日志: Security, S

问题: 点击运行install.bat文件或右键管理员运行,出现**System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。 不可访问的日志: Security, State。** 解决方案: (1)以管理员身份运行cmd; (2)而后将进入bat文件下,如图(1、cd 文件路径 2、盘符名称): (3)而后在cmd中输入“install.bat”即可正确安装。 卸载服务将“install.bat”改为“uninstall.bat”即可。 ...

qq_32911691的博客 4156

[逆向实战] 淘宝x5sec滑条验证码slidedata参数逆向与自动化过码方案

本文详细解析了淘宝x5sec滑条验证码的核心参数slidedata的生成机制与逆向过程,提供了Python自动化过码方案。通过分析滑动轨迹加密流程、还原AES加密算法,并设计人类行为模拟轨迹,帮助开发者有效绕过淘宝滑块验证,适用于爬虫开发与自动化测试场景。

weixin_30851867的博客 735

闲置服务器之代理服务器篇

这台服务器是在阿里云免费白嫖的,天工开物计划,阿里给的300块无门槛优惠券,买了一台新加坡的境外服务器,288,刚刚抵扣完,因为是境外服务器,能够访问一些国内不能访问的网站,所以本文章仅从技术的角度来搭建代理服务器,使用时,请自觉遵守国家相关规定,如有任何违法行为,与本人无任何关系!!!。本文使用tinyproxy来搭建代理服务器。

m0_50281408的博客 2104

Windows服务安装异常:System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可 访问的日志: Security

Windows服务安装异常:System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可 访问的日志: Security 2种方法处理: 一、右键单击“以管理员身份运行”Visual Studio Command Prompt即可 二、以管理员身份运行vs,然后打开项目,再执行InstallService程序安装服务。

每天进步一点点 4万+

【PointNet++】使用Open3D对分割后的结果可视化

PointNet++中的局部分割网络预测后是没有可视化文件的,所以需要自己通过编写Open3D或者PCL点云算法去可视化,在本人经过查找翻阅修改后,实现了网络输出点云分割后结果的可视化。已实现推测单个点云,并可视化。

纵马踏花向自由 2453

System.Security.SecurityException:未找到源,但未能搜索某些或全部事件日志。不可访问的日志:Security,State.

System.Security.SecurityException

kenzoh的博客 966

基于Qt C++开发一款国产化的福昕风格PDF编辑工具

QString text = QInputDialog::getText(this, "文本批注", "输入批注内容:", QLineEdit::Normal, "", &ok);QString savePath = QFileDialog::getSaveFileName(this, "保存加密PDF", "", "PDF文件 (*.pdf)");QAction* zoomInAct = new QAction(QIcon::fromTheme("zoom-in"), "放大", this);

寒寒豆豆软件公司的博客 236

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可访问的日志: Security。

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Security

gcc0106的专栏 2067

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

在windows 安装服务报异常:System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可 访问的日志: Security

在windows 安装服务报异常:System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可 访问的日志: Security

tengqingyong的博客 4708

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可 访问的日志: Security

报错

qq_41812381的博客 2307

Windows服务安装异常:System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可 访问的日志: Security...

Windows服务安装异常:System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可 访问的日志: Security 转:http://blog.csdn.net/joyhen/article/details/42262305 Windows服务安装异常:System.Secur...

weixin_30675967的博客 192
上一篇: 擅用异常处理try catch(java-unrar-0.3.jar)
下一篇: Win7 下VS2008 试用版 升级
Fanny
博客等级 码龄20年 9粉丝 46原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值