Skip to main content

Posts

Showing posts with the label console

Types of application in dot net

Following list will give you an idea about various types of application that You can develop on .NET. 1. ASP.NET Web applications: These include dynamic and data driven browser based applications. 2. Windows Form based applications: These refer to traditional rich client applications. 3. Console applications: These refer to traditional DOS kind of applications like batch scripts. 4. Component Libraries: This refers to components that typically encapsulate some business logic. 5. Windows Custom Controls: As with traditional ActiveX controls, you can develop your own windows controls. 6. Web Custom Controls: The concept of custom controls can be extended to web applications allowing code reuse and modularization. 7. Web services: They are “web callable” functionality available via industry standards like HTTP, XML and SOAP. 8. Windows Services: They refer to applications that run as services in the background. They can be configured to start a...

Pinging a Web service in .net

Pinging a Web service in .net IPAddress ip = IPAddress.Parse(txtPingEnter.Text); Ping p = new Ping(); PingReply pr = p.Send(ip); //txtPingResult.Text = pr.ToString(); txtPingResult.Text += pr.Status.ToString(); txtPingResult.Text += pr.RoundtripTime.ToString(); This is for pinging to an IP address .So my doubt is that how can we ping a web service like this ? As far as I know, we can ping against only an IP Address, not with URL. so what we can do is just make use of HttpWebrequest class to achieve the same. the below console program is used to sniff the site. using System.Net; using System; public class Sniffer { public static void Main() { try { string lcUrl = "URL "; // *** Establish the request HttpWebRequest loHttp = (HttpWebRequest) WebRequest.Create(lcUrl); // *** Set properties loHttp.Timeout = 10000; // 10 secs // pass Proxy string and bypass local machine if required. WebProxy loProxy = new WebProx...