Koen’s Weblog

SharePoint developer with a life!

Access Denied when using hostname (search and site) on MOSS 2007.

Posted by koenvosters on June 15, 2009

Lately I’ve ran into a weird bug that appearantly has to do with the Windows Server 2003 Service Pack. When I tried a SharePoint site with http://spdev1:35000 everything worked like a charm. However, if I used a hostname http://customerdemo then all of a sudden I got Access is denied. As I used the administrator account with full access that was quite weird. As I didn’t get into SharePoint it meant that the problem had to be in IIS. After looking up some stuff I came to a Microsoft hotfix that sorted my problem : http://support.microsoft.com/kb/896861

That hotfix does not really mention the hostname problem, but it does fix the problem. Method1 is what you should go for on a production environment, Method 2 is what you can use on a dev box.
Method 2:

Method 2: Disable the loopback check

Follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Quit Registry Editor, and then restart your computer.

I recalled seeing this solution on some other Belgian blog post by Sven Gillis. As it turns out there they linked it to the search no longer working (which in my case is quite normal as no account has access to the site). So if you get the following in your search you can use the above solution as well:
Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has “Full Read” permissions on the SharePoint Web Application being crawled. (The item was deleted because it was either not found or the crawler was denied access to it.)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>