Friday, January 07, 2005

Stop/Restart IIS in dot net

How to Stop / Start IIS from Vb.Net

To handle windows services .net framework provides System.Serviceprocess.dll so u can restart the any windows service by using ServiceController. so try this code

use reference System.Serviceprocess.dll
in vb.net
Dim sc As New ServiceController()
sc.ServiceName = "IIS Admin"
sc.Stop() ' to stop
sc.Start() ' to Start

Client side outlook access to addressbook from dot net

I have worked on getting the MS Outlook's Contacts to my program, hope the info would help you to get the Calendar too.

http://www.metaprosystems.com/NetTipsTricks.htm

See the content:
"Direct Access to Your Outlook Address Book " in the link

Printing using web browser control

Printing would not be much of a problem. Load it into a webbrowser control on the form and then print the webbrowser control using the command

webbrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER)

There might be a similar command to open up the print preview dialog box also

check out this link for more info
http://msdn.microsoft.com/workshop/browser/webbrowser/reference/methods/execwb.asp