简体   繁体   English

iPhone,WMI,IIS服务

[英]iPhone, WMI, iis service

I am thinking about writing an application that will monitor IIS Service with iPhone, and send notification, perform resets if an IIS goes down. 我正在考虑编写一个应用程序,该应用程序将使用iPhone监视IIS服务,并发送通知,如果IIS出现故障,则执行重置。

I dont want to create a web service to do that but rather connect to a machine, specifying credentials and then get data from the IIS Service state. 我不想创建一个Web服务来执行此操作,而是连接到计算机,指定凭据,然后从IIS Service状态获取数据。

Is it even possible? 可能吗

Is it possible with iPhone? iPhone可以吗?

I need to make this app generic enough for people to use with their hosted web sites and monitor their health and being able to reset it and/or recycle AppPools. 我需要使该应用程序具有足够的通用性,以使人们可以与其托管的网站一起使用并监视其运行状况,并能够对其进行重置和/或回收AppPools。 I cant implement a service for any hosted environment. 我无法为任何托管环境实现服务。 I need to be able to give the iPhone users an ability to connect to their host and once you are connected to the machine and authenticated to perform WMIs the phone users can mess with the iis. 我需要使iPhone用户能够连接到他们的主机,并且一旦您连接到计算机并通过身份验证可以执行WMI,电话用户就可以使用iis。 Is it possible? 可能吗?

I see your point not wanting to use web service because you want to monitor and reset IIS service, while web service is based on IIS. 我看到您的观点是不想使用Web服务,因为您想监视和重置IIS服务,而Web服务是基于IIS的。 How about RestFul service? RestFul服务怎么样? I have created RestFul service based on OWIN (Open Web Interface for .Net) and Kayak . 我已经基于OWIN (适用于.Net的开放Web界面)和Kayak创建了RestFul服务。 Kayak may have some examples there. 皮划艇可能有一些例子。

The cool thing about those tools or lib is that the framework is very simple and does not rely on IIS. 这些工具或库的妙处在于该框架非常简单,并且不依赖IIS。 You can provide two URLs, one for get and one for post. 您可以提供两个URL,一个URL用于获取,另一个URL用于发布。 The former is to get status of IIS server and post is to reset IIS. 前者是获取IIS服务器的状态,后是重置IIS。 Those services can be just XML of JSON based objects and it will be up to the the OWIN service to do the job on the back end. 这些服务可以只是基于JSON对象的XML,并且由OWIN服务在后端完成工作。 Another great feature of this is that you can even create the service in a console app or any other ways (Windows service or Window Form in system tray) on WindowsXP or Home version. 此功能的另一个重要功能是,您甚至可以在Windows XP或家庭版上通过控制台应用程序或任何其他方式(系统托盘中的Windows服务或Window Form)创建服务。 The app will provide RestFul service based on HTTP with specific port. 该应用程序将基于HTTP的特定端口提供RestFul服务。

RestFul service is available for variety of platforms, including iPhone. RestFul服务可用于多种平台,包括iPhone。

Although IIS supports remote administration I doubt there's a way to implement it on the iPhone easily. 尽管IIS支持远程管理,但我怀疑是否有一种方法可以在iPhone上轻松实现它。

You could write an actual Windows Server (not a web service) you could connect to with a socket which can do all the monitoring instead though. 您可以编写一个实际的Windows Server(而不是Web服务),并可以使用套接字进行连接,而套接字可以执行所有监视。

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

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