开发者

Why am I randomly getting a "There was no endpoint listening at" error?

开发者 https://www.devze.com 2023-01-04 17:30 出处:网络
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 sometim

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
0

精彩评论

暂无评论...
验证码 换一张
取 消