C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

how to publish webservie in iis


Posted Date: 11 Oct 2008      Posted By: nag      Member Level: Gold     Points: 1   Responses: 1



i have one webservie one.asmx how to that one publish iis

how to publish webservie in iis





Responses

Author: Vinay Tripathi    11 Oct 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 6

I've been recently looking for a way to expose web services without IIS (directly from my windows service). I found two ways of doing that:

Windows Communication Foundation
Web Service Enhancements 3.0
The first one (WCF) requires change of my application architecture so I decided to try the WSE 3.0; It can be downloaded from here: Web Services Enhancements (WSE) 3.0 for Microsoft .NET.

I followed those steps:

Step 1. I created an ordinary Web Service that looks like this:

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class CustomerWebService : System.Web.Services.WebService {
[WebMethod]
public string Register(long id, string data1) {
return "ID.CUSTOMER";
}
}Step 2. I published the web service to my local ASP.NET development server

Step 3. I generated Web Service Proxy to my web service

Step 4. I changed the base class of my Web Service Proxy from System.Web.Services.Protocols.SoapHttpClientProtocol to Microsoft.Web.Services3.WebServicesClientProtocol (I did it manually as I do not know yet how to enforce the VS to do it for me).

Step 5. I added following lines to my windows service application startup:

Uri address = new Uri("soap.tcp://localhost/CustomerWebService");
SoapReceivers.Add(new EndpointReference(address), typeof(CustomerWebService));Step 6. I changed my client-side proxy url to the one: soap.tcp://localhost/CustomerWebService

Step 7. I run the client application

Everything worked smothly. I will just have to check if the web service is callable from a Web Sphere environment.



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Menu Tab Control
Previous : how we store our previous page url when we go some other page in site in asp.net using C#
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use