简体   繁体   English

Web服务线程未在IIS中启动

[英]web service Threads not starting in IIS

I have looked at similar articles on this topic without actually getting a solution to the problem i'm facing. 我看过有关该主题的类似文章,但并未真正解决我面临的问题。

I have ac# web service that contains two threads and they all started and worked perfectly when tested on the ASP.NET development server on my development machine, which might suggest that the code is in order. 我有一个包含两个线程的ac#Web服务,当在我的开发机器上的ASP.NET开发服务器上进行测试时,它们都已启动并正常运行,这可能表明代码是正确的。

Since I intend to deploy it on IIS 7.5, I decided to test it on a local copy of IIS. 由于我打算将其部署在IIS 7.5上,因此我决定在IIS的本地副本上对其进行测试。 On IIS, I noticed that the threads refuse to start. 在IIS上,我注意到线程拒绝启动。 Before I resorted to using threads, I have used System.Timers Timer, and System.Threading Timer with the same behaviour, that is, the Timers worked on my ASP.NET development server but refused to work when tested on IIS. 在诉诸于使用线程之前,我曾以相同的方式使用System.Timers Timer和System.Threading Timer,即Timers在我的ASP.NET开发服务器上工作,但在IIS上测试时拒绝工作。 Please, What could be the reason for this and what do I do to solve this bottleneck. 拜托,这可能是什么原因,我该怎么解决这个瓶颈。

Thanks so much for your contributions. 非常感谢您的贡献。

I just learnt the hard way that I wasn't supposed to use threads in the web service. 我刚刚学到了不应该在Web服务中使用线程的艰难方法。 After removing the threads, it still worked fine. 删除线程后,它仍然可以正常工作。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM