I am using .NET to create a WCF and a website that calls it. About 5% of the time I get an error that says there was no endpoint listening. I don't know why it works most of the time but then sometimes it doesn't.
Here is the code I am using, I am not sure if it is the way I am creating the WCF. I added a reference to the version of the WCF on my machine but then if I am on production I change the endpoint address to the production url
Dim wcfService = New StagingService.Service1Client
If Clng0(AppConfig("isProduction"))开发者_运维技巧 = 1 Then
wcfService.Endpoint.Address = New System.ServiceModel.EndpointAddress
("http://www.myurl.com/Service1.svc")
End If
精彩评论