简体   繁体   English

错误 1053 服务没有及时响应启动或控制请求

[英]Error 1053 the service did not respond to the start or control request in a timely fashion

I have created and installed a service a couple of times.我已经创建并安装了几次服务。 Initially it was working fine, but after some changes in the service Code it start giving the error when I restart the service in Services.msc :最初它工作正常,但是在服务代码中进行了一些更改后,当我在 Services.msc 中重新启动服务时它开始给出错误:

Error 1053: the service did not respond to the start or control request in a timely fashion错误1053:服务没有及时响应启动或控制请求

Code:代码:

public partial class AutoSMS : ServiceBase
{
    public AutoSMS()
    {
        InitializeComponent();
        eventLog1.Clear();

        if (!System.Diagnostics.EventLog.SourceExists("MySource"))
        {
            System.Diagnostics.EventLog.CreateEventSource(
                "MySource", "MyNewLog");
        }
        eventLog1.Source = "MySource";
        eventLog1.Log = "MyNewLog";

        Timer checkForTime = new Timer(5000);
        checkForTime.Elapsed += new ElapsedEventHandler(checkForTime_Elapsed);
        checkForTime.Enabled = true;

    }

    protected override void OnStart(string[] args)
    {
        eventLog1.WriteEntry("In OnStart");
    }

    protected override void OnStop()
    {
        eventLog1.WriteEntry("In onStop.");
    }


    void checkForTime_Elapsed(object sender, ElapsedEventArgs e)
    {
        string Time = "15:05:00";
        DateTime dateTime = DateTime.ParseExact(Time, "HH:mm:ss",
                                        CultureInfo.InvariantCulture);

        if (DateTime.Now == dateTime) ;
            eventLog1.WriteEntry(Time);
    }
}

Here is my main method code这是我的主要方法代码

static void Main()
{
    ServiceBase[] ServicesToRun;
    ServicesToRun = new ServiceBase[] 
    { 
        new AutoSMS() 
    };
    ServiceBase.Run(ServicesToRun);
}

I also tried the following steps :我还尝试了以下步骤:

  • Go to Start > Run > and type regedit转到开始 > 运行 > 并键入 regedit
  • Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control导航到:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
  • With the control folder selected, right click in the pane on the right and - select new DWORD Value选择控制文件夹后,右键单击右侧窗格并 - 选择新的 DWORD 值
  • Name the new DWORD: ServicesPipeTimeout将新的 DWORD 命名为:ServicesPipeTimeout
  • Right-click ServicesPipeTimeout, and then click Modify右键单击 ServicesPipeTimeout,然后单击修改
  • Click Decimal, type '180000', and then click OK单击十进制,键入“180000”,然后单击确定
  • Restart the computer重新启动计算机

I used to install and uninstall it with following command :我曾经使用以下命令安装和卸载它:

installutil AutoSMS.exe

installutil /u AutoSMS.exe

In my case, I was publishing service while it was in debug mode.就我而言,我在调试模式下发布服务。

Solution was:解决方案是:

  • Changing solution to release mode将解决方案更改为发布模式
  • Uninstall old service with command InstallUtil -u WindowsServiceName.exe使用命令InstallUtil -u WindowsServiceName.exe卸载旧服务
  • installing service again InstallUtil -i WindowsServiceName.exe再次安装服务InstallUtil -i WindowsServiceName.exe

It worked perfectly after.之后效果很好。

As others have pointed out, this error can have a multitude of causes.正如其他人指出的那样,此错误可能有多种原因。 But in the hopes that this will help somebody out, I'll share what happened in our case.但希望这能帮助别人,我将分享我们案例中发生的事情。 For us, our service had been upgraded to .NET 4.5, but the server did not have .NET 4.5 installed.对我们来说,我们的服务已经升级到 .NET 4.5,但是服务器没有安装 .NET 4.5。

After spending some time on the issue, trying solutions that didn't work, I run into this blog .在这个问题上花了一些时间,尝试了不起作用的解决方案后,我遇到了这个博客 It suggests to wrap the service initialization code in a try/catch block, like this, and adding EventLog它建议将服务初始化代码包装在 try/catch 块中,就像这样,并添加 EventLog

using System;
using System.Diagnostics;
using System.ServiceProcess;

