Recently, I have a project to develop an Ajax application to SharePoint. I deployed the Ajax configuration according to the method mentioned in the previous post. The application went well, and it works like charm in SharePoint.

However, when SharePoint Search was trying to crawl on the site collection where my application was deployed, it fails, and the following error message was found in the Crawl Log.

http://<servername>
An unrecognized HTTP status was received. Check that the address can be accessed using Internet Explorer. (WebExceptionStatus ConnectionClosed The underlying connection was closed: The connection was closed unexpectedly.)

I tried to figure out what it meant and why it happened. And of course, I tried to access the address using Internet Explorer, as it suggested. I couldn’t find anything wrong when I access the address using Internet Explorer, because in fact, it has been working all along.

I checked the ULS log, and found the following error:

***** Couldn't retrieve server http://<servername> policy, hr = 80041204 - File:d:\office\source\search\search\gather\protocols\sts3\sts3util.cxx Line:543
****** Server <servername> security initialization failed, hr = 80041204 - File:d:\office\source\search\search\gather\protocols\sts3\sts3util.cxx Line:317
****** Server <servername> initialized, hr = 80041204 - File:d:\office\source\search\search\gather\protocols\sts3\sts3util.cxx Line:321

I began to suspect that it was because of my Ajax configuration, only after I deactivate the Ajax feature, i.e. removing the Ajax configuration from the web.config file, the SharePoint Search is able to crawl the site collection again.
More »

Tags Tags:
Categories: Tech Stuff
Posted By: johanmk
Last Edit: 18 Dec 2008 @ 10 20 AM

E-mailPermalinkComments (0)

AJAX has been fully supported in SharePoint 2007, since the release of Service Pack 1, and there are plenty of blogs and websites that describe how to integrate AJAX with SharePoint 2007, so I’m not going to elaborate this topic in detail. Tobias Zimmergren’s Post is a good start.

Just to summarize on this matter, you’ll need to do the following, in order to integrate Ajax with SharePoint 2007:

  1. Apply Service Pack 1 for your SharePoint 2007
  2. Install .NET Framework 3.5 SP1
    Ajax functionality is integrated with .NET 3.5. So, you don’t need any additional downloads
  3. Put AJAX configuration in the SharePoint’s web.config file
  4. Put the ScriptManager tag in the default.master

There are several ways of putting the Ajax configuration to the web.config file. You can add the configuration elements manually ‘by hand’, or you can do some automation using SharePoint Feature. Most of the time, the later approach is the preferred way of doing it.

There’s a CodePlex project that does exactly this, and I thought it is a good idea to extract and modify its functionality to make a generic web.config-modifying feature receiver. The reason is because sometimes we might need to put another kind configuration settings to the web.config file. For example, adding Enterprise Library Configuration sections, adding AppSettings sections, or simply modifying the configuration value of the existing element in the web.config file. Changes to the web.config is implemented by using SPWebConfigModification class.

These are the code files:

Tags Tags: ,
Categories: Tech Stuff
Posted By: johanmk
Last Edit: 15 Dec 2008 @ 02 17 AM

E-mailPermalinkComments (1)

Today, I spent almost an hour trying to save a SharePoint site, together with its content, into a site template. I clearly remembered that I saw a link called “Save Site as Template” in the Site Settings page before. I kept looking for the link at several locations very very carefuly. Then I realized that I couldn’t find a link to save a list as a template in the list settings page as well..

I was puzzled and didn’t know exactly what was going on. I thought that I would waste several hours trying figure this thing out.

Luckily the work around is pretty easy. You just need to append _layouts/savetmpl.aspx just after the name of the site in the URL, as mentioned here:
http://msmvps.com/blogs/shane/archive/2006/07/29/106170.aspx

So, if your site resides in http://moss/SiteName, the URL would be http://moss/SiteName/_layouts/savetmpl.aspx.

There’s an excellent implementation as a Feature that can be activated/deactivated as seen in the following address:
http://sharepointsolutions.blogspot.com/2006/07/adding-save-site-as-template-link-to.html

Well, looking at the dates, someone has realized the missing “Save Site as Template” hyperlink in 2006. I wonder why it still happens even after 2 years. I’ve installed the SharePoint with Service Pack 1.

Tags Tags:
Categories: Tech Stuff
Posted By: johanmk
Last Edit: 15 Dec 2008 @ 02 17 AM

E-mailPermalinkComments (0)

 08 Aug 2007 @ 1:40 PM 

In my current project, there is a need for me to create a custom list under the Shared Services Provider (SSP) administration web site to put some configuration values. As a SharePoint developer, what comes next is that we need to get the Site object first, before we can get the List under it.

However, there wasn’t any straight-forward way to get the SSP administration web site address, given only the SSP Name.
The only hint I have is that you can get the ServerContext object, by providing the SSP name.

View Code CSHARP
string sspName = "MySharedServices";
ServerContext ctx = ServerContext.GetContext(sspName);

I’ve been trying to look for the methods or classes that serves my need. Finally, this is the only way I know to get the SSP web site from the SSP name. It’s using a little bit of reflection.

View Code CSHARP
string sspName = "MySharedServices";
ServerContext ctx = ServerContext.GetContext(sspName);
 
Guid siteGuid = (Guid) ctx.GetType().GetProperty("SharedServiceAdministrationSiteId", -1, null, Type.GetType("System.Guid"), new Type[0], new ParameterModifier[0]).GetValue(ctx, null);
 
SPSite site = new SPSite(siteGuid);
Tags Tags: , ,
Categories: Tech Stuff
Posted By: johanmk
Last Edit: 18 Dec 2008 @ 01 59 PM

E-mailPermalinkComments (0)

I was trying to install the Service Pack 1 for Microsoft Visual Studio .NET 2005 before it failed due to insufficient disk space. The service pack installation rollback seems to totally kill my Visual Studio .NET 2005 and .NET framework. A repair installation for the Visual Studio 2005 didn’t help at all. It gave me a frustrating unexpected 2908 error. So, my only option was to completely remove Visual Studio 2005 and .NET Framework 2.0, and trying to reinstall them again.

However, when I tried to reinstall .NET Framework 2.0, it gave me another frustating 25007 Error, and this is what was logged in the event log:

Product: Microsoft .NET Framework 2.0 — Error 25007.Error occurred while initializing fusion. Setup could not load fusion with LoadLibraryShim(). Error: The handle is invalid.

I have no idea on what that was all about. After I googled around to find the solution to this problem, this resolution seems to solve my problem.

Remove completely the %WINDIR%WinSxSPolicies folder, and rerun both the installations.

It saved my day. I was able to reinstall .NET Framework 2.0 and Visual Studio .NET 2005.

Now, back to my original purpose: 2nd attempt to install Service Pack 1 for Visual Studio .NET 2005. Now I’ll have to make sure that I have enough disk space! Giving it up to 6 GB of free space, just in case…

Tags Tags: ,
Categories: Tech Stuff
Posted By: johanmk
Last Edit: 15 Dec 2008 @ 02 17 AM

E-mailPermalinkComments (0)

\/ More Options ...
Change Theme...
  • Users » 1
  • Posts/Pages » 5
  • Comments » 1
Change Theme...
  • VoidVoid
  • LifeLife « Default
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LiteLight