Thursday, January 28, 2010

Change Web Service name in ASP.NET

For example you have a Web Service named AAAWebService


And you want to change its name to let's say BBBWebService. If you open your code and change it like this..

public class BBBWebService : System.Web.Services.WebService

{

}

... and then run it, you would get an error like this...







The solution is to right click on your web service asmx file and click view markup.




Change the name here and you're done.

<%@ WebService Language="C#" CodeBehind="AAAWebService.asmx.cs" Class="Web_Services.BBBWebService" >



-k

4 comments:

  1. Very informative, keep posting such good articles, it really helps to know about things.

    ReplyDelete
  2. Very informative, keep posting such good articles, it really helps to know about things.

    ReplyDelete
  3. Hey keep posting such good and meaningful articles.

    ReplyDelete
  4. Hey keep posting such good and meaningful articles.

    ReplyDelete