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

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

Any ideas how to fix this?

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


        
13条回答
  •  星月不相逢
    2020-11-29 03:09

    Not sure if it's really a problem, but I see you have the same name for your binding configuration ().

    I usually try to call my endpoints something like "UserServiceBasicHttp" or something similar (the "Binding" really doesn't have anything to do here), and I try to call my binding configurations something with "....Configuration", e.g. "UserServiceDefaultBinding", to avoid any potential name clashes.

    Marc

提交回复
热议问题