Depurar proyectos de servicios

08/07/2005 - 10:20 por yego | Informe spam
Hola a todos,

No logro depurar (paso a paso) un proyecto de servicios.
Que proceso he de asociar? (Utilizo el ASP.NET)



Un saludo
 

Leer las respuestas

#1 yego
11/07/2005 - 11:08 | Informe spam
Gracias Carlos, provaré.

Saludos.
"Carlos Fouz" escribió en el mensaje
news:

haz un truco ( en el main en funcion si recibe un parametro o no ,


ejecutas
el codigo o lanzas el servicio )

asi:
static void Main()
{
//TO DEBUG
string[] Args = Environment.GetCommandLineArgs();
if ((Args.GetLength(0) == 2) && (Args[1].ToUpper() == "RUN"))
{
EnvioMails test= new EnvioMails();
test.sendMails();
test=null;
return;
}
else
{

System.ServiceProcess.ServiceBase[] ServicesToRun;
ServicesToRun = new System.ServiceProcess.ServiceBase[] { new
EnvioMails() };
System.ServiceProcess.ServiceBase.Run(ServicesToRun);
}
}

Y configuras tu proyecto en el VS pasandole tu parametro ;)

Saludos Carlos Fouz
MCP ASP.NET C#
www.canaldotnet.com

"yego" escribió:

> Hola a todos,
>
> No logro depurar (paso a paso) un proyecto de servicios.
> Que proceso he de asociar? (Utilizo el ASP.NET)
>
>
>
> Un saludo
>
>
>

Preguntas similares