none
Request failed with http status 401: unauthorized RRS feed

  • Question

  • Hi, 

    I have a WCF service which was running perfectly on my old server(windows 2008). I have recently migrated to new server(windows 2016) and facing a issue with (Request failed with http status 401:  unauthorized). 

    This WCF service is basically consumed in Web Application which also reside on the same server(new),Error I am getting is when I am trying to access WCF service with in Web Application.

    Friday, February 9, 2018 11:17 AM

Answers

  • Hi,

    I just cross checked with old server configuration and came across we had to Enable Anonymous Authentication for WCF Service on IIS and also within Server Manager of windows 2016 server We did not enable  HTTP Activation Feature under WCF Services. 

    Now Its working Thanks your Reply. 

    However we are facing the same error "Request failed with http status 401: unauthorized" for .asmx web service. I also checked configuration on old server . Could please suggest what would I be missing ??

    • Marked as answer by chandu537 Monday, February 12, 2018 7:28 AM
    Monday, February 12, 2018 6:43 AM

All replies

  • Hi chandu537,

    Could you share us your web.config from WCF Service?

    Based on the error message, it is related with Authentication. Do you implement any WCF Authentication? If you do, what is authentication did you use?

    If there are no specific changes in your client and server code, I suggest you run Web Application under domain account in IIS.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, February 12, 2018 5:34 AM
  • Hi,

    I just cross checked with old server configuration and came across we had to Enable Anonymous Authentication for WCF Service on IIS and also within Server Manager of windows 2016 server We did not enable  HTTP Activation Feature under WCF Services. 

    Now Its working Thanks your Reply. 

    However we are facing the same error "Request failed with http status 401: unauthorized" for .asmx web service. I also checked configuration on old server . Could please suggest what would I be missing ??

    • Marked as answer by chandu537 Monday, February 12, 2018 7:28 AM
    Monday, February 12, 2018 6:43 AM
  • Hi chandu,

    >> also within Server Manager of windows 2016 server We did not enable  HTTP Activation Feature under WCF Services. 

    It seems your original post could be resolved by enable HTTP Activation, I would suggest you mark your reply as answer to close current thread.

    >>However we are facing the same error "Request failed with http status 401: unauthorizedfor .asmx web service.

    For this issue, I would suggest you post new thread.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 12, 2018 6:55 AM
  • Sure. Thank you
    Monday, February 12, 2018 7:28 AM