如何在Hosted Environment中的webapplication中运行Windows服务 [英] How to run Windows Service in webapplication in Hosted Environment

查看:56
本文介绍了如何在Hosted Environment中的webapplication中运行Windows服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



这里面临着一点点棘手的问题。我开发了两个项目,一个是Windows服务,该服务在服务器环境中运行。启动Windows服务我创建了asp.net Web应用程序从Web应用程序启动Windows服务.Windows服务和Web应用程序都在本地环境中完美运行。但是当我在IIS中托管Web应用程序然后iam尝试启动服务时我保留了日志文件在该文件中我看到错误。



错误:以管理员身份登录以运行短信服务:



这是ServiceController抛出的Expection消息。



所以,如果有任何人知道这件事,请与我分享。





问候,





AnilKumar.D

Dear Friends,

Here iam facing little bit Tricky Problem.I developed two Projects one is Windows Service that service runs in Server Environment.To start the Windows Service i created the asp.net Web Application From web application iam starting the Windows Service.The Windows Service and Web Application Both is Working Perfectly in local Environment.But when i host the Web Application in IIS Then iam Trying to Start Service i kept log file in that file iam seeing the Error.

Error : Login as Adiministrator to run the Sms Service:

This is the Expection Message which Thrown by ServiceController.

So please if any body know regarding this please share with me.


Regards,


AnilKumar.D

推荐答案

看起来问题是:你不知道如何用高架p运行一些东西Windows 7中的rivileges 请阅读:

http:/ /www.sevenforums.com/tutorials/11841-run-administrator.html [ ^ ]。



您还应该了解UAC: http://en.wikipedia.org/wiki/User_Account_Control [ ^ ]。



-SA
It looks like the problem is: you don't know how to run something with elevated privileges in Windows 7. Please read this:
http://www.sevenforums.com/tutorials/11841-run-administrator.html[^].

You should also understand UAC: http://en.wikipedia.org/wiki/User_Account_Control[^].

—SA


这篇关于如何在Hosted Environment中的webapplication中运行Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