using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class Service : System.Web.Services.WebService
{
public Service () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string HelloWorld() {
return "Hello World";
}
}
<webServices>
<protocols>
<add name="HttpSoap12"/>
<add name="HttpSoap"/>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
I have modified my web.config file
I am having problem to access this webservice on remote pc with ip address 192.168.0.3
i am trrying to add a web refernce in url i am trying http://l192.168.0.2:1298/WebService3/Service.asmx
the server on which i am using as webserver is having two lan adapters
one for internet(Modem) and another for sharing(ip address :192.168.0.2)
and i use my laptop to use the web service...both pc and laptop has same version of visual studio 2010
i have enabled http in firewall...and once i tried by completely shuting down firewall
but still i cant access my webservice from 192.168.0.3(laptop)
i tried to access http://localhost:1298/WebService3/Service.asmx its working fine on my pc but when i try to replace with http://192.168.0.2:1298/WebService3/Service.asmx it wont work.
but trying this work http://127.0.0.1:1298/WebService3/Service.asmx
what is problem...i want to access my webservice from laptop
please help me thanks in advance
Ankur Kumar