C# °²×°²¼Êð ¼°Windows·þÎñ×Ô¶¯Æô¶¯
ÉèÖÃserviceProcessInstaller1¿Ø¼þµÄAccountÊôÐÔΪ“LocalSystem”
ÉèÖÃserviceInstaller1¿Ø¼þµÄStartTypeÊôÐÔΪ"Automatic"
ÔÚ·þÎñÆ÷ÉÏÌí¼Ó°²×°³ÌÐò£¬ÔÚprivate void ProjectInstaller_AfterInstall(object sender, InstallEventArgs e)ʼþÖУ¬Ìí¼ÓÒÔÏ´úÂ룺
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
string Cmdstring = "sc start myservice"; //CMDÃüÁî
p.StandardInput.WriteLine(Cmdstring);
p.StandardInput.WriteLine("exit");
¼´¿ÉÔÚ°²×°·þÎñºóÁ¢¿ÌÆô¶¯windows·þÎñ
×¢£º ÒýÓÃusing System.Diagnostics;//µ÷ÓÃProcess
C#°²×°²¼Êð
½¨Á¢Ò»¸öÐµİ²×°ÏîÄ¿ServerSetup£¨Îª¸Õ²ÅÄǸö·þÎñ½¨Á¢Ò»¸ö°²×°ÏîÄ¿£©
ÓÒ¼ü£Ìí¼Ó£ÏîÄ¿Êä³ö£Ö÷Êä³ö£Ñ¡ÔñService1£È·¶¨
ÓÒ¼ü£ÊÓͼ£×Ô¶¨Òå²Ù×÷£×Ô¶¨Òå²Ù×÷ÉÏÓÒ¼ü£Ìí¼Ó×Ô¶¨Òå²Ù×÷£´ò¿ªÓ¦ÓóÌÐòÎļþ¼Ð£Ñ¡Ôñ¸Õ²ÅÄǸöÖ÷Êä³ö£È·¶¨
ÖØÐÂÉú³ÉÕâ¸ö°²×°ÏîÄ¿£ÓÒ¼ü£°²×°
²é¿´·þÎñ,,Ôò×ÔÒѵķþÎñ("myservice")ÒÑ×Ô¶¯Æô¶¯
Ïà¹ØÎĵµ£º
΢ÈíÔÚÆä.netÕ½ÂÔÖУ¬¶ÔÆäÖ÷ÍƵÄWeb Service×öÁË´óËÁµÄÐûÑï¡£ÏÖÔÚ£¬Web
ServiceÕýÈç»ðÈçݱµØ·¢Õ¹×Å£¬Ïà¹ØµÄ¸÷Ïîм¼Êõ²ã³ö²»Çî¡£Web
ServiceµÄ·¢Õ¹Õý¹¹Öþ×Å»¥ÁªÍøʱ´úÃÀºÃµÄÃ÷Ìì¡£ÔÚ±¾ÎÄÖУ¬ÎÒ½«Ïò´ó¼Ò½éÉÜWeb ServiceµÄһЩ»ù±¾ÖªÊ¶¡¢ÈçºÎÓÃC££½¨Á¢Ò»¸öWeb
Service¡£Í¨¹ýÎÄÕ£¬ÎÒÃÇ»¹½«¶ÔWSDL¡¢UDDIÒÔ¼°Î´À´µÄWeb ......
΢Èí.NETÕ½ÂÔµÄÒ»¸ö±È½ÏÖØÒªµÄ²¿·Ö¾ÍÊÇwebservice,ÀûÓÃwebserviceÎÒÃÇ¿ÉÒÔ´´½¨ÕæÕýÓÐЧµÄ·Ö²¼Ê½Ó¦ÓóÌÐò¡£
ÏÂÃ棬ÎÒÃǶÔwebservice×öһЩ˵Ã÷¡£
¼ÙÉèAÊÇ¿Í»§¶Ë£¬BÊÇwebservice·þÎñ¶Ë£¬Óû§Í¨¹ýhttpÐÒéÏò·þÎñÆ÷·¢ËÍsoapÇëÇó£¬webservice·µ»Ø¿Í»§¶ËXML¸ñʽµÄÊý¾Ý¡£
ÏÖÔÚÎÒÃÇ¿´Ò»¿´´´½¨Ò»¸öwebserviceµÄ´óÖ¹ý³Ì£º
......
´ÓʱàÂë7Äê¶àÁË
¶ÔÓÚjava ºÍc# ÎÒÓÐ×Å×Ô¼ºµÄÀí½â
ÔÚ2009ÄêµÄ9ÔÂÕâ¸öʱ¼äµãÎÒ¿´À´java c#ÊÇÐÂʽÓïÑԵĴú±í
{ÒòΪÎÒÈÏΪ¼ÆËã»úµÄ·¢Õ¹Àú³ÌÊÇ
µÚÒ»½×¶Î ´ò¿×»ú(¶þ½øÖÆ),
µÚ2½×¶Î »ã±à, (±È¶þ½øÖÆ·½±ãµÄÓïÑÔ),
µÚ3½×¶Î c (¸üÒ×ÓÚ¿´Ã÷°×µÄ¸ß¼¶ÓïÑÔ),
µÚ4½×¶ÎµÚ1²ã c++ (´Ó¶ÔÏó½Ç¶ÈÀí½âµÄ¸ß¼¶ÓïÑÔ),
µÚ4½×¶ÎµÚ2² ......
#(¶Á×ö "C sharp")ÊÇ΢Èí¹«Ë¾ÔÚÈ¥ÄêÁùÔ·¢²¼µÄÒ»ÖÖеıà³ÌÓïÑÔ,²¢¶¨ÓÚÔÚ΢ÈíÖ°Òµ¿ª·¢ÕßÂÛ̳(PDC)ÉϵÇ̨ÁÁÏà.C#ÊÇ΢Èí¹«Ë¾Ñо¿Ô±Anders HejlsbergµÄ×îгɹû.C#¿´ÆðÀ´ÓëJavaÓÐמªÈ˵ÄÏàËÆ;Ëü°üÀ¨ÁËÖîÈçµ¥Ò»¼Ì³Ð,½çÃæ,ÓëJava¼¸ºõͬÑùµÄÓï·¨,ºÍ±àÒë³ÉÖмä´úÂëÔÙÔËÐеĹý³Ì.µ«ÊÇC#ÓëJavaÓÐ×ÅÃ÷ÏԵIJ»Í¬,Ëü½è¼øÁËDelphiµÄÒ»¸ ......
public static void Main()
{
WebRequest req = WebRequest.Create("http://blog.csdn.net/xiaofengsheng");
try
& ......