Unable to use web service on network

Posted by Max_India7 under Visual Studio on 1/13/2013 | Points: 10 | Views : 1229 | Status : [Member] | Replies : 2
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


Responses

Posted by: Vuyiswamb on: 1/13/2013 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
What is the IP of the Laptop when it is on the LAN ?

Thank you for posting at Dotnetfunda
[Administrator]

Max_India7, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Max_India7 on: 1/17/2013 [Member] Starter | Points: 25

Up
0
Down
My laptop ip address is 192.168.0.3
and desktop is with ip address 192.168.0.2


Ankur Kumar

Max_India7, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response