Showing posts with label webservices. Show all posts
Showing posts with label webservices. Show all posts

Wednesday, February 24, 2010

The test form is only available for methods with primitive types as parameters

While devoloping a web service
easiest way to testing it with running in visual studio
and description screen for web service will be opened..
but complex types It is unable to use..
just only if bool ,string,int simple types are used,testing can be done

any other trick is remote testing(by defualt security reasons remote testing is closed)(testing form any other machine that service devoloping)
open protocels for that..under web.config's sysstem.web node





Thursday, January 14, 2010

Debugging a windows service

Have you ever need to debug a windows service??
Here is a way ..The onl thing is put this code at program's start line

#if (!DEBUG)

ServiceBase[] ServicesToRun;



// More than one user WindowsService_tmp may run within the same process. To add

// another service to this process, change the following line to

// create a second service object. For example,

//

// ServicesToRun = new System.ServiceProcess.ServiceBase[] {new MailService(), new MySecondUserService()};

//

ServicesToRun = new ServiceBase[] { new Service1() };



ServiceBase.Run(ServicesToRun);

#else

// Debug code: this allows the process to run as a non-service.

// It will kick off the service start point, but never kill it.

// Shut down the debugger to exit

Service1 service = new Service1();

service.OnStart(new string[] { ""});

// Put a breakpoint on the following line to always catch

// your service when it has finished its work

System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);

#endif