ASP.NET - Web services

Asked By riyaj chabru
10-Feb-12 06:43 AM


Hi,

i created web services in asp.net. I want to check
is my web  services is running or not through the code.
so please some buddy let me know how i can get 
solution.

thanks alot
  dipa ahuja replied to riyaj chabru
10-Feb-12 06:47 AM
This example demonstrates how easy it can be to create a web service.
1.  Create a directory with any name, say "TestDir".
2.  Create a virtual directory named "TestWeb" pointing to "TestDir.
3.  Create a file as follow with your notepad named "Hello.asmx" in "TestDir".
 
<%@ WebService Language="C#" class="HelloClass" %>
 
using System;
using System.Web;
using System.Web.Services;
 
public class HelloClass
{
  [WebMethod]
  public String GetGreeting()
  {
    return "Hello!";
  }
}
That's all you need to do. To test it, open a web page and key in URL "http://localhost/TestWeb/Hello.asmx".
 
 
Create New Account
help
Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B How can we know a state of a thread? (A) What is use of Interlocked class ? (A) What is a monitor object? (A) What are wait handles? (A) What is ManualResetEvent and Webservices (B)What is an application domain? (B) What is .NET Remoting? (B) Which class does the remote object has to inherit? (I) what are two different types of remote A) What is scavenging? (B) What are different types of caching using cache object of ASP.NET? (B) How can you cache different version of same page using ASP.NET cache object? (A) How will implement Page Fragment Caching? (B) Can you compare ASP.NET
cannot be used with indexers, destructors, or types. In C#, the static keyword indicates a class variable. In VB, the equivalent keyword is Shared. Its scoped to the class in which it occurs. Example a. Static int var / / in c#.net b. static void in Sql server as var_name int How do you separate business logic while creating an ASP.NET application? There are two level of asp.net debugging 1. Page level debugging For this we have to edit the page level debugging The control itself will take care of the date display How can you deploy an asp.net application ? You can deploy an ASP.NET Web application using any one of the following
rest of the world. Web services use XML to code and decode your data and SOAP to transport it using open protocols. With Web services, your accounting departments Win 2K servers Site project, choose New from File menu, then choose Web Site as shown below: • Choose ASP.NET Web Site. Name the project and click OK: Second Step: Add a Web Reference After APIs inside our project. • First we need to add the added Web reference to our class. ExtentrixWS is the name of the added Web service from the previous step. Collapse using can go here and look for it. This API returns an array of ApplicationItemEx . This class will be built for you once you add the Web reference. This class contains the published application properties. I used this Web service to get all the published it the associated / / application will run calling the web service ApplicationItemEx[] items = proxy.GetApplicationsByCredentialsEx (credentials, Request.UserHostName, Request.UserHostAddress, new string [] { " icon" , " icon-info" }, new string []{ " all" }, new string [] { " all" }); / / loop for each
com / KB / WCF / ExportAnnotationFromWCF.aspx There is a handy tool on codeplex that improves WCF SOAP header support, exports XML documentation from service contract methods, data contracts and everything else into MessageInspectors collection on endpoints used by our ServiceHost. We will first implement IDispatchMessaageInspector in a class called Inspector. public class Inspector : IDispatchMessageInspector { / / / <summary> / / / Stores contents of Request message / / / passed to the service. / / / < / summary> / / / <value> The request XML.< / value> public string Request { get ; set ; } / / / <summary> / / / Stores contents of Response messge / / / which is sent back to the client. / / / < / summary> / / / <value> The response XmL.< / value> public string Response { get ; set ; } #region IDispatchMessageInspector Members / / / <summary> / / / Called after an inbound