Getting 401--Unauthorized errorRSS

1 reply

Last post Apr 21, 2017 08:59 AM by Yuk Ding

  • Getting 401--Unauthorized error

    Apr 20, 2017 07:58 PM|gib65|LINK


    I just setup a Windows Server 2016 machine with IIS 10.0. I have a web API on it. The permissions on the root folder for the API are set for all users I want to give access to. When I try to publish in Visual Studio 2015, however, it gives me a 401 Unauthorized error:

    Right now, I'm trying to set permissions for specific users with Web Deploy. In IIS, I right-click on Default Web Site and select Web Deploy > Configure Web Deploy Publishing. I assume that any websites under the Default Web Site, such as my API, will inheret the same configuration settings. Yet my configuration settings don't seem to get rid of the error.

    So now I'm trying to set configuration settings by right-clicking directly on my API, but the context menu doesn't contain "configure web deploy publishing".

    I'd like to know: is setting the configuration settings of the Default Web Site sufficient or do I need to do it directly on the specific website I want to configure, and if the latter, how do I get that option to become available in the context menu?

    The larger question is: what can I try, other than what I've already tried, to get passed the 401--Unauthorized error?


  • Re: Getting 401--Unauthorized error

    Apr 21, 2017 08:59 AM|Yuk Ding|LINK

    Hi gib65,

    Do you want to deploy the web API on your local Windows server? If you just need to achieve this, modify the server:ec2-54........... to localhost.

    Then you could deploy the web site.

    If you need to access the remote server, have you enabled the management service and test whether you could connect the remote server with your management service configuration?

    This link provide the instruction to grant permission for non- administrator user:

    This link also provide the method to troubleshooting the IIS web deploy problem with error message like can't connect remote server:

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.