namespace WindowsService
{
    static class Program
    {
        static void Main()
        {
            try
            {
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[] 
                { 
                    new Service1() 
                };
                ServiceBase.Run(ServicesToRun);
            }
            catch (Exception ex)
            {
                EventLog.WriteEntry("Application", ex.ToString(), EventLogEntryType.Error);
            }
        }
    }
}

Then, uninstall the old service, redeploy the service with these modifications.然后,卸载旧服务,使用这些修改重新部署服务。 Start the service and check out the Event Viewer/Application logs.启动服务并检查事件查看器/应用程序日志。 You'll see what the real problem is, which is the underlying reason for the timeout.您将看到真正的问题是什么,这就是超时的根本原因。

I encountered the same issue and was not at all sure how to resolve it.我遇到了同样的问题,完全不知道如何解决。 Yes this occurs because an exception is being thrown from the service, but there are a few general guidelines that you can follow to correct this:是的,这是因为服务引发了异常,但您可以遵循一些一般准则来纠正此问题:

  • Check that you have written the correct code to start the service: ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new WinsowsServiceToRun() }; ServiceBase.Run(ServicesToRun);检查您是否编写了正确的代码来启动服务: ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new WinsowsServiceToRun() }; ServiceBase.Run(ServicesToRun); ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new WinsowsServiceToRun() }; ServiceBase.Run(ServicesToRun);
  • You need to ensure that there is some kind of infinite loop running in the class WinsowsServiceToRun您需要确保在 WinsowsServiceToRun 类中运行某种无限循环

  • Finally, there may be some code which is not logging anything and closing the program abruptly (which was the case with me), in this case you will have to follow the old school of debugging which needed to write a line to a source (text/db/wherever).最后,可能有一些代码没有记录任何内容并突然关闭程序(我就是这种情况),在这种情况下,您将不得不遵循需要向源代码写入一行的老式调试方法(文本/db/任何地方)。 What I faced was that since the account running the service was not "Admin", the code was just falling off and not logging any exceptions in case it was trying to write to "Windows Event Log" even though the code was there to log exceptions.我面临的是,由于运行该服务的帐户不是“管理员”,因此代码只是脱落并且没有记录任何异常,以防它试图写入“Windows事件日志”,即使代码在那里记录异常. Admin privilege is actually not needed for logging to Even Log but it is needed to define the source.登录 Even Log 实际上不需要管理员权限,但需要定义源。 In case source of the event is not already defined in the system and the service tries to log it for the first time without admin privilege it fails.如果系统中尚未定义事件源并且服务尝试在没有管理员权限的情况下首次记录它,则会失败。 To solve this follow below steps:要解决此问题,请执行以下步骤:

    1. Open command prompt with admin privilege以管理员权限打开命令提示符
    2. Paste the command : eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO <<Source>> /D "<<SourceUsingWhichToWrite>>"粘贴命令: eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO <<Source>> /D "<<SourceUsingWhichToWrite>>"
    3. Press enter按回车
    4. Now start the service现在启动服务

I have just tried this code locally in .Net 4.5 and the service starts and stops correctly for me.我刚刚在 .Net 4.5 中本地尝试了此代码,并且该服务为我正确启动和停止。 I suspect your problem may be around creating the EventLog source.我怀疑您的问题可能与创建 EventLog 源有关。

The method:方法:

EventLog.SourceExists("MySource")

requires that the user running the code must be an administrator, as per the documentation here:要求运行代码的用户必须是管理员,根据此处的文档:

http://msdn.microsoft.com/en-us/library/x7y6sy21(v=vs.110).aspx http://msdn.microsoft.com/en-us/library/x7y6sy21(v=vs.110).aspx

Check that the service is running as a user that has administrator privileges.检查该服务是否以具有管理员权限的用户身份运行。

It is because of the Microsoft Windows Service Control, it controls sometimes the state of the services.这是因为 Microsoft Windows 服务控制,它有时控制服务的状态。 If the service don´t send a respond in 30 seconds, then you will have this error.如果服务在 30 秒内没有发送响应,那么您将收到此错误。

You can modified the registry, so the service will have more time to respond可以修改注册表,让服务有更多时间响应

Go to Start > Run > and type regedit
Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
With the control folder selected, right click in the pane on the right and select new DWORD Value
Name the new DWORD: ServicesPipeTimeout 
Right-click ServicesPipeTimeout, and then click Modify
Click Decimal, type '180000', and then click OK
Restart the computer

