GetStarted on 2 machines
Hi, all!
Just tried GetStarted example ( IIS hosted ) on 2 machines . I changed only client.exe.config "localhost" to "computer.domain" in endpoint address, but seems that not enough because client fail with EndPointNotFoundException :" there was no endpoint listening..." .
So what I need to change addditionally ?
TIA
Arkady
Hi, Scott!
Yes, sure I do see description, that work great for local client, but remoted one fail with error mentioned. For local client both variants work OK ( IE open http://localhost/<vdir>/MyService.svc and
http://<machine.domain>/<vdir>/MyService.svc ) but for both remote client fail with EndPointNotFoundException.
How can I see that IIS really listening for clients ?
As I wrote in my previous thread I do succedd with SelfHost example to run on two computers ( with some additional questions :) )
TIA
Arkady
Some info additionally.
I changed wsHttpBinding to basicHttpBinding on remote client and service with the same effect ( that really helped me for SelfHost remote communication in SelfHost example ). And adding port 80 to on client's config end-point give me the same result.
OTOH local client with yet wsHttpBinding talk to IIS service with basicHttpBinding without any problems
Arkady
Typically we get EndPointNotFoundException only for 2 reasons
(1)Endpoint Address is not correct
(2)Your network or Firewall not allowing remote client to communicate with that server (May be that port is not open)
check list:
==========
(1)Are you able to browse http://servername/vdir/service.svc from client machine
(2)If you try to generate proxy (svcutil http://servername/vdir/service.svc) from client machine,are you able to generate proxy
If possible,can you please post client config and service config
-Thank you
Madhu
Hi, Manhu!
Thanks for advice , I'll check that , because meanwhile I used PSDK example's config files and didn't create them yet. Just modified as documentation stand. I believe that it not f/w problem because SelfHost example ( both client and server are console app ) work as needed after setting SPN ( or running on system account ). I'll try to check , due to your advice, if client machine IE see the description of the service when will be in the office ( in 2 days ) , no problems to see that on service machine ( as original example designed ). I'll write you what happen after check
Thanks
Arkady
Hi, Manhu!
After check I see that IE can't load svc page on client.
I used standard configs of GetStarted Platform SDK example
The next is for service , just original Web.config from GetStarted example :
-
<?
xml version="1.0" encoding="utf-8" ?> <
configuration> <
system.serviceModel> <
services> <
service name="Microsoft.ServiceModel.Samples.CalculatorService" behaviorConfiguration="CalculatorServiceBehavior"> <!--
use base address provided by host --> <
endpoint address="" binding="wsHttpBinding" bindingConfiguration="Binding1" contract="Microsoft.ServiceModel.Samples.ICalculator" /> </
service> </
services> <
bindings> <
wsHttpBinding> <
binding name="Binding1" /> </
wsHttpBinding> </
bindings> <!--
For debugging purposes set the returnUnknownExceptionsAsFaults attribute to true--> <
behaviors> <
behavior name="CalculatorServiceBehavior" returnUnknownExceptionsAsFaults="False" > </
behavior> </
behaviors> </
system.serviceModel> </
configuration> -
But create proxy and client config from other machine ( svcutil.exe http://comoutername.domainname/servicemodelsamples/service.svc?wsdl)failed , the same for opening http://computername.domainname/servicemodelsamples/service.svc in Client's IE.
OTOH that work without problems in the same machine ( both for "computername.domainname" /"localhost"
As I wrote in other thread SelfHost example do work for me on different machines,
so there are no f/w or other network limitations
What do you think I need to change in web.config for client will see it in IE and give me opportunity to generate proxy/config files in svcutil ?
TIA
Arkady
P.S. The config file where I changed "localhost" to "computername.domainname"
<?
xml version="1.0" encoding="utf-8" ?> <
configuration> <
system.serviceModel> <
client> <
endpoint name="" address="http://localhost/servicemodelsamples/service.svc" binding="wsHttpBinding" bindingConfiguration="Binding1" contract="ICalculator" /> </
client> <
bindings> <
wsHttpBinding> <
binding name="Binding1" /> </
wsHttpBinding> </
bindings> </
system.serviceModel> </
configuration>
So then everything is working ok locally but not remotely, correct?
Can you get a trace set up for the service and post it?
Use this in your web.config:
<system.serviceModel>
<diagnostics>
<messageLogging maxMessagesToLog="30000"
logEntireMessage="true"
logMessagesAtServiceLevel="false"
logMalformedMessages="true"
logMessagesAtTransportLevel="true">
</messageLogging>
</diagnostics>
</system.serviceModel>
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Warning, ActivityTracing" propagateActivity="true" >
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging" switchValue="Warning">
<listeners>
<add name="xml" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="Server.e2e" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>
Thanks!
Scott
Hi, Scott!
Exactly , GetStarted work fine when client and service ( IIS hosted ) both on the same machine, but if I want to run client from other machine or try to open there in IE http://computer.domain/servicemodelsamples/service.svc both failed.
I set code for tracing in web.config and opened service.svc in the IE on the same computer but there is no Server.e2e at all. Sure I missed something. Additional question : do server.e2e have to be under servicemodelsamples\bin directory ?
TIA
Arkady
Additionally, during solution building after I added to web.config your warning appear :
The 'propagateActivity' attribute is not declared
Seems like I haven't something ...
I have Orcas and WinFX Beta 2
TIA
Arkady
Hi, Scott!
I changed initializeData="Server.e2e" to
initializeData
="C:\Logs\Server.e2e" and received server.e2e there all tracing after I run local client of GetStarted. Before it I tried IE on remote computer without success ( e2e include only local client operations )
I see there that service listen at http://name.domain/servicemodelsamples/service.svc
and next at https://name.domain/servicemodelsamples/service.svc
and local client ( and local IE ) do work but not remote.
I'm sending server.e2e to you directly
TIA
Arkady