Is it possible that some application will turn on/off web service that hosted by iis?

I wrote wcf web service and the host is IIS. But i want that this web service will be available only when some application ( that i writing ) is running.

Is it possible to have an ability to turn on/off this web service by my application ?


Yes, you can create separate application pool for your web services and start\stop it from your C# code (with enough permissions). There're plenty of ways to do it, I prefer that one:

var directoryEntry = new DirectoryEntry("IIS://YOURWEBSERVER/W3SVC/AppPools/WebServicesAppPool", USERNAME, PASSWORD);
// stop the Application Pool
directoryEntry.Invoke("Stop", null);
// start the Application Pool
directoryEntry.Invoke("Start", null);

Need Your Help

How to fetch the single record of each user in sql record


I have to fetch a single record of each user which is the last entry in the table. The table has multiple records of each user.

Flask serves static html pages

html static web flask

I am implementing a web app by Flask framework. This web app is about to server static html pages whose structure is like java doc.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.