First ATLAS program - asynchronous calls WebService

xiaoxiao2021-04-07  374

CREANG AN 'Atlas' Application

To begin, you will create an 'Atlas' Web application in Visual Studio. When you use the Visual Studio project template to create a new, blank 'Atlas' Web application, Visual Studio creates a normal Web site folder structure with the following additional items :

An Executable File named Microsoft.Web.atlas.dll, Which Resides in the bin folder and provides server-side functionality. A web.config file with settings for 'atlas' Applications.

To create a new 'atlas' Web Application In Visual Studio

In the File menu, click New, and then click Web Site. In the New Web Site dialog box, select the ASP.NET 'Atlas' Web Site template item. In the Location list, select File System. Specify a path and language for The application, and the copy ok.

Creating a Web Service with a Single Method

Next, you will create an ASP.NET Web service with a single method that can be called by your 'Atlas' client script. Web services that work with 'Atlas' applications are not different from other ASP.NET Web services. 'Atlas' Applications CAN Run in Any Browser And Connect To Any Type Of Web-Based Service; The Server Does Not Have To Be Running Asp.net or Windows.

To create the New Web Service

In Solution Explorer, right-click the name of the site, and then click Add New Item. In the Add New Item dialog box, under Visual Studio installed templates, select Web Service. Name the file HelloWorldService.asmx and clear the Place code in separate file check box. Select the language you want to use. Click Add. Add code to create a HelloWorld method in the Web service that returns the current date and time. The code must take a string as an input and return a formatted string with . the current time and a message The following example shows a complete Web service that includes the HelloWorld method: