Starting with a .NET webservice developed in Visual Studio 2010 Express, how can I have the own webservice knowing the URL of the WSDL it serves itself?
For example, if I have some boilerplate code
[WebService]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class MyWS : System.Web.Services.WebService
{
[WebMethod(Description="Something like: http://localhost:12345/MyWS.asmx?WSDL")]
public int RegisterInDB(string ConnectionString)
{
string urlWSDL = "HOW_TO_GET_WEBSERVICE'S_OWN_WSDL_URL_HERE ???";
int NewRowId;
// 1) Connect to DB with ConnectionString
// 2) INSERT into table some info, including urlWSDL
// 3) Get Id of INSERT'ed row.
return NewRowId;
}
}
which method/property gives the WSDL on runtime?