Or be sure that in that moment there is not another process talking with the service, maybe there is a conflict I don´t know或者确保在那一刻没有另一个进程与服务交谈,也许有冲突我不知道

I was getting exactly same issue, All I have done is to to change the Debug mode to Release while compiling the dll.我遇到了完全相同的问题,我所做的就是在编译 dll 时将调试模式更改为发布。 This has solved my probelm, how/why?这解决了我的问题,如何/为什么? I dont know I have already asked a question on SO我不知道我已经问过一个关于 SO 的问题

After spending too much time on this issue.在这个问题上花费了太多时间之后。 I found the EventLog cause all that mess although I used it properly.尽管我使用得当,但我发现EventLog导致了所有的混乱。

Whoever tackle this issue, I would suggest you to get rid of the EventLog .无论谁解决此问题,我都建议您摆脱EventLog Use better tools like " log4net ".使用更好的工具,例如“ log4net ”。

Also, you need to check your configuration file content.此外,您需要检查您的配置文件内容。

You need to check below the section.您需要检查以下部分。

<startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>

Coz above section need to match with yours .net framework.因为上面的部分需要与你的 .net 框架相匹配。

In the case I ran into this morning, the culprit was a malformed config file.在我今天早上遇到的情况下,罪魁祸首是一个格式错误的配置文件。 The config file had an close comment tag without the open comment tag.配置文件有一个关闭评论标签,没有打开评论标签。 So, double check your config files for errors.因此,请仔细检查您的配置文件是否有错误。

If you would like to register a .NET core 3.1 executable as a Windows Service, please ensure that you added the nuget package Microsoft.Extension.Hosting.WindowsServices in version 3.1.7 or above and initialize the hostBuilder like in the following example:如果您想将 .NET core 3.1 可执行文件注册为 Windows 服务,请确保您在 3.1.7 或更高版本中添加了 nuget 包 Microsoft.Extension.Hosting.WindowsServices 并初始化 hostBuilder,如下例所示:

using Microsoft.Extensions.Hosting;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] arguments)
        {
            IHostBuilder hostBuilder = Host.CreateDefaultBuilder(arguments);
            hostBuilder.UseWindowsService();
            hostBuilder.Build().Run();
        }
    }
}

Now you are able to install the executable and start it as a windows service:现在您可以安装可执行文件并将其作为 Windows 服务启动:

sc.exe create ConsoleApp1 binPath= "<BIN_PATH>\ConsoleApp1.exe"

Check ConnectionStrings if you are using EntityFramework or any other means to initiate database connections at the service startup.如果您使用EntityFramework或任何其他方式在服务启动时启动数据库连接,请检查ConnectionStrings

In my case when i got the error Error 1053 the service did not respond to the start or control request in a timely fashion this is what was going wrong:就我而言,当我收到错误Error 1053 the service did not respond to the start or control request in a timely fashion这就是问题所在:

I was using EntityFramework and had the connection strings wrong.我正在使用 EntityFramework 并且连接字符串错误。 So basically at startup the EntityFramework failed to connect to the database using the incorrect Connection String and timed out.所以基本上在启动时,EntityFramework 无法使用不正确的连接字符串连接到数据库并超时。

Just had to replace the database connection string with the correct one and it worked fine.只需用正确的连接字符串替换数据库连接字符串,它就可以正常工作。

Did not need any framework update or any other system/configuration change at all.根本不需要任何框架更新或任何其他系统/配置更改。

This worked for me.这对我有用。 Basically make sure the Log on user is set to the right one.基本上确保登录用户设置为正确的。 However it depends how the account infrastructure is set.但是,这取决于帐户基础架构的设置方式。 In my example it's using AD account user credentials.在我的示例中,它使用 AD 帐户用户凭据。

In start up menu search box search for 'Services' -In Services find the required service -right click on and select the Log On tab -Select 'This account' and enter the required content/credentials -Ok it and start the service as usual在启动菜单搜索框中搜索“服务”-在“服务”中找到所需的服务-右键单击并选择“登录”选项卡-选择“此帐户”并输入所需的内容/凭据-确定并照常启动服务

在此处输入图像描述

