Ok, I know I have a long way to go in learning Wcf and I have just touched the surface. But, I am wondering why Wcf is configured as following in the PTWin and PTWpf config file:
<endpoint name="WcfDataPortal"
address=http://localhost:4147/WcfHost/WcfPortal.svc
binding="wsHttpBinding"
contract="Csla.Server.Hosts.IWcfPortal" />
and is configured as follows in the PTWeb config file:
<endpoint name="WcfDataPortal"
address=http://localhost:3564/WcfHost/WcfPortal.svc
binding="wsHttpBinding"
contract="Csla.Server.Hosts.IWcfPortal" />
It did not work on the web app, but when I changed the port on the localhost from 3564 to 4147, just like the Windows forms and Windows Presentation Foundation example it worked. Was there a reason it was set to 3564 instead of 4147? But when I changed the port it worked.
Also, what is a recomended book to read about Wcf? I have seen a couple with good recomendations on Amazon.com. The Apress one was slammed but one by O'Reilly by Michelle Bustamante was rated pretty well. Any ideas?
Thank you in advance for you help.
Keith
Hi Keith
This is something to do with the web server that Studio 2005 and 2008 use by default. From memory by default the port is dynamic (changes all the time). Studio then keeps track of the changes and it all seems to work ok. You can turn this off by right clicking on the web project in the solution explorer and select properties. Then look in the properties grid for "Use Dynamic Ports" and set this to false. You can also set the desired port number in this properties grid.
But I find this web server takes up lots of ram so I usually use the Web Deployment extension to studio 2008 and then deploy directly to IIS6 or IIS7. Check out
http://blogs.msdn.com/webdevtools/archive/2008/01/25/announcing-rtw-of-visual-studio-2008-web-deployment-projects-wdp.aspx
and
http://www.microsoft.com/downloads/details.aspx?FamilyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&displaylang=en
Rob
Yes, Visual Studio keeps changing the port numbers out from under me - I'm not entirely sure why.
So I fix the port numbers in the client configs when I see they are wrong, but I don't always catch all of them. And even if I get them right, YOU might find that VS changes them out from under you too...
So the only real solution is to click the WcfHost item in Solution Explorer and look in the properties window to see what port it is using on YOUR machine, then change your client config file(s) to use the correct port.
Copyright (c) Marimer LLC