I wrote an asmx webSerivce on srv1. I wrote a bll project of an asp.net (original text: an asp.net) project on srv2. Both are hosted under the same web doma
OK, let me try to rephrase your scenario to make sure I got it right:
The first step is to add a Service Reference to the ASP.NET application by pointing to the WSDL of the ASMX service:
This will do 2 things:
It will modify your web.config and include the client endpoints:
<client>
<endpoint address="http://ws.cdyne.com/NotifyWS/phonenotify.asmx"
binding="basicHttpBinding" bindingConfiguration="PhoneNotifySoap"
contract="ServiceReference1.PhoneNotifySoap" name="PhoneNotifySoap" />
<endpoint address="http://ws.cdyne.com/NotifyWS/phonenotify.asmx"
binding="customBinding" bindingConfiguration="PhoneNotifySoap12"
contract="ServiceReference1.PhoneNotifySoap" name="PhoneNotifySoap12" />
</client>
Now when you want to invoke this service from your application you will have to choose the endpoint you want to use:
using (var client = new ServiceReference1.PhoneNotifySoapClient("PhoneNotifySoap"))
{
var result = client.GetVersion();
}
Now simply replace my code snippets with your actual service names.