Friday, August 10, 2012

Sharepoint 2013 apps: prompt for credentials

At last - I've finally been able to deploy my first app!  I am mainly focusing on SharePoint hosted app development, we'll get this nailed down first then explore the cloud model.  But for now, I'm using Visual Studio 2012 RC with the Office extensions, then when I go in to create my first app, all is well, the app gets deployed, then when I try to open the app I get prompted for credentials three times then the page comes up blank.

IIS shows a 401 error, which led me to think it was a permissions issue, tried going down that path without success.

My good friend M. told me the solution - had to disable the loopback adapter check in the registry on my box.  Do these steps then try out that app again - it'll work just fine!

  1. Run RegEdit as admin.  Locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  2. Right click the node "Lsa", point to New, and then click DWORD
  3. Type in the name of the key as DisableLoopbackCheck, noting case, and then press enter.
  4. Right click the new DisableLoopbackCheck key, and then click Modify.
  5. In the Value data box, type 1, and then click OK.
  6. Quit the Registry Editor, and then reboot your server.

Next up will be to create an app that interacts with a SharePoint list.  I'll post code once that's working!

Steve