Welcome to MSDN Blogs Sign in | Join | Help

PowerShell command to get Resource Count for SP 2010

One of my colleagues @ Microsoft happen to ask this quesiton for Sharepoint 2010 on Resource allocation for Sandboxed Solution

The default quota is 300 server resources, how to understand it ? ( or Server Points ?)

How to calculate them ?.

 

ANSWER:

The default Resourcing system is divided into 14 measures and if you want to get the details on what is the Resource Count of each measure (like threadabort,memory, AbnormalProcessTermination, CriticalExceptionCount, etc) you will need to run following PowerShell command:

 

Try following on the PowerShell console to get the measure details:

***************************************************************************************************************************************

Add-PSSnapin Microsoft.SharePoint.Powershell

[System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)

$s=[Microsoft.SharePoint.Administration.SPUserCodeService]::Local

$s.ResourceMeasures | Select-Object Name,ResourcePerPoint.

***************************************************************************************************************************************

 

Basically an output that looks like:

 

AbnormalProcessTerminationCount                                                                                       1

CPUExecutionTime                                                                                                   3600

CriticalExceptionCount                                                                                               10

InvocationCount                                                                                                     100

PercentProcessorTime                                                                                                 85

ProcessCPUCycles                                                                                           100000000000

ProcessHandleCount                                                                                                10000

ProcessIOBytes                                                                                                        0

ProcessThreadCount                                                                                                10000

ProcessVirtualBytes                                                                                                   0

SharePointDatabaseQueryCount                                                                                         20

SharePointDatabaseQueryTime                                                                                         120

UnhandledExceptionCount                                                                                              50

UnresponsiveprocessCount                                                                                              2

 

 

This will give you the details on how much point are assigned per the 14 measures.

 

Posted by ketaanhs | 0 Comments
Filed under:

INTRO: Sandboxed Solutions in SP2010 [Sharepoint 2010]

Now all of us (MOSS 2007) folks know we have solutions (often referred as WSP). With Sharepoint 2010 we get 2 types of Solutions: 1. Sandboxed Solutions and 2. Full-trust Solution. So now for IT-Pros a goodie is provided and that is Sandboxed solution. Why? As with Sandboxed solutions ITPros will not be bothered for deploying the solutions to the FARM, hey don’t party yet as Sandboxed solutions are not the same FULL-BLOWN solutions that we think. So not everything can be done as Sandboxed Solutions only few can be done and following are some of them that can be created:

 

v  Content Types

v  Site Columns

v  Custom Actions

v  Declarative Workflows

v  Event Receivers

v  Feature Receivers

v  InfoPath Forms Services (not admin-approved i.e. withour code behind)

v  JavaScript, AJAX, jQuery, Silverlight

v  List Definitions

v  Site Pages (but no application pages with code behind)

v  Web parts (but not visual web parts)

 

What is Sandboxed: It is a separate process where solutions run and not all features of Microsoft. SharePoint namespace are available i.e. only a subset of features are available. So with sandboxed solution we can’t leverage everything inside the Microsoft.SharePoint namespace but we can consume bulk of the stuff. Basically a CAS [Code Access Policy] keeps us within the limits. Any solution that is created for Sandbox can be deployed into a special Solutions Gallery in the site-collection called SOLUTIONS GALLERY. And all these solutions that are deployed here can be activated from a menu (ECB menu) on that solutions gallery itself, hover around the item and you will get a ACTIVATE/DEACTIVATE menu. For all this to work properly we have to make sure that the “Microsoft SharePoint Foundation User Code Service” is starting on one or more of the servers in the Farm. You can confirm whether the service is running or not by checking the sandbox resource quota that is available on the top of the same page (Solutions Gallery Page). All of the resource assignment and monitoring for the Sandboxed solution can be controlled from Central Admin app.

 

Sandboxed Solutions to work need these 3 thing:

User Code Service (SPUCHostService.exe): this service will decide whether the box on which this service is running will participate in the Sandboxed solutions are not. This should run either on one box or more for sandbox solutions to take advantage of the server and run it on that server.

 

Sandbox Worker Process (SPUCWorkerProcess.exe): This is the actual process in which the Sandboxed Solutions run.

 

Sandbox Worker Process Proxy (SPUCWorkerProcessProxy.exe): If you have already studied and are aware of the new Service Application architecture then you get this one, this is the proxy which the web-app will use form the proxy group to use the sandbox.

 

So with Sandboxed solutions you can only do limited things i.e. to use limited API from the Microsoft.SharePoint namespace to name some of them:

Microsoft.SharePoint.Navigation , Microsoft.SharePoint.Utilities (with few exception), Microsoft.SharePoint.Workflow , Microsoft.SharePoint.WebPartPages (with few exception).

 

So if there are so many things that I can’t use, what is the advantage of Sandboxed solution?

 

Well if you have been an IT-Pro or for that matter even and end-user or to say a business user/Author, you know the pain. You have to wait till the admins approve your solution, go thru the code review, deploy it to test environment, then deploy it to staging and finally make it to Production. Also as most of the time the environments are shared, you have to follow the schedule and the deployments are not adhoc. So with Sandboxed solution you can give some control in the hands of end-users/business user (authors) whom the developers would hand over the sandboxed solution which they will upload to the solutions gallery just as you would upload a document to a document-library. And then activate there and there itself.

Ohh hold on, you mean to say the developers would give the WSP (sandboxed solution) to the end-user and no one would do a performance testing on that, how the artifact consumes the resources? Well in a shared environment it is  BAD. Well for this problem we have the solution and i.e. RESOURCE QUOTAS. Basically the Farm admins would decide and allocate some kind of number, wowo this number is basically the amount of resource that your guy (the artifact/solution) can use from the shared resources and this is tracked. So in case if the execution of your artifact/solution happens to cross this limit/number boy your solution will not be allowed to execute anymore and it will be locked. So this way even if you have the mercy to run your own solutions (wsp) you are limited by your resource quota, don’t cross the number somebody’s watching you (I hope you know the MJ song “I always feel like somebodies watching me” J).

 

Hey I have one more Question:

 

Question:  What if I dont want to wait for the solution to cross the Resource quota and then stop executing, i.e. What if I want to validate the solution even before it is run for the first time? I.e. on activation I want to perform few checks and then if the solution passes those checks then only allow it to be activated, what do I do for that?

 

Answer: Very Simple answer for that, write your own CUSTOM VALIDATOR, i.e. write a simple FARM level feature that inherits from a SPSolutionValidator. This allows us to walk thru the entire solution package and check for invalid points (i.e. perform some checks) and then Mark the solution as VALID or INVALID. For this simply create simple constructor to assign an ID to the SolutionValidator that we are writing i.e. something this.Signature="12334678"; and override 2 methods viz. ValidateSolution and ValidateAssembly method.

ValidateSolution(SPSolutionValidationProperties properties) method: This is called once per the solution package.

ValidateAssembly(SPSolutionValidationProperties properties, SPSolutionFile assembly) method: This is called once per each assembly in the soluion Package.

 

 

 

 

So yes this feature is ROCKING!!! This gives the business user the control required without waiting for the IT/Operations team and at the same time not staking the shared resources. SP2010 you ROCK!!!.

Also let me say a BIG thank you to SCOTT HILLER.

 

 

 

Posted by ketaanhs | 0 Comments
Filed under:

NEW FEATURES: Sharepoint 2010 a.k.a. Sharepoint 14

I am sure I might not be the first one to blog about this (although I didn’t check online if somebody has already blogged about this topic, so excuse me for a *repeat*).

 

Following are only the few great and basic features that are now part of SharePoint 2010 (and let me tell you SP 2010 ROCKS!!!):

1.       Service Applications: The SharePoint 2010 architecture for Shared Service Provider (SSP in MOSS 2007) is now changed and now we have something known as Service Applications. Service Applications. So now we are moving more towards Service Model in 2010. In MOSS 2007 the limitation of having only one SSP associated web-application, forced us to use ALL or NOTHING of all the services (Search, BDC, Profile, Excel) from the SSP. So we can’t consume more than one service from 2 or more different SSPs. This limitation is now gone with SP 2010, now we have SERVICE APPLICATIONS, with this a WEB-APPLICATION can choose from all the available SERVICE APPLICATIONS and choose it A-LA-CARTE. [I will try to blog in details about this topic in future] One thing to note here is all these Services in Service Application are WCF Services. So the Advantages are:

a.       Each Service (Search, BDC, PROFILE, etc) is independent and can be independently scaled & configured to run on different Application Servers

