¥È¥Ã¥× «Á°¤ÎÆüµ­(2005-10-23) ºÇ¿· ¼¡¤ÎÆüµ­(2005-10-28)» ÊÔ½¸

¥µ¥¤¥é¥¹¤ÎËÜê


2005-10-24

¡¦ [C#]¹½À®¥Õ¥¡¥¤¥ë¤Ç»ØÄꤵ¤ì¤¿³ÈÄ¥µ¡Ç½¤ò¼Â¹ÔÃæ¤ËÎã³°¤¬È¯À¸¤·¤Þ¤·¤¿¡£-->Í×µá¤ÎºÇĹ»þ´Ö¤òĶ¤¨¤Þ¤·¤¿¡£

Windows Forms¤«¤éWeb service¤Î¥á¥½¥Ã¥É¤ò¸Æ¤ÖºÝ¤Ë¡¢¾åµ­¤Î¤è¤¦¤Ê¥¨¥é¡¼¤¬È¯À¸¤¹¤ë¾ì¹ç¡¢¥Ñ¥é¥á¡¼¥¿¤È¤·¤ÆÅϤ·¤Æ¤¤¤ë¥Ç¡¼¥¿¥»¥Ã¥È¤Î¥µ¥¤¥º¤¬Â礭¤¹¤®¤ë¤³¤È¤¬¸¶°ø¤È¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤Ï¡¢Web.Config¤Ë°Ê²¼¤Î¤è¤¦¤Êµ­½Ò¤ò¤¹¤ë¤³¤È¤Ç²óÈò¤Ç¤­¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£

   <httpRuntime
	maxRequestLength="10000" ¢«ºÇÂ祵¥¤¥º¡ÊKB)
	executionTimeout="3000"¡¡¢«¥¿¥¤¥à¥¢¥¦¥È¡ÊÉáË
    />
 </system.web>

¤¢¤ë¤¤¤Ï¡¢WebService¸Æ¤Ó½Ð¤·»þ¤Ë¥¿¥¤¥à¥¢¥¦¥È¤ÎÀßÄê¤ò¤·¤Æ¤ä¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£

fooService = new FooService.FooService();
fooService.Timeout = System.Threading.Timeout.Infinite;

¤¢¤ë¤¤¤Ï¡¢SQL¤ÎÊý¤Ç¥¿¥¤¥à¥¢¥¦¥È¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï°Ê²¼¤Î¤è¤¦¤ÊÀßÄê¤ò¤·¤Æ¤ä¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£

System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
cmd.CommandTimeout = 600; // 600ÉÃ(10ʬ) ¥Ç¥Õ¥©¥ë¥È¤Ï30ÉÃ
ËÜÆü¤Î¥ê¥ó¥¯¸µ