I have installed .Net 4.6 on my WindowsServer computer and the error was fixed.我已经在我的 WindowsServer 计算机上安装了 .Net 4.6,并且错误已修复。

Your control should be this way:你的控制应该是这样的:

  1. Check the .net version of your WindowsService检查您的 WindowsService 的 .net 版本
  2. Then check the .net version of your computer然后检查您计算机的 .net 版本
  3. Match that version, since it's probably not matched匹配那个版本,因为它可能不匹配

One of possible solutions for this problem [It fixed issue at my end and my application is JAVA based application ]:这个问题的一种可能的解决方案[它在我的最后解决了问题,我的应用程序是基于JAVA的应用程序]:

1) check your application is pointing to correct java version(check the java version and path in your application). 1) 检查您的应用程序是否指向正确的 java 版本(检查应用程序中的 java 版本和路径)。

OR或者

2)check the configured java version ie check whether it is 32-bit version or 64-bit version(based on your application). 2)检查配置的java版本,即检查它是32位版本还是64位版本(根据您的应用程序)。 if you are using 32-bit then you should use 32-bit version JSL, else JSL will cause this issue.如果您使用的是 32 位,那么您应该使用 32 位版本的 JSL,否则 JSL 会导致此问题。

This is usually caused by an uncaught exception in the service itself.这通常是由服务本身中未捕获的异常引起的。 (Configuration file errors eg). (例如配置文件错误)。 Opening a command prompt and starting the service executable manually wil perhaps reveal the exception been thrown.打开命令提示符并手动启动服务可执行文件可能会显示引发的异常。

In my experience, I had to stop my existing service to update code.根据我的经验,我不得不停止现有服务来更新代码。 after updating the code and while START the Service I got the same error "Error 1053 the service did not respond to the start or control request in a timely fashion".更新代码并启动服务后,我得到了同样的错误“错误 1053,服务没有及时响应启动或控制请求”。

But this got resolve after RESTARTING THE MACHINE.但这在重新启动机器后得到了解决。

I know this is old question, I used to write my own VB.NET windows service, and it has no issue to start on MS windows 7 and MS windows 10.我知道这是个老问题,我曾经编写自己的 VB.NET windows 服务,在 MS windows 7 和 MS windows 10 上启动没有问题。

I have this issue when I install the windows services on latest MS windows 10 patch.当我在最新的 MS Windows 10 补丁上安装 Windows 服务时,我遇到了这个问题。 The reason the windows service doesn't run it is because the .NET version that needed for the window services to run is not presented in the installed PC. windows 服务不运行的原因是,windows 服务运行所需的 .NET 版本没有出现在已安装的 PC 中。

After you have installed the windows services.安装完windows服务后。 go to the install folder for example C:\Program files (x86)\Service1\Service1.exe and double click to run it.转到安装文件夹,例如 C:\Program files (x86)\Service1\Service1.exe 并双击运行它。 If there is missing .NET framework package, it will prompt the user to download it.如果缺少 .NET 框架包,它会提示用户下载它。 Just download and and wait for it to install.只需下载并等待它安装。

After that restart the windows services in services.msc.之后重新启动 services.msc 中的 Windows 服务。 Hope this answer will help someone who face the issue.希望这个答案能帮助面临这个问题的人。 I know issue is caused by .NET framework version.我知道问题是由 .NET 框架版本引起的。

I scratched my head to clear this error This error might be caused if you are debugging it in the code like我挠了挠头来清除这个错误如果你在代码中调试它可能会导致这个错误

static void Main()
{
 #if DEBUG
            MailService service = new MailService();
             service.Ondebug();
 #else
             ServiceBase[] ServicesToRun;
             ServicesToRun = new ServiceBase[]
             {
                 new MailService()
             };
             ServiceBase.Run(ServicesToRun);
 #endif
         }
     }

After clearing the if,else and endif in the code like this the error has not appeared again....hope it helps....像这样清除代码中的if,elseendif后,错误不再出现....希望对您有所帮助....

static void Main()
{

    ServiceBase[] ServicesToRun;
    ServicesToRun = new ServiceBase[]
    {
        new MailService()
    };
    ServiceBase.Run(ServicesToRun);

}

