tag:blogger.com,1999:blog-77864313293242078722023-11-15T08:42:36.838-08:00Web Services en C#Unknownnoreply@blogger.comBlogger4125tag:blogger.com,1999:blog-7786431329324207872.post-91656885207503808552009-01-14T10:50:00.000-08:002009-01-14T10:54:15.300-08:00Errores Visual Studio 2005Hoy se me presentó un problema de lentitud al momento de guardar el proyecto que estaba desarrollando en Visual Studio 2005 (VS)<br /><br />La solución fue borrar todos los items de esta ubicación del registro<br /><br />HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList<br /><br />En está ubicación VS guarda los proyectos que creamos y de alguna forma al guardar los revisa todos.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-7786431329324207872.post-26815321607160133352008-12-11T04:50:00.000-08:002008-12-11T09:50:48.465-08:00Reducir respuesta Web ServiceCuando tenemos un Web Service al cual accedemos muy frecuentemente y en un periodo de tiempo devuelve los mismo datos, como por ejemplo si tenemos un WebMethod que retorna los indicadores económicos diarios, entonces deberíamos aumentar la duración del cache, con esto mejoraremos en gran medida los tiempos de respuesta.<br /><br />Para habilitar el cache, lo debemos realizar habilitando la propiedad <br /><br /><span style="font-weight:bold;">CacheDuration </span>del WebMethod:<br /><pre style='color:#000000;background:#ffffff;'><span style='color:#808030; '>[</span>WebMethod<span style='color:#808030; '>(</span>CacheDuration<span style='color:#808030; '>=</span><span style='color:#008c00; '>600</span><span style='color:#808030; '>)</span><span style='color:#808030; '>]</span><br /> Public <span style='color:#800000; font-weight:bold; '>string</span> IndicadorDiario <span style='color:#808030; '>(</span><span style='color:#800000; font-weight:bold; '>string</span> parametro<span style='color:#808030; '>)</span><br /> <span style='color:#800080; '>{</span><br /> <span style='color:#808030; '>.</span><span style='color:#808030; '>.</span><span style='color:#808030; '>.</span><br /> <span style='color:#808030; '>.</span><span style='color:#808030; '>.</span><span style='color:#808030; '>.</span><br /> <span style='color:#808030; '>.</span><span style='color:#808030; '>.</span><span style='color:#808030; '>.</span><br /> <span style='color:#800080; '>}</span><br /></pre>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7786431329324207872.post-50594157413387741102008-12-11T04:20:00.000-08:002008-12-11T10:06:20.033-08:00Remover ProtocolosCuando creamos un Web Service y lo que deseamos es acceder únicamente mediante protocolo <span style="font-weight:bold;">SOAP</span>, debemos eliminar los protocolos <span style="font-weight:bold;">HTTP POST</span> y <span style="font-weight:bold;">HTTP GET</span>, esto nos permitirá mejorar el rendimiento del web service, ya que, nos generará un archivo <span style="font-weight:bold;">WSDL</span> mas pequeño.<br /><br />Para eliminar los protocolos <span style="font-weight:bold;">HTTP POST/GET</span><br /><br />1.- Ingresar en el archivo <span style="font-weight:bold;">web.config</span><br /><br />2.- Ingresar el siguiente código:<br /><pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><span style="color: rgb(166, 87, 0);"><</span><span style="color: rgb(95, 80, 53);">configuration</span><span style="color: rgb(166, 87, 0);">></span><br /> <span style="color: rgb(166, 87, 0);"><</span><span style="color: rgb(95, 80, 53);">system.web</span><span style="color: rgb(166, 87, 0);">></span><br /> <span style="color: rgb(166, 87, 0);"><</span><span style="color: rgb(95, 80, 53);">webServices</span><span style="color: rgb(166, 87, 0);">></span><br /> <span style="color: rgb(166, 87, 0);"><</span><span style="color: rgb(95, 80, 53);">protocols</span><span style="color: rgb(166, 87, 0);">></span><br /> <span style="color: rgb(166, 87, 0);"><</span><span style="color: rgb(95, 80, 53);">remove</span> <span style="color: rgb(39, 71, 150);">name</span><span style="color: rgb(128, 128, 48);">=</span><span style="color: rgb(0, 0, 230);">"</span><span style="color: rgb(0, 0, 230);">HttpPost</span><span style="color: rgb(0, 0, 230);">"</span><span style="color: rgb(166, 87, 0);">/></span><br /> <span style="color: rgb(166, 87, 0);"><</span><span style="color: rgb(95, 80, 53);">remove</span> <span style="color: rgb(39, 71, 150);">name</span><span style="color: rgb(128, 128, 48);">=</span><span style="color: rgb(0, 0, 230);">"</span><span style="color: rgb(0, 0, 230);">HttpGet</span><span style="color: rgb(0, 0, 230);">"</span><span style="color: rgb(166, 87, 0);">/></span><br /> <span style="color: rgb(166, 87, 0);"></</span><span style="color: rgb(95, 80, 53);">protocols</span><span style="color: rgb(166, 87, 0);">></span><br /> <span style="color: rgb(166, 87, 0);"></</span><span style="color: rgb(95, 80, 53);">webServices</span><span style="color: rgb(166, 87, 0);">></span><br /> <span style="color: rgb(166, 87, 0);"></</span><span style="color: rgb(95, 80, 53);">system.web</span><span style="color: rgb(166, 87, 0);">></span><br /><span style="color: rgb(166, 87, 0);"></</span><span style="color: rgb(95, 80, 53);">configuration</span><span style="color: rgb(166, 87, 0);">></span><br /></pre>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7786431329324207872.post-23428245294383068622008-12-10T03:51:00.000-08:002008-12-11T09:52:01.503-08:00Optimización Web ServiceUna de las formas de optimizar los web services es a través de la opción debug del web.config<br /><br />Esta opción nos permite reducir considerablemente el tiempo de ejecución.<br /><br /><br />Método de implementación:<br /><br />1.- Ir al web.config de nuestra aplicación.<br /><br />2.- Ingresar el siguiente código:<br /><pre style='color:#000000;background:#ffffff;'><span style='color:#a65700; '><</span><span style='color:#5f5035; '>configuration</span><span style='color:#a65700; '>></span><br /> <span style='color:#a65700; '><</span><span style='color:#5f5035; '>system.web</span><span style='color:#a65700; '>></span><br /> <span style='color:#a65700; '><</span><span style='color:#5f5035; '>compilation</span> <span style='color:#274796; '>debug</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>"</span><span style='color:#0000e6; '>false</span><span style='color:#0000e6; '>"</span><span style='color:#a65700; '>/></span><br /> <span style='color:#a65700; '></</span><span style='color:#5f5035; '>system.web</span><span style='color:#a65700; '>></span><br /><span style='color:#a65700; '></</span><span style='color:#5f5035; '>configuration</span><span style='color:#a65700; '>></span><br /></pre>Unknownnoreply@blogger.com2