b.       Web applications can be associated with any service application, not like MOSS 2007 where we were limited to use only those Service provided by the SSP.

c.       We can have an independent Farm that is hosting only Services and then we share these services across farms.

2.       SP 2010 *DEVELOPMENT* now on Windows-7 & VISTA+SP1 (64-bit OS): At least in Beta 2 both SharePoint Server 2010 and SharePoint Foundation 2010 [WSS 4.0] will be able to install on Windows 7 or Windows Vista+SP1 for doing the development in addition to Server operating systems. This is huge as dev teams now can leverage the non-Server OS as they do it for SQL Server, BizTalk, etc. This definitely deserves a 5 STAR rating isn’t it J, so let me highlight this in different color.

 

3.       Sandbox Solutions: As we had a WSP (Solutions) in MOSS 2007 we still have the same in SP 2010 but now there is a Step brother to it too J. That is when the developer compiles the custom code then can choose between 2 options 1. Sandboxed Solutions or 2. Full blown Solutions [I call it that]. Sandboxed solutions are compiled with a subset object model and can be uploaded to a Special gallery [SOLUTIONS] under the _catalogs. And these solutions can be given to the business admins to upload and use it instead of waiting for IT/Operations team to deploy the solution. Again a very HUGE feature but this blog won’t be enough at all to explain the details.

4.       LINQ Support: The Microsoft.SharePoint.Linq namespace will contain the LINQ to SharePoint provider. It will translate LINQ queries into Collaborative Application Markup Language (CAML) queries, which means that developers do not need to know how to write CAML queries nor learn a different query language for each type of data source.

5.       Client Object Model: WSS 4.0 [a.k.a. WSS FOUNDATION] Introduces three new object models for interacting with SharePoint sites: from script that executes in the browser, from code (Microsoft® .NET Framework 2.0 or later) that executes in a .NET managed application, or from code that executes in a Silverlight 2.0 application. The new ECMAScript, .NET managed, and Silverlight object models each provide a subset of the object model that is defined in Microsoft.SharePoint.dll, including objects that correspond to the major objects in the server-side object model at the site-collection level or lower in the Windows SharePoint Services 4.0 hierarchy. Just to give some little details here, following table should help:

 

Server

.NET Managed and Silverlight

ECMAScript

Microsoft.SharePoint.SPContext

Microsoft.SharePoint.Client. ClientContext

SP.ClientContext

Microsoft.SharePoint.SPSite

Microsoft.SharePoint.Client. Site

SP.Site

Microsoft.SharePoint.SPWeb

Microsoft.SharePoint.Client. Web

SP.Web

Microsoft.SharePoint.SPList

Microsoft.SharePoint.Client.List

SP.List

Microsoft.SharePoint.SPListItem

Microsoft.SharePoint.Client.ListItem

SP.ListItem

Microsoft.SharePoint.SPField (including major derived classes)

Microsoft.SharePoint.Client.Field

SP.Field

Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager

Microsoft.SharePoint.Client.WebParts.LimitedWebPartManager

SP.WebParts.LimitedWebPartManager

 

6.       Master Pages for Application Pages: In WSS 3.0, application pages and content pages use different master pages with different content placeholders. The master pages for the application pages could not be changed. There was no out of the box way [but only thru code] to change the master page for application pages created an inconsistent look and feel. In WSS 4.0, application pages use the same master page as content pages so we get consistent look and feel [no more blue pages]. We most likely will have a SIMPLE or BASIC master page with only the placeholder controls necessary/required. Another thing I thought of mentioning here was about the PAGES library and yes now we can have FOLDERS in PAGES library also and this is supported now in SP 2010.

7.       Ribbon Menu:   as we have Ribbon menu in Office 2007, we have a similar Ribbon Menu in SP 2010 and best thing is you can extend it and choose to use or not. Basically it is a SharePoint control that looks like this:

<SharePoint:SPRibbon  runat="server"  PlaceholderElementId="RibbonContainer" FixedPositioningEnabled="true" PermissionsString="EditListItems, AddAndCustomizePages" PermissionMode="Any"

Visible="false" ApplyPermissionsToRibbonOnly="false">

8.       Themes: Yes themes were available in MOSS 2007 but then you had to create themes and get it deployed thru the IT/Operations team and needed some knowledge of CSS too. But now in SP 2010 the business users can define the themes in the browser and use it. You can modify colors and fonts by applying a .thmx file to your site and can apply a "theme" by using a simple, Web-based UI that requires no knowledge of CSS. The "themes" feature provides broad, clear control of colors and fonts on a Microsoft SharePoint Server 2010  site. It also supports the re-coloring of site images. 

9.       New Event Handler: In SP 2010 we have some much needed event handlers like Web-Adding: this event fires when a new Web site is created. If cancelled, then no Web site is created and the provisioning process does not begin. WebProvisioned : This event fires after the Web site is fully provisioned and the provisioning process has stopped. It can be either synchronous or asynchronous.

10.   POWERSHELL Command-let: Windows PowerShell introduces the concept of a cmdlet: a single function command-line tool built into the command shell. PowerShell is the big thing in SP 2010 and its better we all learn it now, its really not difficult. We have close to 652 command lets in SP2010 that we can use to manage SP 2010 with scripting model. Advantages: Great Performance compared to STSADM, Remoting interface that helps to run the command from one machine in a farm kind of scenario instead of running it on individual servers. There are 2 types of PowerShell Commands: 1. LOCAL ["BOX"]: This command must run on each box and 2. Global: This command only runs *once* per farm.

11.   Developer Dashboard: This one great thing I have seen for the developers who get a lot of beating from the performance labs. This feature displays us (the developers) the diagnostic and performance related statistics. Something like how long did the request take to run, what event handlers were fired, in what sequence did these event handlers fire.

12.   Improvements to SPD Workflows: This is HUGE as in MOSS 2007 the problem was the SPD workflows couldn’t be moved easily between lists/Sites, etc. But now in SP 2010 this issue has been resolved and now we can create Workflows that are reusable. The workflows can be easily moved around different lists/sites once they are defined in SPD. Also another thing to note is you can modify some of the out of the box workflows also.

13.   Visual Studio 2010 Improvements for WSS: VS 2010 we have a very good integration support with SP2010 and we can easily build Sharepoint Artifacts and debug artifacts like web-parts just by hitting (CTRL-F5) that is so cool, you dont have to go thru the hasle and steps as we used in VS 2008. For building custom web-parts, list definitions, etc out of the box i.e. no need to install a separate set of templates as we used to do it in MOSS 2007. The UI is cool which also gives us an option to preview the web-parts yes DESIGNER view for web-parts this was not there in VS 2008. Also thing to note here is you *can’t* use VS 2010 and SPD 2010 with MOSS 2007 or WSS 3.0, no backward compatibility. Just an exception to this fact is workflow projects of MOSS 2007, you can use it with VS 2010.

14.   Sharepoint Designer [SPD] 2010 : This is the no-code tool that was free in 2007 and will continue to be provided FREE in 2010. The navigation is changed and is more friendly compared to what we had in SPD 2007. Great tool to build custom artifacts without writing a single line of code.

15.   Off-box SSL support for HOST NAMED SITE COLLECITONS: This is another huge thing that most of the teams were requesting. With SP 2010 Off-box SSL will be supported in host named/ host-header site collections. This was *not* supported in MOSS 2007 only path based site collections were supported in MOSS 2007 with off-box SSL.

Posted by ketaanhs | 0 Comments
Filed under:

Shared SSP and Web-application creation in Sharepoint 2007 (Alternate URL Synchronizer)

