Jump to content
xisto Community
Sign in to follow this  
illusion

Creating A Web Service With Visual C#

Recommended Posts

Create a Web service

 

1. Start Visual Studio .NET

2. Select “File->New Project”

 

 

Remember, this could very easily be a Visual Basic project. I’m using C# because that’s

what I’m familiar with. The only things that change if this were Visual Basic is the

syntax of the code you write in step 7 (below).

 

 

3. Select the “Visual C# Projects” in the Project Types area.

4. Select the “ASP.NET Web Service” icon and click OK

 

 

Once selected, all of the project files are automatically generated in Internet Information

Server.

 

 

 

5. Right-click on the “Service1.asmx” file in the Solution Explorer and click “View

Code”:

 

Posted Image

 

 

6. In the Code Window, scroll to the bottom, and delete all the green, commented

code:

 

 

 

 

 

Posted Image

 

 

7. Once the old code is deleted, add the following code after the “Component

Designer generated code” region:

 

 

Posted Image

 

 

8. In the main Visual Studio .NET menu, select “Build->Run”.

 

 

 

 

 

Visual Studio .NET creates a test harness Web page for you to try out your application.

 

 

 

9. In the resulting Internet Explorer window, click on the GetMyName hyperlink.

10. In the resulting window, click on the Invoke method.

11. The result is an XML “blob” with the name “Prozac” in it.

Share this post


Link to post
Share on other sites
GIF image over geociti not visibleCreating A Web Service With Visual C#

pls repost the entire with images from some other sites other than geocities.They stopped their services long back

-reply by ADmain

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.