locked
Sharepoint App error 401.0 - Unauthorized RRS feed

  • Question

  • I've tried this project on two different SharePoint Foundation servers with identical results. I can build the project and when I try to run it from VS, it appears to deploy the package successfully and then when it opens IE, I get the following message. 

    In both cases, I'm a member of the local administrators group on a vm where both SharePoint and VS are on the same box. I'm also in the site collection admin group. I'm not sure how to determine what exactly is failing. And I'm not sure I understand why the logon method appears to be anonymous.

    Friday, March 8, 2013 6:16 AM

Answers

  • Hi Jerry,

    It looks like you're trying to use ACS authentication with your SharePoint server (the "Use a client secret" option in SharePoint properties).  This is what causes the Anonymous logon method - LightSwitch authenticates the user using a token passed from SharePoint to the IIS server instead.  For an on-premises SharePoint server, ACS requires being set up in a hybrid configuration.  The other option is to use a server-to-server or "high-trust" configuration ("Use a certificate for a high trust configuration" in LightSwitch), which will work in a purely on-premises environment.  This would show up as using Windows auth.

    Thanks,
    Chris Rummel

    Wednesday, March 13, 2013 1:55 PM

All replies

  • Hi,

    Generally we take the method below to grant the IIS_IUSRS group Read/Execute or Modify permissions to your web folder, please follow the link below, and check whether it is helpful,

    HTTP Error 401.1 - Unauthorized from Local IIS

    hope it helps you,

    With regards


    Angie xu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    • Edited by Angie Xu Wednesday, January 15, 2014 6:12 AM
    Tuesday, March 12, 2013 5:32 AM
  • Anonymous is disabled so why would I grand excess permissions to IIS_IUSRS? 

    Why would I post to the IIS users group when this is a stock SharePoint install that obviously has a problem with the Lightswitch packaged app?

    This appears to be a Lightswitch packaging problem.

    Wednesday, March 13, 2013 12:17 AM
  • Jerry, did you create this project from the same machine that you were having the problems you reported in your other posts?


    David Kidder | Senior SDET | Microsoft | LightSwitch

    Wednesday, March 13, 2013 2:38 AM
    Moderator
  • Hi Jerry,

    It looks like you're trying to use ACS authentication with your SharePoint server (the "Use a client secret" option in SharePoint properties).  This is what causes the Anonymous logon method - LightSwitch authenticates the user using a token passed from SharePoint to the IIS server instead.  For an on-premises SharePoint server, ACS requires being set up in a hybrid configuration.  The other option is to use a server-to-server or "high-trust" configuration ("Use a certificate for a high trust configuration" in LightSwitch), which will work in a purely on-premises environment.  This would show up as using Windows auth.

    Thanks,
    Chris Rummel

    Wednesday, March 13, 2013 1:55 PM