I'd like to add my solution to this.我想为此添加我的解决方案。 Must admit, I use an additional configuration file ("ServiceIni.xml") with some settings to be changed by user on the fly.必须承认,我使用了一个额外的配置文件(“ServiceIni.xml”),其中一些设置可以由用户即时更改。 When I faced this error I made a research and did following:当我遇到此错误时,我进行了研究并执行了以下操作:

  1. Changed Program.cs to following code:将 Program.cs 更改为以下代码:
        static void Main()
        {
            try
            {
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[]
                {
                new MyService()
                };
                ServiceBase.Run(ServicesToRun);
            }
            catch (Exception ex)
            {
                LogChanges($"Error - {ex.Message}\nInner - {ex.InnerException}");
            }
        }

        static void LogChanges(string message)
        {
            string LogPath = AppDomain.CurrentDomain.BaseDirectory + "MyServiceLog.txt";
            using (StreamWriter wr = File.AppendText(LogPath))
            {
                wr.WriteLine(message);
            }
        }
  1. Then I discovered an exception on startup from the log (it showed even error line number :)):然后我从日志中发现启动时出现异常(它甚至显示错误行号:)):
Error - Configuration system failed to initialize
Inner - System.Configuration.ConfigurationErrorsException: A section using 'configSource' may contain no other attributes or elements. (C:\...\bin\Release\MyService.exe.Config line 24)
   at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
   at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
   at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
   at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
  1. It appeared that one of builds changed my App.config file from:似乎其中一个构建将我的 App.config 文件从:
<!-- Setting to use appSettings from external file -->
  <appSettings configSource="ServiceIni.xml"/>

to

  <appSettings configSource="ServiceIni.xml">
    <add key="ClientSettingsProvider.ServiceUri" value="" />
  </appSettings>

which generated this error.这产生了这个错误。
Fixing back to original App.config solved the issue.修复回原来的 App.config 解决了这个问题。

In my case, the issue was about caching configuration which is set in the App.config file.就我而言,问题在于 App.config 文件中设置的缓存配置。 Once I removed below lines from the App.config file, the issue was resolved.一旦我从 App.config 文件中删除以下行,问题就解决了。

<cachingConfiguration defaultCacheManager="MyCacheManager">
<cacheManagers>
  <add name="MyCacheManager" type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
       expirationPollFrequencyInSeconds="60"
       maximumElementsInCacheBeforeScavenging="50000"
       numberToRemoveWhenScavenging="1000"
       backingStoreName="NullBackingStore" />
</cacheManagers>
<backingStores>
  <add type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
       name="NullBackingStore" />
</backingStores>

I have removed我已删除

EventLog.Exists EventLog.Exists

and fixed.并固定。

In my case I apparently had some extra symbols in my App.config file that I did not notice when building my solution.就我而言,我的 App.config 文件中显然有一些额外的符号,我在构建解决方案时没有注意到这些符号。 So I recomend to check the configuration file for errors first before taking steps with changing registry keys, switching configuration modes, etc.因此,我建议在更改注册表项、切换配置模式等步骤之前先检查配置文件是否有错误。

I had two services running who were accidentally coupled to the same EventSource eventLog.Source = "MySource";我有两个正在运行的服务意外耦合到同一个 EventSource eventLog.Source = "MySource"; After uninstalling both services, and reinstalling the one that suffered from error 1053, my service started up normally.卸载这两项服务并重新安装出现错误 1053 的服务后,我的服务正常启动。

Check if the service starting code is correct,检查服务启动码是否正确,

ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[] 
{ 
    new WinsowsServiceToRun() 
};
ServiceBase.Run(ServicesToRun);

Also, remove any debug codes.此外,删除所有调试代码。 ie, IE,

  #If Debug
         ...
         ...
         ...
        #else
         ...
         ...
        #endif

I had same problem.我有同样的问题。 Unchecking "Sing the ClickOnce manifest", "Sign the assembly" and "Enable ClickOnce security settings" in project properties helped取消选中项目属性中的“Sing the ClickOnce manifest”、“签署程序集”和“启用 ClickOnce 安全设置”有助于

我的问题是appsettings.json在构建过程中没有复制到发布构建文件夹并且简单地将其放入...\bin\Release文件夹并将launchSettings.json内容复制到appsettings.json解决了我的问题。

I had the same issue.我遇到过同样的问题。 Seems like when starting the service the main thread shouldnt be the main worker thread.似乎在启动服务时主线程不应该是主工作线程。 By simply creating a new thread and handing the main work to that thread solved my issue.通过简单地创建一个新线程并将主要工作交给该线程解决了我的问题。

