WCF client

  • Thread starter Thread starter Remote_User
  • Start date Start date
R

Remote_User

Hi,
When I create a WCF client (hosting the service is fine) and the
service on the same machine everything works is good. But when I want
to have the client on a different machine this fails. How can I
generate the client on a different machine ?
Also it failed even when I specified the IP (starting the service
takes the address in the form of http://localhost:port_num/......) of
the hosting machine in the base address section of the config file of
the service.
Svcutil http://service_host_IP/..... on the client machine
also failed.


Thanks.
 
Well, what kind of binding are you using? How are you configuring it as
well? Do you have any details about why it isn't working (an exception
message, perhaps)?
 
Hi,
I have tried this with basicHttp/wsHttp bindings. The main problem
is even though I have specified the base-address on the service config
as the "machine_name" it runs as "localhost:port_num" so from the
client I wont be able to add a service reference.



    Well, what kind of binding are you using?  How are you configuring it as
well?  Do you have any details about why it isn't working (an exception
message, perhaps)?

--
          - Nicholas Paldino [.NET/C# MVP]
          - (e-mail address removed)




Hi,
    When I create a WCF client (hosting the service is fine) and the
service on the same machine everything works is good. But when I want
to have the client on  a different machine this fails. How can I
generate the client on a different machine ?
    Also it failed even when I specified the IP (starting the service
takes the address in the form ofhttp://localhost:port_num/......) of
the hosting machine in the base address section of the config file of
the service.
   Svcutilhttp://service_host_IP/.....      on the client machine
also failed.
Thanks.- Hide quoted text -

- Show quoted text -
 
Hi,

I was wondering if you have figured out how to solve this issue. I am
having the exact same issue. I have noticed that if I access the service
from the service machine I get the error

Security settings for this service require 'Anonymous' Authentication but it
is not enabled for the IIS application that hosts this service.

Any help would be appreciated.

Remote_User said:
Hi,
I have tried this with basicHttp/wsHttp bindings. The main problem
is even though I have specified the base-address on the service config
as the "machine_name" it runs as "localhost:port_num" so from the
client I wont be able to add a service reference.



Well, what kind of binding are you using? How are you configuring it as
well? Do you have any details about why it isn't working (an exception
message, perhaps)?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)




Hi,
When I create a WCF client (hosting the service is fine) and the
service on the same machine everything works is good. But when I want
to have the client on a different machine this fails. How can I
generate the client on a different machine ?
Also it failed even when I specified the IP (starting the service
takes the address in the form ofhttp://localhost:port_num/......) of
the hosting machine in the base address section of the config file of
the service.
Svcutilhttp://service_host_IP/..... on the client machine
also failed.
Thanks.- Hide quoted text -

- Show quoted text -
 
Hi,
Yes, It's working now !
You may need to check the address that you have specified in the
Web.Config file of your service. I guess it should be
something like - http://my-server/ServiceName/Service.svc.
Yep for the authentication I am using Anonymous too,however, in
IIS I have enabled "Anonymous access" and have given a different
username and password with the "Allow IIS to control password"
checkbox unchecked. If you are getting "You are not authorized to view
this page" then this could be the problem. Also if you hosting in IIS
make sure you have given appropriate security permissions to any
folder you would want to access on your filesystem.
One interesting thing was I encountered was TimeOut exception
when I tried to run my client, and upon debugging through the service
I came to know that the client-server communication was in fact fine,
but my app on the server side was failing for some reason and so on my
client side it would keep on waiting and time-out as it didn't receive
an appropriate reply within the specified time. By enabling the trace
feature, on both client and server, you could check if this is what
is troubling you.
If you are getting the "....No protocol binding
matches.....Protocol bindings are configured at IIS...." error it most
probably has to do with your Web.config file you would have missed
something in one of your Address, Binding or Contract.

Hope this helps !!



Hi,

I was wondering if you have figured out how to solve this issue.  I am
having the exact same issue.  I have noticed that if I access the service
from the service machine I get the error

Security settings for this service require 'Anonymous' Authentication but it
is not enabled for the IIS application that hosts this service.

Any help would be appreciated.



Remote_User said:
Hi,
    I have tried this with basicHttp/wsHttp bindings. The main problem
is even though I have specified the base-address on the service config
as the "machine_name" it runs as "localhost:port_num" so from the
client I wont be able to add a service reference.
    Well, what kind of binding are you using?  How are you configuring it as
well?  Do you have any details about why it isn't working (an exception
message, perhaps)?
--
          - Nicholas Paldino [.NET/C# MVP]
          - (e-mail address removed)

Hi,
    When I create aWCFclient (hosting the service is fine) and the
service on the same machine everything works is good. But when I want
to have the client on  a different machine this fails. How can I
generate the client on a different machine ?
    Also it failed even when I specified the IP (starting the service
takes the address in the form ofhttp://localhost:port_num/......) of
the hosting machine in the base address section of the config file of
the service.
   Svcutilhttp://service_host_IP/.....      on the client machine
also failed.
Thanks.- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
 
I was able to get this working. First in visual studios I changed the
outpath on the service project so that it created the binary files at the
second server.

I then had to change the website to allow anonymous logins. This was done
by managing my application server, Selecting the web site right clicking and
selecting properties. I then selected the Directory Security tab and clicked
the Edit button in the Authentication and Access control section. You will
see the checkbox there.



Baffled said:
Hi,

I was wondering if you have figured out how to solve this issue. I am
having the exact same issue. I have noticed that if I access the service
from the service machine I get the error

Security settings for this service require 'Anonymous' Authentication but it
is not enabled for the IIS application that hosts this service.

Any help would be appreciated.

Remote_User said:
Hi,
I have tried this with basicHttp/wsHttp bindings. The main problem
is even though I have specified the base-address on the service config
as the "machine_name" it runs as "localhost:port_num" so from the
client I wont be able to add a service reference.



Well, what kind of binding are you using? How are you configuring it as
well? Do you have any details about why it isn't working (an exception
message, perhaps)?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)





Hi,
When I create a WCF client (hosting the service is fine) and the
service on the same machine everything works is good. But when I want
to have the client on a different machine this fails. How can I
generate the client on a different machine ?
Also it failed even when I specified the IP (starting the service
takes the address in the form ofhttp://localhost:port_num/......) of
the hosting machine in the base address section of the config file of
the service.
Svcutilhttp://service_host_IP/..... on the client machine
also failed.

Thanks.- Hide quoted text -

- Show quoted text -
 
Back
Top