At one of my customers we have a situation where we are Sharing the SSP from one Farm (i.e. Parent Farm) to another Farm (Child Farm). We also need to create a web-application with the same host header name (e.g. http://secure.msft.com) in both the Farms.

Following is the main crux of the issue:

1.       We have a Parent Farm (This farm provides the  SSP to child Farms), lets call this Farm ASIAFARM.

2.       We create a web-app with url “secure.msft.com“ in the ASIAFARM, and the web-app is created.

3.       Now we create the AAM entries for this web-app in the Parent farm (3 entries).

4.       We now go to the Child Farm (This farm consumes the  SSP provided by the Parent Farm), lets call this Farm USFARM.

5.       We try creating a web-app with the same url i.e. “secure.msft.com“ in the USFARM and the web-app creation fails with the error: http://secure.msft.com is already routed to the Default zone of another application. Remove that mapping or use a different URL. 

6.       This is because of the reason that “Alternate URL Synchronizer” timer job syncs all the entries from the Parent Farm to the Child Farm and hence can’t create the web-app.

7.       Then we disabled this (“Alternate URL Synchronizer” ) timer job in the Child Farm and deleted all the AAM entries from the Child Farm.

8.       Then we tried creating a web-app with the same url i.e. “secure.msft.com“ in the USFARM and it succeeded. And we were able to create the additional AAM entries.

 

So bottom line is the (“Alternate URL Synchronizer” ) timer job Synchs the information (AAM) from Parent Farm into the Child Farms. If you want to take a look at the EXECUTE method of this timer job (using Reflector), just open the Assembly name: Microsoft.Office.Sharepoint.Administration

Class Name: AlternateUrlSynchronizerJob [This is  basically a SEALED class).

 

After looking @ the source code of this TIMER JOB we found that it only writes the AAM (Alternate Access Mapping) from the Parent Farm to Child Farm, so now if you try to create a web-application with a host header that is already created in Parent Farm it will not be successful and it will not allow you to create a web-application in Child Farm with that host header. [PLEASE NOTE: This scenario only happens when you are sharing the SSP (Shared Service Provider) with two farms i.e. Child Farm uses SSP of Parent Farm, and that creates this Alternate URL Synchronizer Timer Job).

 

So be cautious (while architecting) when you propose this approach, as you will not be able to create a web-app with same host headers. I am still to find the answer for where all these AAMs are use (my *guess* is Search might be using it, dont what else would be using it).

As disabling this Timer Job (thru Central Admin-->Operations-->Timer Job Definition-->Disable) you will be able to create the web-apps requied in both the farms but not sure if you would be in a supported state, as we are still not aware of where all the AAMs are used.

 

 

Posted by ketaanhs | 0 Comments
Filed under: , ,

"This week in Pictures" web part in Sharepoint 2007 and Time Interval

In case if you are looking for how to set the time interval between image slideshow, you will find this blog helpful.

The “This week in Pictures” [TWIP] web part uses a java script for the slideshow (STARTSlideShow() method).

 Basically in the OnPreRender() method (TWIP) web part from Microsoft.SharePoint.Portal.WebControls.ThisWeekInPicturesWebPart registers the client script

This week in Pictures

This refers to the JAVA script file (IMGLIB.js) in the layouts/1033 (or lang specific folder), that has a StartSlideShow()method that uses the timerId=setTimeout("AutoRun()", slideshowInterval); and slideshowInterval is set to 5000 (milli seconds), I changed this value to 2000 and it works for me (But I am sure we don’t want to do it this way J).

 

But we can override the StartSlideShow() method then we can change it the way we want J.

 

<UPDATE 13th Aug 2009> 

 

Mak Rowshan (my buddy) just updated me that he was able to add the following script to SlideShow.aspx, and it modified the time interval for slideshow.

 

<script language="Javascript">if (IsImgLibJssLoaded())  slideshowInterval = 2000;

</script>

 

 

 

Posted by ketaanhs | 0 Comments

Exploring the Microsoft.Office.Server.Administration.Licensing information

Have you ever had a need to explore whats the expiration date of the trial version of MOSS you are using, if yes then the solution for that is the INTERNAL STATIC CLASS: Microsoft.Office.Server.Administration.Licensing This will help you in finding out what is the expiration date and other details about licensing, check the Fiddler screen shot below for some details.

Licensing Microsoft Sharepoint

http://www.flickr.com/photos/43203883@N00/3815256542/sizes/o/

Posted by ketaanhs | 0 Comments

Site Collection Administrator on a FBA getting Access Denied errors

One of my customers was facing an issue with one of the Forms based authentication sharepoint web application where the site collection administrators were getting ACCESS DENIED errors. We spend a whole lot of time in figuring out what was the issue and for no reason were were getting a SQL Exception as below:

 

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +4846887
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +4860189
System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +90
System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +376
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +4861315
System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +29
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +4863644
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
System.Web.Management.SqlServices.GetSqlConnection (String server, String user, String password, Boolean trusted, String connectionString) +82

[HttpException (0x80004005): Unable to connect to SQL Server database.]
System.Web.Management.SqlServices.GetSqlConnection (String server, String user, String password, Boolean trusted, String connectionString) +137
System.Web.Management.SqlServices.SetupApplication Services(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) +94
System.Web.Management.SqlServices.Install(String database, String dbFileName, String connectionString) +25
System.Web.DataAccess.SqlConnectionHelper.CreateMd fFile(String fullFileName, String dataDir, String connectionString) +395

 

In no way that we were using the out of the box ASP Net Membership provider we had built our own custom Membership Provider that doesn’t leverage SQL Server. After all that debugging finally we decide to take a look at the web.config file and VIOLA we found the issue J.

 

Basically the problem was the customer’s IT/Operations team had placed the Membership/Roleprovider entry in a incorrect system.web section of the web.config file because of which it was picking up the membership provider from the *Machine.config* (the default ASPnetMembership Provider) file.  

Machine.Config default membership provider:

  <system.web>

    <processModel autoConfig="true"/>

    <httpHandlers/>

    <membership>

      <providers>

        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>

      </providers>

    </membership>

    <profile>

      <providers>

        <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

      </providers>

    </profile>

    <roleManager>

      <providers>

        <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

        <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

      </providers>

    </roleManager>

  </system.web>

 

Wrong Section of the web.config :

<location path="_layouts/images">

    <system.web>

    <membership defaultProvider="MerckMembershipProvider">

      <providers>

        <add name="MerckMembershipProvider" type="Merck.Web.Security.MerckMembershipProvider,Merck.Web.Security.AuthenticationProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=daf6fd1bbe0cfc20" />

      </providers>

    </membership>

    <!-- role provider -->

    <roleManager enabled="true" defaultProvider="MerckRoleProvider">

      <providers>

        <add name="MerckRoleProvider" type="Merck.Web.Security.MerckRoleProvider,Merck.Web.Security.MerckRoleProvider,Version=1.0.0.0, Culture=neutral, PublicKeyToken=daf6fd1bbe0cfc20" />

      </providers>

    </roleManager>

      <authorization>

        <allow users="*" />

      </authorization>

    </system.web>

  </location>

 

So after placing the Membership provider and Role provider entry in the correct location it started working. So Please check the web.config file properly and make sure the entries are placed in the appropriate sections.

 

Thank you to Yasin Mukadam and Joe McPeack as they have a key hand in this solution.

 

Posted by ketaanhs | 0 Comments

How to determine (find) who created a site on a MOSS 2007

One of my colleague had asked query regarding how to find out the user who created the site in sharepoint 2007, obviously nothing in the UI to find out that. So we will have to do it programmatically and the way to get it is to use the SPWeb.Authors property. More details here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.author.aspx

In case if someone wants to find out who created the site and not the owner of the site then a small console application can be written that uses the SPWeb.Authors property and running this console applicaiton on one of the sharepoint WFEs in the farm.

Posted by ketaanhs | 0 Comments
Filed under:

Modifying SPThemes.xml Programmatically to deploy new Themes MOSS 2007 (WSS 3.0)

Modifying SPThemes.xml Programmatically to deploy new Themes MOSS 2007 (WSS 3.0)

One of my colleague was looking for modifying the SPThemes.xml file programmatically instead of editing it manually on each and every server. So that the deployment of new themes could be very easy thru the Solution Deployment/Packaging way. All we need is a Feature Receiver for that. In case if you have not already seen the VSEwss 1.3 here check it out, there is a ready made codebehind available that be reused to deploy your custom Themes in sharepoint 2007 (wss 3.0) using the feature / Solution deployment packaging approach. Following is the source code from the Feature receiver from the VSeWSS project (http://www.microsoft.com/downloads/details.aspx?FamilyID=0A87658F-20B8-4DCC-AD7A-09AD22641F3A&displaylang=en)

NOTE: These 10 Theme Features are FARM LEVEL Features and you can find these Features in the Central Admin box under the Operation tab under Farm level Features:

 //--------------------------------------------------------------------------------
// This file is a "Sample" as part of the MICROSOFT SDK SAMPLES FOR SHAREPOINT
// PRODUCTS AND TECHNOLOGIES
//
// (c) 2008 Microsoft Corporation.  All rights reserved. 
//
// This source code is intended only as a supplement to Microsoft
// Development Tools and/or on-line documentation.  See these other
// materials for detailed information regarding Microsoft code samples.
//
// THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//--------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using System.IO;
using System.Linq;
using System.Xml.Linq;

namespace TeamSiteTheme
{
    public class TeamSiteThemeFeatureReceiver : SPFeatureReceiver
    {
        private const string _themeName = "TEAM";
        private const string _themeNiceName = "Team";

        private enum ModificationType
        {
            Add,
            Remove
        }
       
        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            ModifySPTheme(ModificationType.Add);

            using (SPWeb web = (SPWeb)properties.Feature.Parent)
            {
                web.ApplyTheme(_themeName);
            }
        }

        public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
        {
            ModifySPTheme(ModificationType.Remove);

            using (SPWeb web = (SPWeb)properties.Feature.Parent)
            {
                web.ApplyTheme("none");
            }

        }

        public override void FeatureInstalled(SPFeatureReceiverProperties properties)
        {
            ModifySPTheme(ModificationType.Add);
        }

        public override void FeatureUninstalling(SPFeatureReceiverProperties properties)
        {
            ModifySPTheme(ModificationType.Remove);
        }

        private void ModifySPTheme(ModificationType type)
        {
            XDocument doc = null;
            XNamespace ns = "
http://tempuri.org/SPThemes.xsd";

            // path to the SPTHEMES.XML file
            string spthemePath = Path.Combine(SPUtility.GetGenericSetupPath(@"TEMPLATE\LAYOUTS\1033"), "SPTHEMES.XML");
            string contents = string.Empty;

            // read the contents of the SPTHEMES.XML file
            using (StreamReader streamReader = new StreamReader(spthemePath))
            {
                contents = streamReader.ReadToEnd();
                streamReader.Close();
            }

            using (StringReader stringReader = new StringReader(contents.Trim()))
            {
                // create a new XDocument from the contents of the file
                doc = XDocument.Load(stringReader);

                // retrieve all elements with a TemplateID of our theme.  At most, there should only be one
                var element = from b in doc.Element(ns + "SPThemes").Elements(ns + "Templates")
                              where b.Element(ns + "TemplateID").Value == _themeName
                              select b;

                bool exists = (element != null && element.Count() > 0);

                if (type == ModificationType.Add)
                {
                    if (!exists)
                    {
                        // create an XElement that defines our custom theme
                        XElement xml =
                            new XElement(ns + "Templates",
                                new XElement(ns + "TemplateID", _themeName),
                                new XElement(ns + "DisplayName", string.Format("{0} Site Theme", _themeNiceName)),
                                new XElement(ns + "Description", string.Format("A {0}-like Site Theme", _themeNiceName)),
                                new XElement(ns + "Thumbnail", string.Format("1033/IMAGES/{0}/preview.jpg", _themeName)),
                                new XElement(ns + "Preview", string.Format("1033/IMAGES/{0}/preview.jpg", _themeName)));

                        // add the element to the file and save
                        doc.Element(ns + "SPThemes").Add(xml);
                        doc.Save(spthemePath);
                    }
                }
                else
                {
                    if (exists)
                    {
                        // if the element exists, remove it and save
                        element.Remove();
                        doc.Save(spthemePath);
                    }
                }

                stringReader.Close();
            }
        }

    }
}

 

Posted by ketaanhs | 0 Comments
Filed under: ,

Sharepoint 2007 WSS 3.0 Feature list with GUID

Following is the list of sharepoint features (out of the box) that are available, I wish I could have compiled it but this great job is done by Robert Bogue (MVP) on his blog here:  http://www.thorprojects.com/blog/archive/2007/05/16/list-of-features-with-guids.aspx. I am keeping the same entries on my blog for my reference. Great job Robert, Thank you!!!.

GUID  Scope  Feature Name  Installed By
001f4bd7-746d-403b-aa09-a6cc43de7942 Farm PublishingStapling 00000000-0000-0000-0000-000000000000
00bfea71-1c5e-4a24-b310-ba51c3eb7a57 Site BasicWebParts 00000000-0000-0000-0000-000000000000
00bfea71-1e1d-4562-b56a-f05371bb0115 Web XmlFormLibrary 00000000-0000-0000-0000-000000000000
00bfea71-2062-426c-90bf-714c59600103 Web LinksList 00000000-0000-0000-0000-000000000000
00bfea71-2d77-4a75-9fca-76516689e21a Web workflowProcessList 00000000-0000-0000-0000-000000000000
00bfea71-3a1d-41d3-a0ee-651d11570120 Web GridList 00000000-0000-0000-0000-000000000000
00bfea71-4ea5-48d4-a4ad-305cf7030140 Web WorkflowHistoryList 00000000-0000-0000-0000-000000000000
00bfea71-4ea5-48d4-a4ad-7ea5c011abe5 Web TeamCollab 00000000-0000-0000-0000-000000000000
00bfea71-513d-4ca0-96c2-6a47775c0119 Web GanttTasksList 00000000-0000-0000-0000-000000000000
00bfea71-52d4-45b3-b544-b1c71b620109 Web PictureLibrary 00000000-0000-0000-0000-000000000000
00bfea71-5932-4f9c-ad71-1557e5751100 Web IssuesList 00000000-0000-0000-0000-000000000000
00bfea71-6a49-43fa-b535-d15c05500108 Web DiscussionsList 00000000-0000-0000-0000-000000000000
00bfea71-7e6d-4186-9ba8-c047ac750105 Web ContactsList 00000000-0000-0000-0000-000000000000
00bfea71-a83e-497e-9ba0-7a5c597d0107 Web TasksList 00000000-0000-0000-0000-000000000000
00bfea71-c796-4402-9f2f-0eb9a6e71b18 Web WebPageLibrary 00000000-0000-0000-0000-000000000000
00bfea71-d1ce-42de-9c63-a44004ce0104 Web AnnouncementsList 00000000-0000-0000-0000-000000000000
00bfea71-dbd7-4f72-b8cb-da7ac0440130 Web DataConnectionLibrary 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
00bfea71-de22-43b2-a848-c05709900100 Web CustomList 00000000-0000-0000-0000-000000000000
00bfea71-e717-4e80-aa17-d0c71b360101 Web DocumentLibrary 00000000-0000-0000-0000-000000000000
00bfea71-eb8a-40b1-80c7-506be7590102 Web SurveysList 00000000-0000-0000-0000-000000000000
00bfea71-ec85-4903-972d-ebe475780106 Web EventsList 00000000-0000-0000-0000-000000000000
00bfea71-f381-423d-b9d1-da7a54c50110 Web DataSourceLibrary 00000000-0000-0000-0000-000000000000
00bfea71-f600-43f6-a895-40c0de7b0117 Web NoCodeWorkflowLibrary 00000000-0000-0000-0000-000000000000
0125140f-7123-4657-b70a-db9aa1f209e5 Farm FeaturePushdown 00000000-0000-0000-0000-000000000000
02464c6a-9d07-4f30-ba04-e9035cf54392 Site ReviewWorkflows 00000000-0000-0000-0000-000000000000
034947cc-c424-47cd-a8d1-6014f0e36925 Web MySiteQuickLaunch 00000000-0000-0000-0000-000000000000
065c78be-5231-477e-a972-14177cc5b3c7 Web BizAppsListTemplates 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
068f8656-bea6-4d60-a5fa-7f077f8f5c20 Web OsrvLinks 00000000-0000-0000-0000-000000000000
0806d127-06e6-447a-980e-2e90b03101b8 Web PremiumWeb 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
0b4aad40-406f-425c-bdd9-5894c42cffcb Web OsrvTasks 00000000-0000-0000-0000-000000000000
0be49fe9-9bc9-409d-abf9-702753bd878d Web SlideLibrary 00000000-0000-0000-0000-000000000000
0ea1c3b6-6ac0-44aa-9f3f-05e8dbe6d70b WebApplication PremiumWebApplication 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
0f121a23-c6bc-400f-87e4-e6bbddf6916d Farm ContentLightup 00000000-0000-0000-0000-000000000000
0faf7d1b-95b1-4053-b4e2-19fd5c9bbc88 Farm MySiteCleanup 00000000-0000-0000-0000-000000000000
10bdac29-a21a-47d9-9dff-90c7cae1301e Web OssNavigation 00000000-0000-0000-0000-000000000000
11df38ab-5bbb-4304-9da8-221c5c4100b0 Farm SpsSsoLinks 00000000-0000-0000-0000-000000000000
14173c38-5e2d-4887-8134-60f9df889bad WebApplication PageConverters 00000000-0000-0000-0000-000000000000
14aafd3a-fcb9-4bb7-9ad7-d8e36b663bbd Site LocalSiteDirectoryControl 00000000-0000-0000-0000-000000000000
1dbf6063-d809-45ea-9203-d3ba4a64f86d WebApplication SearchAndProcess 00000000-0000-0000-0000-000000000000
1ec2c859-e9cb-4d79-9b2b-ea8df09ede22 Farm DMContentTypeSettings 00000000-0000-0000-0000-000000000000
22a9ef51-737b-4ff2-9346-694633fe4416 Web Publishing 00000000-0000-0000-0000-000000000000
24d7018d-bf48-4813-a28d-dbf3dba173b1 Site PublishingB2TRHop2SiteFilesUpgrade 00000000-0000-0000-0000-000000000000
2510d73f-7109-4ccc-8a1c-314894deeb3a Web ReportListTemplate 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
29d85c25-170c-4df9-a641-12db0b9d4130 Web TransMgmtLib 00000000-0000-0000-0000-000000000000
2ac1da39-c101-475c-8601-122bc36e3d67 WebApplication SPSearchFeature 00000000-0000-0000-0000-000000000000
2ed1c45e-a73b-4779-ae81-1524e4de467a Site WebPartAdderGroups 00000000-0000-0000-0000-000000000000
2fa4db13-4109-4a1d-b47c-c7991d4cc934 Web UpgradeOnlyFile 00000000-0000-0000-0000-000000000000
306936fd-9806-4478-80d1-7e397bfa6474 Web RedirectPageContentTypeBinding 00000000-0000-0000-0000-000000000000
319d8f70-eb3a-4b44-9c79-2087a87799d6 Farm GlobalWebParts 00000000-0000-0000-0000-000000000000
389156cf-498b-41cd-a078-6cb086d2474b Site pwsctypes 538c0384-48ab-483d-90ac-e3a09f755ca5
395702f0-184c-46a2-9bb5-0a64b048738c Farm Analytics 00000000-0000-0000-0000-000000000000
3cb475e7-4e87-45eb-a1f3-db96ad7cf313 Site ExcelServerSite 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
3f59333f-4ce1-406d-8a97-9ecb0ff0337f Web BDR 00000000-0000-0000-0000-000000000000
4248e21f-a816-4c88-8cab-79d82201da7b Site BizAppsSiteTemplates 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
43f41342-1a37-4372-8ca0-b44d881e4434 Site BizAppsCTypes 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
448e1394-5e76-44b4-9e1c-169b7a389a1b Web pwsrisks 538c0384-48ab-483d-90ac-e3a09f755ca5
4750c984-7721-4feb-be61-c660c6190d43 WebApplication OSearchEnhancedFeature 00000000-0000-0000-0000-000000000000
49571cd1-b6a1-43a3-bf75-955acc79c8d8 Site MySiteHost 00000000-0000-0000-0000-000000000000
4d0d9bec-5103-4663-b88d-27cfab1029ff Farm FeaturePushdownTask 00000000-0000-0000-0000-000000000000
4f56f9fa-51a0-420c-b707-63ecbb494db1 WebApplication BaseWebApplication 00000000-0000-0000-0000-000000000000
525dc00c-0745-47c0-8073-221c2ec22f0f Web pwsdoclibs 538c0384-48ab-483d-90ac-e3a09f755ca5
541f5f57-c847-4e16-b59a-b31e90e6f9ea Web NavigationProperties 00000000-0000-0000-0000-000000000000
56dd7fe7-a155-4283-b5e6-6147560601ee Web AnalyticsLinks 00000000-0000-0000-0000-000000000000
5a979115-6b71-45a5-9881-cdc872051a69 Site BizAppsFields 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
5b1e6e3b-83c2-483b-8500-16a025777ed1 Web GradualUpgrade 00000000-0000-0000-0000-000000000000
5f3b0127-2f1d-4cfd-8dd2-85ad1fb00bfc Site PortalLayouts 00000000-0000-0000-0000-000000000000
60d1e34f-0eb3-4e56-9049-85daabfec68c Web pwsissues 538c0384-48ab-483d-90ac-e3a09f755ca5
612d671e-f53d-4701-96da-c3a4ee00fdc5 Farm SpellChecking 00000000-0000-0000-0000-000000000000
65d96c6b-649a-4169-bf1d-b96505c60375 Farm SlideLibraryActivation 00000000-0000-0000-0000-000000000000
6928b0e5-5707-46a1-ae16-d6e52522d52b Site MySiteLayouts 00000000-0000-0000-0000-000000000000
695b6570-a48b-4a8e-8ea5-26ea7fc1d162 Site CTypes 00000000-0000-0000-0000-000000000000
69cc9662-d373-47fc-9449-f18d11ff732c Farm MySite 00000000-0000-0000-0000-000000000000
6adff05c-d581-4c05-a6b9-920f15ec6fd9 Web MySiteNavigation 00000000-0000-0000-0000-000000000000
6c09612b-46af-4b2f-8dfc-59185c962a29 Site SignaturesWorkflow 00000000-0000-0000-0000-000000000000
6d127338-5e7d-4391-8f62-a11e43b1d404 Farm RecordsManagement 00000000-0000-0000-0000-000000000000
6e53dd27-98f2-4ae5-85a0-e9a8ef4aa6df Web LegacyDocumentLibrary 00000000-0000-0000-0000-000000000000
7094bd89-2cfe-490a-8c7e-fbace37b4a34 Site Reporting 00000000-0000-0000-0000-000000000000
713a65a1-2bc7-4e62-9446-1d0b56a8bf7f Farm SPSDisco 00000000-0000-0000-0000-000000000000
750b8e49-5213-4816-9fa2-082900c0201a Web IPFSAdminWeb 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
75a0fea7-0017-4993-85fe-c37971507bbc Web ProjMilestones 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-02cb-4f87-bb11-1ffde748a953 Web HelpDeskModules 3d7fb834-5d7d-48e9-b66f-194fde445c0c
75a0fea7-040e-4abb-b94b-32f1e7572840 Web AVMAbsencesList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-056a-445f-9a78-db1b38bb0b74 Web AVMListInstances d9d569e3-ec65-4e38-a1b0-b3b3ff1aef8e
75a0fea7-07c7-453d-866c-979c401d0105 Web DocumentReviewModules 5e33b0a9-1aaa-4509-8b2d-0e60abefdbca
75a0fea7-08d9-4a8f-b1cd-953d4f15467f Web ResourceTypesList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-0cb9-4862-8e76-9f5e149236f5 Web CallCenterCustomer 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-0e55-4249-b117-4757adfcc704 Web CompProcListInstances 8b9300af-e90f-4b49-9309-ebafb126a7bf
75a0fea7-12fa-4e77-a477-d75778ef90e9 Web ProjModules 25d59dca-500c-41c0-bc5d-1894b9bb1e11
75a0fea7-12fe-4cad-a1b2-525fa776c07e Web KnowledgeBaseKeywordsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-1651-4b91-8cdf-3f24e57526ed Web ProjChangeCRList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-1757-461b-8997-6c3a4afd86c9 Web RecruitingModules 0ebcf2cc-6297-4354-bf55-2962f423a386
75a0fea7-1906-4f0d-8e04-96eaefb60294 Web CompProcModules 8b9300af-e90f-4b49-9309-ebafb126a7bf
75a0fea7-24d7-4907-81ec-2d71dd3dfde9 Web DRProvisioningFeature 5e33b0a9-1aaa-4509-8b2d-0e60abefdbca
75a0fea7-2791-45a2-896f-e538f91032d8 Web ProjProjects 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-2812-45ce-aa8a-b0a8e7c70151 Web ERModules c430946f-ca17-4925-bdc6-868a47f7877f
75a0fea7-2d1e-451a-b445-16bc346d7d8e Web BugList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-30ba-45d8-bf12-3c0855491ad1 Web LendingLibraryTransactionsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-3737-40a1-b908-c325e30d77de Web InventoryTrackingModules f9dbe862-60d5-4de5-92f1-1544f51647d3
75a0fea7-377d-4b4f-b864-984379ed0f42 Web ResourcesList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-37d2-484b-b362-dcff1538e2a4 Web BugTrackingListInstances 0e2f7540-e92f-4eb2-b916-cb2364c3941c
75a0fea7-3a7f-40c2-bf9c-503f36caca93 Web InventoryTrackingListInstances f9dbe862-60d5-4de5-92f1-1544f51647d3
75a0fea7-3b2a-4838-8a0c-57ba864feed3 Web HelpDeskTasks 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-3cc9-4c20-bf74-9bfa9fd5d614 Web DocumentReviewDiscussionList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-42e8-4527-8313-f63c4c49a7e6 Web BugCategoriesList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-4d56-4479-a469-230a0eb68184 Web SalesOpportunitiesList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-518a-485e-841d-ababd2145e27 Web RecruitingCandidatesList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-51e8-4065-a3ef-a2b24f209dca Web ITTeamWorkflows bed8bd64-d0ac-469a-96fc-cb867001368a
75a0fea7-5797-48cd-958d-805cbf270087 Web CompProcCompReg 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-57fb-44e4-ac79-48513cac5416 Web ReservationsListInstances 1df107e5-6d9b-4490-bf91-28cb419748c7
75a0fea7-585d-4862-b7e8-2fdef3ccc537 Web CallCenterModules 08ec3335-c9b0-458b-a848-6d739b6a74e5
75a0fea7-5871-41eb-bac0-5ecedf198c44 Web RecruitingListInstances 0ebcf2cc-6297-4354-bf55-2962f423a386
75a0fea7-5dd8-40af-b960-12af3053f5ec Web LendingLibraryList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-5f52-4bb0-aef8-bd4135d19e5e Web SalesTeamListInstances 964e2241-baa9-49d4-8ae8-aef77d4a07d6
75a0fea7-5f69-4282-83ae-22808c0fbfd9 Web ContactManagementModules 96555d19-e225-44f9-92e7-5efc880bc8c4
75a0fea7-625d-4b31-be9e-24cee53d0d72 Web AssetTrackingAssetsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-6667-4a63-9224-5108aca1c5de Web LendingLibraryListInstances 1a76aee6-bad7-4934-b8d7-5cc4d933db21
75a0fea7-6e3f-4d4a-8f78-245bda567b60 Web RecruitingCandidateFeedbackList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-70e3-40b1-b395-c06f85d0d158 Web HelpDeskSupportFaqList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-7370-403f-a48c-fd5e141ea776 Web ITProvisioningFeature f9dbe862-60d5-4de5-92f1-1544f51647d3
75a0fea7-7478-44e1-8b39-d600e3f4f53f Web EPPersonalEvents 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-76e5-47c4-931a-a90da71c69b7 Web AssetTrackingListInstances 8ed0be87-c777-421e-88cf-024a5a76dbc5
75a0fea7-775b-4ae1-bbc6-ad5ef0d22413 Web DocumentReviewDocsForReviewList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-7851-4350-a082-3b2476621a57 Web AVMModules d9d569e3-ec65-4e38-a1b0-b3b3ff1aef8e
75a0fea7-7afc-4a13-b91a-7dc661f04785 Web RecruitingRequisitionsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-7c51-4a75-92c1-cbaccb371622 Web KnowledgeBaseListInstances 975d6932-0820-41e3-82fe-bb4f8889d935
75a0fea7-7ce3-4ba1-84b7-4bd9da4c9468 Web AssetTrackingProposalsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-7f1b-4b63-a41c-2a2a55fa2709 Web SalesAccountsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-8464-4a6e-9d51-f370bb34ee9c Web CallCenterServiceRequestsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-84d9-447d-b9ec-bc49570874db Web KBProvisioningFeature 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-85b8-4e88-8a0b-3a04a572e20c Web KnowledgeBaseModules 975d6932-0820-41e3-82fe-bb4f8889d935
75a0fea7-86b0-4778-b957-7d6953160dbd Web EPModules c5932b68-e0b1-4879-aa4a-c3099d183297
75a0fea7-8b9f-489a-a971-497418e43698 Web ProjChangeModules 6ec9e585-6d56-4d2b-911e-2e3b99948e35
75a0fea7-8d3c-455d-89d3-4ece8739402d Web AVMAbsenceTypeList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-90ea-4d39-9749-bacfe713d4bb Web AssetTrackingModules 8ed0be87-c777-421e-88cf-024a5a76dbc5
75a0fea7-92c2-4fdf-9b21-8cfbb6d3b240 Web AssetTrackingCategoriesList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-9454-48ab-883d-ede5b98710d6 Web ProjIssues 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-9507-49c7-a473-0ce55c18ef89 Web ERExpenseFormsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-97c5-4487-88e4-70fde8f79b25 Web HelpDeskListInstances 3d7fb834-5d7d-48e9-b66f-194fde445c0c
75a0fea7-9c7f-4881-b7f1-7d0271a1ea16 Web ERListInstances c430946f-ca17-4925-bdc6-868a47f7877f
75a0fea7-9d96-4f02-a800-a3512154efcd Web BugTrackingModules 0e2f7540-e92f-4eb2-b916-cb2364c3941c
75a0fea7-9f82-4120-96a3-6a3f93272a97 Web ReservationsModules 1df107e5-6d9b-4490-bf91-28cb419748c7
75a0fea7-a4ce-4a83-867d-f6be0ffdd867 Web ContactManagementListInstances 96555d19-e225-44f9-92e7-5efc880bc8c4
75a0fea7-a64d-4dfa-a39f-d0076127771e Web InventoryTrackingInventoryList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-ada5-4d30-a123-330bff54d0be Web CompProcTasks 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-ada9-4441-893d-39ec3b945c91 Web InventoryTrackingTransactionsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-b0ef-434e-90d6-ce997d970564 Web PostProvisioningFeature 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-b4c2-46ca-b4b1-819331cf2e4b Web EPPeopleList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-b5a0-47d5-90e6-4b3205b02278 Web AVMResponsibilityAdoptionList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-bbb4-488d-bfc6-79da8ff3ed21 Web SalesTeamModules 964e2241-baa9-49d4-8ae8-aef77d4a07d6
75a0fea7-bfc1-42fe-b08b-ae44bca6a536 Web ProjChangeRisksList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-c1cd-40f9-9f5d-88b7b0c7fc00 Web ProjListInstances 25d59dca-500c-41c0-bc5d-1894b9bb1e11
75a0fea7-c256-49cb-bf7f-de124ca9bf13 Web ProjTasks 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-c285-4c09-839e-0b5e1453e387 Web ITTeamListInstances bed8bd64-d0ac-469a-96fc-cb867001368a
75a0fea7-c54f-46b9-86b1-2e103a8fedba Web TSAimage 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-c671-4696-ac6f-5decfca3173e Web DocumentReviewListInstances 5e33b0a9-1aaa-4509-8b2d-0e60abefdbca
75a0fea7-c966-4e74-b74e-8f77e7bae175 Web EPEventsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-ca3c-4d71-9d2c-5efc8e68a5a8 Web SalesLeadsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-caef-4454-be97-4bf0e784650a Web ProjChangeListInstances 6ec9e585-6d56-4d2b-911e-2e3b99948e35
75a0fea7-cbdd-4360-90cb-12aed8c69f43 Web EPListInstances c5932b68-e0b1-4879-aa4a-c3099d183297
75a0fea7-cd50-401e-af0e-782f3662a299 Site TSATypes 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-d01e-48b3-ba36-8cbbdfeef1d6 Web ProjChangeRequestStatusList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-d27d-4319-af1c-9f2d26486cb8 Web CallCenterListInstances 08ec3335-c9b0-458b-a848-6d739b6a74e5
75a0fea7-d31d-491a-9177-f0e461a81e3f Web KnowledgeBaseKnowledgeBaseList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-d6d3-47bc-95be-1b26b5927180 Web HelpDeskInIssuesList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-e632-4b1f-bfa4-a77c0adcdf41 Web ITTeamModules bed8bd64-d0ac-469a-96fc-cb867001368a
75a0fea7-e63b-4059-8f5a-ce9cbbadad2a Web HelpDeskExpertsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-ebe9-4501-8897-74c984588afa Web EPAnnouncementsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-ee78-4bca-9d7c-9c2fd2593798 Web LendingLibraryModules 1a76aee6-bad7-4934-b8d7-5cc4d933db21
75a0fea7-f13a-4670-8b69-97e90d05f7c8 Web RecruitingInterviewCalendarList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-f780-458c-b53d-441b33a9ac32 Web ITTeamBugList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-fe65-41c3-a965-c5df83fb098b Web ListPropertyFeature 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-fe9d-4119-9615-2c2ef22d6fdb Web HelpDeskServiceRequestsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-ff19-4b2e-953b-bea234eba14a Web ReservationsList 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-ff47-418f-8bfc-9498b0bc1a85 Web CompProcProjects 0273f170-f34b-4f05-9973-494e875dee24
75a0fea7-ffa9-4c2d-8b20-88401290692e Web CompProcIssues 0273f170-f34b-4f05-9973-494e875dee24
7ac8cc56-d28e-41f5-ad04-d95109eb987a Site OSSSearchSearchCenterUrlSiteFeature 00000000-0000-0000-0000-000000000000
7acfcb9d-8e8f-4979-af7e-8aed7e95245e Web OSSSearchSearchCenterUrlFeature 00000000-0000-0000-0000-000000000000
7c637b23-06c4-472d-9a9a-7c175762c5c4 Site ViewFormPagesLockDown 00000000-0000-0000-0000-000000000000
7fe16263-b3fd-454f-a3e8-ed05fdf2adb6 Web MigrationLinks 00000000-0000-0000-0000-000000000000
8156ee99-ddfb-47bb-8835-7ae42d40d9b9 Site ReportCenterCreation 00000000-0000-0000-0000-000000000000
81ebc0d6-8fb2-4e3f-b2f8-062640037398 Farm EnhancedHtmlEditing 00000000-0000-0000-0000-000000000000
82e2ea42-39e2-4b27-8631-ed54c1cfc491 Farm TransMgmtFunc 00000000-0000-0000-0000-000000000000
8581a8a7-cf16-4770-ac54-260265ddb0b2 Site PremiumSite 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
863da2ac-3873-4930-8498-752886210911 Site MySiteBlog 00000000-0000-0000-0000-000000000000
89e0306d-453b-4ec5-8d68-42067cdbf98e Site Navigation 00000000-0000-0000-0000-000000000000
8a663fe0-9d9c-45c7-8297-66365ad50427 Farm MasterSiteDirectoryControl 00000000-0000-0000-0000-000000000000
8c6a6980-c3d9-440e-944c-77f93bc65a7e Web WikiWelcome 00000000-0000-0000-0000-000000000000
8f15b342-80b1-4508-8641-0751e2b55ca6 Web LocalSiteDirectoryMetaData 00000000-0000-0000-0000-000000000000
90014905-433f-4a06-8a61-fd153a27a2b5 Web pws 538c0384-48ab-483d-90ac-e3a09f755ca5
937f97e9-d7b4-473d-af17-b03951b2c66b Farm SkuUpgradeLinks 00000000-0000-0000-0000-000000000000
94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb Web PublishingWeb 00000000-0000-0000-0000-000000000000
97a2485f-ef4b-401f-9167-fa4fe177c6f6 Farm BaseSiteStapling 00000000-0000-0000-0000-000000000000
99ee0928-7342-4739-865d-35b61ea4eaf0 Farm BDCAdminUILinks 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
99fe402e-89a0-45aa-9163-85342e865dc8 Web BaseWeb 00000000-0000-0000-0000-000000000000
9e56487c-795a-4077-9425-54a1ecb84282 Web Hold 00000000-0000-0000-0000-000000000000
a0e5a010-1329-49d4-9e09-f280cdbed37d Web IPFSWebFeatures 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
a10b6aa4-135d-4598-88d1-8d4ff5691d13 Farm ipfsAdminLinks 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
a311bf68-c990-4da3-89b3-88989a3d7721 Web SitesList 00000000-0000-0000-0000-000000000000
a392da98-270b-4e85-9769-04c0fde267aa Site PublishingPrerequisites 00000000-0000-0000-0000-000000000000
a573867a-37ca-49dc-86b0-7d033a7ed2c8 Farm PremiumSiteStapling 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
aebc918d-b20f-4a11-a1db-9ed84d79c87e Site PublishingResources 00000000-0000-0000-0000-000000000000
aeef8777-70c0-429f-8a13-f12db47a6d47 Farm BulkWorkflow 00000000-0000-0000-0000-000000000000
af847aa9-beb6-41d4-8306-78e41af9ce25 Farm ProfileSynch 00000000-0000-0000-0000-000000000000
b21b090c-c796-4b0f-ac0f-7ef1659c20ae Site BaseSite 00000000-0000-0000-0000-000000000000
bc29e863-ae07-4674-bd83-2c6d0aa5623f WebApplication OSearchBasicFeature 00000000-0000-0000-0000-000000000000
c43a587e-195b-4d29-aba8-ebb22b48eb1a Farm SRPProfileAdmin 00000000-0000-0000-0000-000000000000
c5d947d6-b0a2-4e07-9929-8e54f5a9fff9 Web ReportCenterSampleData 00000000-0000-0000-0000-000000000000
c6561405-ea03-40a9-a57f-f25472942a22 Site TranslationWorkflow 00000000-0000-0000-0000-000000000000
c85e5759-f323-4efb-b548-443d2216efb5 Site ExpirationWorkflow 00000000-0000-0000-0000-000000000000
c88c4ff1-dbf5-4649-ad9f-c6c426ebcbf5 Site IPFSSiteFeatures 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
c922c106-7d0a-4377-a668-7f13d52cb80f Farm OSearchCentralAdminLinks 00000000-0000-0000-0000-000000000000
c9c9515d-e4e2-4001-9050-74f980f93160 Site OffWFCommon 00000000-0000-0000-0000-000000000000
ca2543e6-29a1-40c1-bba9-bd8510a4c17b Web DeploymentLinks 00000000-0000-0000-0000-000000000000
ca7bd552-10b1-4563-85b9-5ed1d39c962a Site Fields 00000000-0000-0000-0000-000000000000
cdfa39c6-6413-4508-bccf-bf30368472b3 Farm DataConnectionLibraryStapling 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
d250636f-0a26-4019-8425-a5232d592c09 Web AddDashboard 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
d3f51be2-38a8-4e44-ba84-940d35be1566 Site PublishingLayouts 00000000-0000-0000-0000-000000000000
d8d8df90-7b1f-49c1-b170-6f46a94f8c3c Web pwscommitments 538c0384-48ab-483d-90ac-e3a09f755ca5
d992aeca-3802-483a-ab40-6c9376300b61 WebApplication BulkWorkflowTimerJob 00000000-0000-0000-0000-000000000000
e15ed6d2-4af1-4361-89d3-2acf8cd485de WebApplication ExcelServerWebApplication 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
e4e6a041-bc5b-45cb-beab-885a27079f74 Farm ExcelServer 7ed6cd55-b479-4eb7-a529-e99a24c10bd3
e8734bb6-be8e-48a1-b036-5a40ff0b8a81 Web RelatedLinksScopeSettingsLink 00000000-0000-0000-0000-000000000000
e978b1a6-8de7-49d0-8600-09a250354e14 Site LocalSiteDirectorySettingsLink 00000000-0000-0000-0000-000000000000
eaf6a128-0482-4f71-9a2f-b1c650680e77 Site SearchWebParts 00000000-0000-0000-0000-000000000000
edf48246-e4ee-4638-9eed-ef3d0aee7597 Farm OSearchPortalAdminLinks 00000000-0000-0000-0000-000000000000
ee21b29b-b0d0-42c6-baff-c97fd91786e6 Farm StapledWorkflows 00000000-0000-0000-0000-000000000000
f0deabbb-b0f6-46ba-8e16-ff3b44461aeb Farm UserMigrator 00000000-0000-0000-0000-000000000000
f324259d-393d-4305-aa48-36e8d9a7a0d6 Farm SharedServices 00000000-0000-0000-0000-000000000000
f386a1b6-b0f4-46d2-a122-b3a1e56eeb16 Site pwsfields 538c0384-48ab-483d-90ac-e3a09f755ca5
f41cc668-37e5-4743-b4a8-74d1db3fd8a4 Web MobilityRedirect 00000000-0000-0000-0000-000000000000
f6924d36-2fa8-4f0b-b16d-06b7250180fa Site PublishingSite 00000000-0000-0000-0000-000000000000
fc33ba3b-7919-4d7e-b791-c6aeccf8f851 Farm ListTargeting 00000000-0000-0000-0000-000000000000
fcd4c704-ed7a-42fb-ab30-2bb0ab6494c8 Farm OSearchSRPAdminLinks 00000000-0000-0000-0000-000000000000
fd3dd145-e35e-4871-9a6d-bf17f28a1c19 Site PublishingB2TRSiteFilesUpgrade 00000000-0000-0000-0000-000000000000
fde5d850-671e-4143-950a-87b473922dc7 Site IssueTrackingWorkflow 00000000-0000-0000-0000-000000000000
fead7313-4b9e-4632-80a2-98a2a2d83297 Farm SiteSettings 00000000-0000-0000-0000-000000000000
fead7313-4b9e-4632-80a2-ff00a2d83297 Farm ContentTypeSettings 00000000-0000-0000-0000-000000000000
fead7313-ae6d-45dd-8260-13b563cb4c71 Web AdminLinks 00000000-0000-0000-0000-000000000000

Posted by ketaanhs | 0 Comments
Filed under:

Audiences in Inter Farm SSP (Sharepoint 2007 / MOSS)

We were doing some brain storming on Sharing the SSP (Shared Service Provider) between multiple farms i.e. the Parent Farm will be the provider/source of the SSP and the Child farm will consume the SSP. (Needless to say this is MOSS or sharepoint 2007).

It is very easy to set up the sharing of the SSP between farms basically going to the Central Administration àApplication ManagementàUnder office Shared Service provider (Grant or configure shared services between farms ) and here you can configure whether the current farm on which CA is hosted for that farm will be a consumer or provider of the SSP.

 

Ok so now we wanted to keep the Audiences in one place i.e. in the Parent farm and share these Audiences between the Parent and the Child farm. The question came in what would happen if the Parent farm is down for maintenance i.e. Service Pack upgrades, etc. What would happen to Audience targeting that is done on some of the content pages on the Child farm sites? Will it work or will it not? Will the Audiences resolve or not. So we did a quick small POC and following were our findings on that:

 

Case 1: All WFE’s and CA box from the Parent farm is down but not the SQL box from the parent farm: Audience still works (as Parent SQL box is still up and running).

Case 2:  The entire farm is down (all WFEs, CA box) along with the Parent farm SQL Box: The audiences don’t work as expected.

 

 

So bottom line is the Child farm talks directly to the SQL box of the parent farm (i.e. the SSP db of the parent farm) and it is independent of any services on the WFE/CA box of the Parent farm.

Thank you to Ben Risher our in-house MOSS Infra Guru for guiding and helping me thru this. We worked together on this and got this to a conclusion.

Programmatically provision hostheader site collection (MOSS/Sharepoint 2007)

I was looking for a sample on creating a Host header based site collection (programmatically) i.e. using WSS/Sharepoint 2007 API and came across the msdn article, but there is no sample: http://msdn.microsoft.com/en-us/library/ms479602.aspx

 

We can easily do it thru STSADM:

stsadm -o createsite -url http://THE-HOST-HEADER-FOR-THE-SITE-COLLECTION -ownerlogin DOMAIN\username -owneremail username@domain.com -hhurl http://THE-URL-OF-THE-WEBAPPLICATION-THE-SITE-COLLECTION-IS-GOING-INTO

 But then I got the sample, thanks again to TROY STARR he is a great help, thought of sharing this with a larger community in case if someone wants to do it:

 

SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://the-url-of-the-webapplication-the-site-collection-is-going-into"));

 

webApp.Sites.Add(

                "http://the-host-header-for-the-site-collection", // site URL

                "The Site Title", // site title

                "The Site Description", // site description

                1033, // site LCID that represents the language, e.g. 1033 = en-US

                "STS#0", // site template, e.g. STS#0 = Team Site

                @"DOMAIN\username", // site owner login

                "Firstname Lastname", // site owner name

                "username@domain.com", // site owner e-mail address

                NULL, // secondary owner login

                NULL, // secondary owner name

                NULL, // secondary owner e-mail address

                true); // is this a host-named site collection

Posted by ketaanhs | 4 Comments

Host header (actually Host Named) site collection in MOSS (some details)

If you search on the web on how to create a host header (HH) site-collection you will get a lot of results as lot of community folks have blogged about it. Thanks to all of them for the great work. So following is the command used to create a HH site-collection is:

stsadm -o createsite -url http://THE-HOST-HEADER-FOR-THE-SITE-COLLECTION -ownerlogin DOMAIN\username -owneremail username@domain.com -hhurl http://THE-URL-OF-THE-WEBAPPLICATION-THE-SITE-COLLECTION-IS-GOING-INTO (take from: http://callahansspace.spaces.live.com/Blog/cns!A125D1CFA42E21F7!860.entry)

And in case if you want to create it in a new content database then following is something you can use, inspired and referred from http://sharepointhawaii.com/wenhe/Lists/Posts/Post.aspx?List=dbcd4f5c%2D63e1%2D416c%2Db34a%2Ddd391d48beab&ID=9:

stsadm -o CreateSiteInNewDB -URL http://The URL for HH site collection    -owneremail myemail@myserver.com 
-ownerlogin domain\username -HHURL http://The webapp in which sitecollection needs to be provisioned  -databaseserver DBServerName 
-databasename NameOfTheNewDBForSiteCollection
 
I had some simple queries on some basics of the hostheader (host named) site collection and Troy Starr (from MOSS Product team) was a *BIG* help (as always) in answering my queries:
Queries:
 

Q: how does Sharepoint handle the HH site urls (as there is no entry anywhere on the IIS)  how does sharepoint know about the url to the HH site (when the url itself is different). basically I have a web-app with url: http://usctapMOSS  now i create a HH site-collection with a url: http://msfturltest.abc.com  and then I create a required DNS entry for that url  now how does sharepoint know to redirect the "http://msfturltest.abc.com" to the correct site-collection in the http://usctapMOSS web-app.

 

A: When the IIS web site receives the request for _http://msfturltest.abc.com, it will pass it off to SharePoint.  SharePoint will then look at the properties of the request, including its protocol scheme, host name, and port number, to determine the request URL.  It will then look up that request URL in its internal table of AAM URLs and host-named site collection URLs to find a match.  Once it has a match, it opens the site collection associated with that URL and goes from there. The internal table referred here is logical and by looking at the Path column in the configuration database's SiteMap table we can see the host headers assigned to individual site collections. Also note that this lookup information for the site will be cached on the WFE after the first browse.

 

 

Q: Can we restore a backup taken from a non-HH site-collection to a HH-kind of site-collection. (Both the source and target site-collection are in the same web-app and have their own Content database each).

 

A: In general, yes, you can back up a non-HH site collection and restore it as an HH site collection.  Also, in case if this restore of a host-named site collection causes a content database corruption, we can try to fix that corruption by immediately running the stsadm -o renamesite operation after the restore and renaming the HH site URL to itself.

 

Thought of sharing this information in case if someone else had similar doubts.

Posted by ketaanhs | 1 Comments

Sharepoint Content Deployment results in "Value cannot be null"

We were working on a publishing site and had couple of custom field types and controls also as part of our custom development. We were doing Content Deployment to publish our Sharepoint 2007 (MOSS) authoring site to the Publishing site. While doing so typically we were getting following errors:

 

1.       VALUE CANNOT BE NULL

 

OR

 

2.       Object reference not set to an instance of an object

 

 

After carefully looking at the custom developed features we found that some of the custom code was using SPCONTEXT and that code was getting executed during Content Deployment (How did we find this: We attached the owstimer.exe service on the server and ran our custom code in the debug mode).

The problem was with the code of the custom field type was relying on the usage of SPContext object and this object can only be used inside a http request to a sharepoint site. Hence it will always fail during the content deployment (as OWSTIMER.EXE will always have SPContext null) and where no SPContext object exists. We resolved this issue by checking for value of SPContext i.e. we introduced SPContext != null before executing the code and we got over that issue.

 

Make sure to restart the OWSTIMER service after you re-deploy the changed code. Always remember that HTTPContext will not exists while doing the Content deployment and if you have any custom code that directly relies on SPContext will tend to fail and hence the content deployment also.

Hope this helps someone.

Posted by ketaanhs | 1 Comments

How to force a wordbreaker to be used in Sharepoint Search

I had a requirement to crawl Japanese content and we had an English Install of Sharepoint 2007 (MOSS). Now for some reason the locale was not being identified by the crawler for the HTML (i.e. all the Publishing pages) as 1041 (i.e. the Japanese locale), and the default English (US) word breaker was used. I wanted to force the Japanese wordbreaker and finally found that I need to make a registry change (*** PLEASE NOTE REGISTRY CHANGE IS NOT A GOOD IDEA, BEFORE DOING ANY REGISTRY CHANGE PLEASE TAKE A BACKUP OF YOUR REGISTRY***).

To force the crawler to use the JAPANESE WORD BREAKER, I changed the following registry key to use the Japanese WBreakerClass (This change is required on your Index Server):

 

*********************************************************************************************************************************************************************

                                                                                                                       

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\LanguageResources\Default\English (United States)]                                            

"WBreakerClass"="{E1E8F15E-8BEC-45df-83BF-50FF84D0CAB5}"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

*********************************************************************************************************************************************************************

 

Now the crawler uses Japanese WBreakerClass instead of English WBreakerClass and all my content is crawled properly as well as the Search results are working great with proper hithighlighting  (which was not working earlier).

Please note that by only forcing Japanese wordbreaker even for English content has a side effect such as breaking definition extraction.

 

Posted by ketaanhs | 1 Comments
More Posts Next page »
 
Page view tracker