发布程序提示“未能创建默认证书。正在中止发布” 高分

fqlalala 2011-10-25 06:54:15
发布程序是报错“未能创建默认证书。正在中止发布”。。。谁能帮帮忙。
还有一个比较急的问题,我发布了以后的东西,如何才能将其作为服务添加至开机启动。
ps:“添加到开始中的开机启动”我已经知道了
...全文
686 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
fqlalala 2011-10-25
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 juliohuang 的回复:]

Windows service 是用InstallUtil安装的不要发布啊
[/Quote]
我也是用这个这个方法,但是继续不下去了。。。本人愚钝,能加下QQ和我说下么?396314260
黄亮 2011-10-25
  • 打赏
  • 举报
回复
Windows service 是用InstallUtil安装的不要发布啊
黄亮 2011-10-25
  • 打赏
  • 举报
回复

InstallUtil.exe YourService.exe


[RunInstaller(true)]
public class WindowsServiceInstaller : Installer
{
/// <summary>
/// Public Constructor for WindowsServiceInstaller.
/// - Put all of your Initialization code here.
/// </summary>
public WindowsServiceInstaller()
{
var serviceProcessInstaller =
new ServiceProcessInstaller();
var serviceInstaller = new ServiceInstaller();

//# Service Account Information
serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
serviceProcessInstaller.Username = null;
serviceProcessInstaller.Password = null;

//# Service Information
serviceInstaller.DisplayName = "YourService";
serviceInstaller.StartType = ServiceStartMode.Automatic;

//# This must be identical to the WindowsService.ServiceBase name
//# set in the constructor of WindowsService.cs
serviceInstaller.ServiceName = "YourService";

Installers.Add(serviceProcessInstaller);
Installers.Add(serviceInstaller);
}
}

110,535

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