WCF Error - Could not find default endpoint element that references contract 'UserService.UserService'

前端 未结 13 1809
野趣味
野趣味 2020-11-29 02:27

Any ideas how to fix this?

UserService.UserServiceClient userServiceClient = new UserServiceClient();
            userServiceClient.GetUsersCompleted += new          


        
13条回答
  •  無奈伤痛
    2020-11-29 03:02

    I ran into the same issue, for whatever reason Visual Studio did not update the web config when I first added the service. I found that updating the Service Reference also fixed this issue.

    Steps:

    1. Navigate to the Service Reference Folder
    2. Expand it
    3. Right Click and Select update Service Reference
    4. Observe web Config be updated

提交回复
热议问题