I have the following code that I run to determine the address for my WCF service in my Silverlight application.
Public Sub New()
myBinding = New BasicHttpBinding
myBinding.ReceiveTimeout = New TimeSpan(0, 59, 0)
myBinding.SendTimeout = New TimeSpan(0, 59, 0)
myBinding.OpenTimeout = New TimeSpan(0, 1, 0)
myBinding.CloseTimeout = New TimeSpan(0, 1, 0)
myBinding.MaxBufferSize = 2147483647
myBinding.MaxReceivedMessageSize = 2147483647
address = New EndpointAddress(New Uri(Application.Current.Host.Source, "../service/EKService.svc"))
proxy = New EKServiceClient(myBinding, address)
My application currently runs fine if I am running it in the browser, but if I try to run it out of the browser the application returns a NotFound error when trying to get information from the WCF service. I am currently trying to run the application through Visual Studio 2010 and stepping through the code shows that I am still getting the valid url for the WCF service. Additionally, I am able to successfully open the link in a browser window. As a result, I am unsure why I am having this problem.
My ClientAccessPolicy.xml file is:
<?xml version="1.0" encoding="utf-8" ?>
<domain uri="https://*" />
<resource include-subpaths="true" path="/"/>