0

I have a solution with a WCF service library (wcfservice) and a website (myweb). wcfservice is a restful WCF service, it has 2 operations:

[OperationContract]
[WebGet(UriTemplate = "User/{token}")]
UserInfo GetUserInfo(string token)

[OperationContract]
[WebGet(UriTemplate = "History/{user_id}")]
List<History> GetGameHistory(string user_id)

It also has a reference to other service (hosted on another machine), which gives actual userinfo for method 1.

This wcf service should be hosted in iis, through this website (only https allowed). So I added reference to wcfservice in myweb, also added service.svc file that points to contract in wcfservice. At this point everything is ok. I can call https://localhost/service.svc/History/xxx from browser and it works.

What I want to do: In myweb/default.aspx on Page_Load I want to call method GetUserInfo from wcfservice. So I added service reference to wcfservice (am I doing wrong? I mean I already have a reference to dll files, but how do I call methods from them?) and since then can't get to make it work, I got all kind of errors (there is no endpoint listening... , The remote certificate is invalid according to the validation procedure, etc...)

Can anyone help? :) Some web.config examples would be great, or if I shouldn't be adding service reference in website, paste some code how to call service methods from dll.

UPDATE: Uploaded VS2013 solution:

http://www.datafilehost.com/d/c3bdffe8

Please see readme.txt

gio_333m
  • 121
  • 1
  • 10

0 Answers0