this error can be caused due to various reasons.由于各种原因,可能会导致此错误。 to identify the reason add try/ catch when service is run.确定在服务运行时添加 try/catch 的原因。

        try
            {
                ServiceBase[] ServicesToRun;
                ServicesToRun = new ServiceBase[] 
                { 
                    new Service1() 
                };
                <span class="skimlinks-unlinked">ServiceBase.Run(ServicesToRun</span>);
            }
            catch (Exception ex)
            {
                EventLog.WriteEntry("Application", ex.ToString(), <span class="skimlinks-unlinked">EventLogEntryType.Error</span>);
            }

As nobody has mentioned I will add it (even if it is a stupid mistake).正如没有人提到的那样,我会添加它(即使这是一个愚蠢的错误)。 In case you are on Windows 10 you don't usually need to restart, but如果您使用的是 Windows 10,通常不需要重新启动,但是

-> Make sure to CLOSE any open properties pages of the "services"-window in case you have just installed the service (and still have opened the properties page of the old service). -> 确保关闭“服务”窗口的所有打开的属性页面,以防您刚刚安装了服务(并且仍然打开了旧服务的属性页面)。

I'm talking about this window:我说的是这个窗口:

服务清单

After closing all services windows and re-trying -> it worked.关闭所有服务窗口并重新尝试后->它起作用了。 In contrast to the OP I got Error 1053 basically immediately (without windows waiting on anything)与 OP 相比,我基本上立即得到了Error 1053 (没有窗口等待任何东西)

Install the .net framework 4.5!安装 .net 框架 4.5! It worked for me.它对我有用。

https://www.microsoft.com/en-us/download/details.aspx?id=57768 https://www.microsoft.com/en-us/download/details.aspx?id=57768

If you have .NET 6, please read it如果您有 .NET 6,请阅读它

https://docs.microsoft.com/en-us/dotnet/core/extensions/windows-service https://docs.microsoft.com/en-us/dotnet/core/extensions/windows-service

when you create a service in command line, use like this在命令行中创建服务时,像这样使用

sc.exe create SERVICE_NAME binPath="C:\....\bin\Release\net6.0\win-x64\SERVICE_NAME.exe"

one possible reason is: 一个可能的原因是:

mismatch of windows service .net version & your system .net version. Windows服务.net版本和您的系统.net版本不匹配。

Building the Service 建立服务

To build your service project in Solution Explorer, open the context menu for your project, and then choose Properties. 要在解决方案资源管理器中构建服务项目,请打开项目的上下文菜单,然后选择“属性”。 The property pages for your project appear. 将显示项目的属性页。 On the Application tab, in the Startup object list, choose MyService.Program. 在“应用程序”选项卡上的“启动对象”列表中,选择“MyService.Program”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误1053:服务未及时响应启动或控制请求 - Error 1053: the service did not respond to the start or control request in a timely fashion Windows服务无法启动&#39;错误1053:服务未及时响应启动或控制请求&#39; - Windows Service won't start 'Error 1053: The service did not respond to the start or control request in timely fashion' 启动服务:“错误1053:服务未及时响应启动或控制请求” - Starting a service: “Error 1053: The service did not respond to the start or control request in a timely fashion” 错误 1053:安装并运行 WCF 服务时,服务未及时响应启动或控制请求 - Error 1053: The service did not respond to the start or control request in a timely fashion, when intalled and ran a WCF service C#错误1053,服务未及时响应启动或控制请求 - C# Error 1053 the service did not respond to the start or control request in a timely fashion 发生错误1053,服务未及时响应启动或控制请求 - Im getting Error 1053 the service did not respond to the start or control request in a timely fashion 错误 1053:服务没有使用 FileSystemWatcher 及时响应启动或控制请求 - Error 1053:The service did not respond to start or control request in timely fashion with FileSystemWatcher 1053 windows服务没有及时响应 - 1053 windows service did not respond in timely fashion 安装Windows服务时出错 - 服务未及时响应启动或控制请求 - Error installing Windows service — The service did not respond to the start or control request in a timely fashion 服务错误1053:无法及时启动 - Service Error 1053: Could not start in timely fashion
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM