WCF service returning 404 on method requests

后端 未结 8 1714
-上瘾入骨i
-上瘾入骨i 2020-12-09 03:06

I have a WCF service page running only WebGets/WebInvokes over SSL - it works fine on my local machine (self signed cert). On production, however, I can reach service.svc (a

8条回答
  •  时光取名叫无心
    2020-12-09 03:42

    I had the same problem. From what I read, WCF isnt NT Authenticated authorization (or HTTPContext compatible) by default.

    I had to add this to my config file for the WCF service web.config in the section:

    
    

    Which you did, plus this:

    And on the actual service class definiation I had to add:

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class DataService : IDataDeliveryServiceContract
    

    This fixed my problem.

提交回复
热议问题