Thursday, April 16, 2009

IE 8 NTLM Authentication on Windows 2008

If you are using host headers to resolve the websites, then you might have seen the following issue with NTLM authenticated sites on IE 8. When you access the websites on a machine other than the one where it is hosted, you will be able to get to the sites.
Once you RDP onto the server and try to connect to the website, it will prompt for your windows credentials and will get an access denied message. This problem occurs because Windows includes a loopback check security feature that helps prevent reflection attacks on your computer(Probably some kind of security change has been made in IE8 related to this feature). Therefore, authentication fails if the FQDN or the custom host header that you use does not match the local computer name.
Resolution: Disable the loopback check
  • Click Start, click Run, type regedit, and then click OK.
  • In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  • Right-click Lsa, point to New, and then click DWORD Value.
  • Type DisableLoopbackCheck, and then press ENTER.
  • Right-click DisableLoopbackCheck, and then click Modify.
  • In the Value data box, type 1, and then click OK.
  • Quit Registry Editor, and then restart your computer.

Sunday, February 1, 2009

Loading this assembly would produce a different grant set from other instances

After installing .NET 3.5 sp1, all the MOSS web applications were working fine except for one. The following error was showing up:

Stack trace:
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Web.Configuration.Common.ModulesEntry.Create()
at System.Web.Configuration.HttpModulesSection.CreateModules()
at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)

Fix:
Just restart the application pool account associated with the erroring application and you be all set.

Saturday, January 17, 2009

MOSS search access denied error after .NET Framework 3.5 sp1 installation

Recently we rolled out .NET Framework 3.5 sp1 on our MOSS Servers. During testing, we found out that while crawling the Sharepoint website the following error occurred:

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.

To fix the above issue, try the below steps:
  • Click Start, click Run, type regedit, and then click OK.
  • In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  • Right-click Lsa, point to New, and then click DWORD Value.
  • Type DisableLoopbackCheck, and then press ENTER.
  • Right-click DisableLoopbackCheck, and then click Modify.
  • In the Value data box, type 1, and then click OK.
  • Quit Registry Editor, and then restart your computer.(Try to re-run the crawl after registry change without restart. Sometimes it may not be necessary to restart.)

Tuesday, December 16, 2008

MOSS out of the box search error

Recently while configuring the out of the box search for a MOSS site, I encountered the following error : Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information.
In order to fix the error, please make sure the application pool, the site is running under, has access to the search index. Here are the steps to follow:

  • First make sure the MOSS Search Service is running. Check the event viewer for error messages. If everything is ok, go to the next step
  • Find out the application pool account the site is running under(network service, local account or another account)
  • Go to Central administration -> SSP settings -> Search
  • Check the default content access and make sure it is the same as the above one

Thursday, December 4, 2008

MOSS SSP URL

In order to get the SSP URL of the farm, we can use the following piece of code. This is really helpful if you don't want to hardcode the SSP URL.
   1:  private string getSSPURL()
   2:  {
   3:     string uri = string.Empty;
   4:     ServerContext sc = ServerContext.Default;
   5:     object ssp = sc.GetType().GetProperty("SharedResourceProvider",
                       BindingFlags.Instance | BindingFlags.NonPublic).GetValue(sc, null);
   6:     Guid sspGuid = (Guid)ssp.GetType().GetProperty("AdministrationSiteId").GetValue(ssp, null);
   7:     using (SPSite sspSite = new SPSite(sspGuid))
   8:     {
   9:       uri = sspSite.WebApplication.GetResponseUri(SPUrlZone.Default).AbsoluteUri + "ssp/admin";
  10:     }
  11:     return uri;
  12:  }

Wednesday, October 22, 2008

Team Site Error (A datasheet component compatible with Windows SharePoint Services is notinstalled, your browser does not support ActiveX controls...)

Since the last couple of days we were experiencing problems with the Team Site while trying to view a list in the Datasheet view mode. The error being displayed was something like this:

The list is displayed in Standard view. It cannot be displayed in Datasheet view for one or more of the following reasons: A datasheet component compatible with Windows SharePoint Services is not installed, your browser does not support ActiveX controls, or support for ActiveX controls is disabled.

This error was occurring due to a bug in the SharePoint Services Service Pack 3 update and this error has been temporarily fixed by following the below instructions:

  • Take backup of ows.js file in the following directory: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Template\Layouts\1033
  • Open ows.js file and add following function : function RenderActiveX(str){ document.write(str);}
  • Save the changes and do an iisreset
  • Refresh your browser

Thursday, October 2, 2008

Computers are like bicycles for are mind

I was going through a book and saw the following phrase - "Computers are like bicycles for are mind". Initially confused, later intrigued and fascinated, I tried to google it and found the following youtube video....

The graph shown in the above video (probably taken decades back) is really interesting. Please do check it out when you get a chance.