WCF

  • Thread starter Thread starter Ringo
  • Start date Start date
R

Ringo

I'm following a wcf sample app I found on MSDN that creates a
calculator service and a client for it.

In the sample both service and client are on the same machine and in
the server it has
Uri baseAddress = new Uri("http://localhost:8000/ServiceModelSamples/
Service");

I can browse to that location and see the service.

Now I want to try it over my local network, so I got my IP address on
the server computer and put it in
Uri baseAddress = new Uri("http://192.168.1.103:8000/
ServiceModelSamples/Service");

then on the client machine I tried to go to the address above but I
get "connection timed out".

Am i missing something? IS there something else I need to do?

Thanks
Ringo
 
Ringo said:
I'm following a wcf sample app I found on MSDN that creates a
calculator service and a client for it.

In the sample both service and client are on the same machine and in
the server it has
Uri baseAddress = new Uri("http://localhost:8000/ServiceModelSamples/
Service");

I can browse to that location and see the service.

Now I want to try it over my local network, so I got my IP address on
the server computer and put it in
Uri baseAddress = new Uri("http://192.168.1.103:8000/
ServiceModelSamples/Service");

then on the client machine I tried to go to the address above but I
get "connection timed out".

Am i missing something? IS there something else I need to do?

Thanks
Ringo

The built in web server in Visual Studio only accepts connections using
localhost (127.0.01) as host. You can't browse to it from another
computer. For that you need IIS (or equivalent).
 
The built in web server in Visual Studio only accepts connections using
localhost (127.0.01) as host. You can't browse to it from another
computer. For that you need IIS (or equivalent).

Next Question: how do I access a control on a form from a class? See
below

namespace Microsoft.ServiceModel.Samples
{
public partial class Form1 : Form
{ ...... }
public class CalculatorService : ICalculator
{
public double Add(double n1, double n2)
{
How do I use a control on the main form from this
Class???????
textbox1.text="foo";//???????????????????????
}

}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top