About

MS MVP Logo

View Marc Lognoul [MVP]'s profile on LinkedIn

Disclaimer

The information and materials in this site are provided "AS IS" with no warranties, and confering no rights. This site does not represent the thoughts, intentions, plans or strategies of our employers, customers, friends or family, solely our own personal opinions.

SharePoint, SharePoint Designer, IIS Compression and Eugene Tooms

by Marc 24. April 2009 13:53

You all (should) know that since 1st April, SharePoint Designer is free. Since that, there also was a lot of buzz around it as well as interesting blog posts like the one from Mark Rackley SharePoint Designer – A definite Maybe, echoed by SharePoint Mogul Joel Oleson. While both were very interesting readings, one statement from Mark caught my attention: Using SharePoint Design would break IIS Compression. I don’t totally agree with this statement but the truth is (not only out there but) more complex than it seems.

Before diving directly into the bits and bytes, some background information over how HTTP compression works.

The effective HTTP compression by a web server is the combination of two thing: the client that sends a request specifying that it support compression and the server, receiving that requests, which is configured to support and therefore return as compressed response. That compressed response is conditioned by the type of compression supported by the client and the server (there are currently two: Deflate or Gzip) and the server’s configuration: compress all file extension, or only some of them. There are also, on IIS, two kind of file extensions: the static (simple files placed on the file system like a css, and image, an html page) or dynamic (dynamically generated content like ASP, ASP.Net pages, ASMX…). Additionally, IIS also includes more granular settings like the minimum file size for a file to be compressed (there is no gain in compressing very small files).

The important point here is: if the client does not explicitly says it supports compression, the server will never generated a compressed response, even if it was configured to do so!

While all modern browser do include the magic header informing the server they support compression, other client types (I mean other usual SharePoint client types), do not.

As a comparison, here is a request from a browser:

And here is one from the WebDav Mini Redirector (aka Explorer view in SharePoint aka Web Folders aka Web Client):

The conclusion is: most of time, only standard browsers do support compression. Clients like Windows WebDAV client, Office Application (using FPRPC, an MS proprietary extension of WebDAV), Colligo Reader and even the SharePoint Indexing process (aka Crawler) never include the necessary header in their requests.

The extra complexity brought by SharePoint: is the resource on the file system or in the content database?

With SharePoint, some resources requested by clients may be physically stored in two different locations: the file system (usually under the 12 Hive) and the content database(s). When they reside in the content databases, SharePoint uses its internal API to fetch them and present them to the client. In this case, the questions are 1) are those files compressible or not 2) how are they considered: as static or dynamic files (even if their extension is the one from a static file, like html for example).

Subsequently, a very good remark from MVP Eric Schupps on Mark Rackley’s blog was: when you customize a page using SharePoint Designer, it is no longer stored store in the file system but in the CDB instead and this makes it impossible to compress.

I am a bit surprised by this statement because for me, compression is an IIS function, not a SharePoint function. Therefore, as long as IIS received something to compress, it does not care and does the job. The truth (which is still out there) is different: none of use was right, the reality is more complex than that!

Getting the resources stored in content database compressed

For extensions considered as “dynamic”, it is pretty simple: configure them as usual in IIS and it will work

For extension considered as “static”, there is more fun. Let take the example of a pdf file stored in a CDB.

Out of the box, it will not get compressed. If you configure it as a “static” file, it won’t compress either.

How to get it compressed then? First you need to configure it as a “dynamic” extension (yeah, sound strange I know), in both compression providers (Deflate and GZip).

Then,you need to enabled Blob Caching for you web application where the content is stored. To do this, edit the matching Web.config as it is below

Finally, perform an IISRESET and attempt to doanload the PDF file. The PDF will get blob-cached then compressed

Configuration Summary Table for IIS Compression to Function

Content Type Content Location Configure IIS to Compress Static Ext. Configure IIS to Compress Dynamic Ext. Configure ASP.Net Blob Cache
Static (html, css, doc, pdf…) File System Yes No No
Dynamic (aspx…) File system No Yes No
Static (html, css, doc, pdf…) Content Database No Yes Yes
Dynamic (aspx…) Content Database No Yes No

Note: there is not use in activation compression for native MS Office 2007 format (docx, xlsx, pptx etc…) since they are already natively compressed, See Introducing the Office (2007) Open XML File Formats.

Conclusions

Content edited with SharePoint Designer can be compressed as long as the appropriate configuration is in place, regardless of their location.

Note: All the tests above were made on a standard WSS3 running on IIS6, it may behave differently on IIS7.

But who (the F or H, depending on your level of politeness) is Eugene Tooms then?

Eugene Victor Tooms is a fictional character appearing in two episodes of the TV series “The X-Files”. Tooms is able to squeeze and elongate his body in ways that are impossible for a normal human. This makes him similar to IIS in some ways :)

And Cut!

Tags:

IIS | SharePoint

STSADM MergeContentDB command may cause database corruption

by Marc 9. April 2009 21:19

Since 03/23/2009, the issue with STSADM –o mergecontentdb is officially documented on the MD KB: http://support.microsoft.com/kb/969242/.

This problem is particularly annoying because nowadays, with WSS/MOSS getting a huge adoption, it happens very frequently to have to move site collections across content database. More worrying, the corruption may occur in both source AND destination content databases. The only solution being the restore of the whole content database(s)!

MS still proposes two alternatives (well, I call them workarounds!)

  • Use the Central Admin extension delivered as part of the Microsoft SharePoint Administration Toolkit v3.0 x86 : The Batch Site Manager.
  • Use the old way consisting in performing a backup restore taking care of fooling SharePoint in order to place the restore in the content database of your choice, which means, in short:
  1. Setting a lock on the site collection to be move (readonly or noaccess)
  2. Backing up the site collection
  3. If successful, deleting the site collection
  4. Taking note of the site limit applied to all the content databases in the given web application
  5. Lowering the limit on every content database except the destination one in order for the limit to be equal to the current number of site collection. for the destination CDB, add 1 or more to the limit
  6. Restoring the site collection, it will automatically be restored to the CDB with the lowest number of site collections compared to the limit set
  7. Removing the lock

More info over the issue:

And cut!

Tags:

SharePoint

Windows cannot obtain the domain controller name for your computer network: Thanks AMD Opteron!

by Marc 9. April 2009 20:56

This week’s challenge: find out how Windows DC locator process is related to AMD Opteron CPU’s…

Thanks to one of my favorite customer, we experienced that silly behavior on a set of new domain controllers running Server 2003 SP2 on servers equipped with ADM Opteron multi-core CPU’s.

When a Windows system is affected by this problem, the most common symptoms are:

  • Errors logged in the Event Log: Unexpected Network Error (Event ID 1054). Event Description: Windows cannot obtain the domain controller name for your computer network. (An unexpected network error occurred.) Group Policy processing aborted.
  • Ping command may report abnormal latency results
  • Other applications making use of the QueryPerformanceCounter will also report strange results

At boot time, Windows select a timer mechanism used to synchronize operations between processors and/or cores: it can be PM (power management) or TSC (time-stamp counter) timer. What determines the choice is the fact that the BIOS supports APIC/ACPI or not. In the case of the Opteron, in combination with an BIOS that is not up-to-date or improperly configured, Windows incorrectly selects TSC instead of PM.

As consequence of this, the different cores are getting desynchronized over time causing the symptoms described above. This can start happening a few minutes to a few hours after booting. Restarting the system temporarily solves the problem until the drift starts again with time.

Since many system and security mechanisms make use of time-stamps, they start failing with the time skew getting larger.

To override this dynamic behavior and force the usage of PM timer, the boot.ini must be edited in order to contain the /usepmtimer switch.

Wanna know more about the issue? Go there:

Greets to Thierry G and Arnaud M and thanks for the troubleshooting session!

And cut!

Tags:

Troubleshooting | Windows | Hardware | Processor

Two IE8 behavioral changes worth mentioning…

by Marc 3. April 2009 13:15

Session-cookie handling

Have you noticed? When you log on a site that uses session cookie to store authentication information (like eBay), this cookie is by default shared between all instances (processes) of Internet Explorer.

Also, each tab is opened as a separated process which are all child of the same parent process. This parent process is handling this resource-sharing job.

From a Process Explorer point of view, it looks like this:

This new “feature”, called “Loosely-Coupled IE (LCIE)”, is described in details on the official MS IE Blog.

In order to workaround this behavior and be able to authenticate against the same web site but using different credentials, you need to start a new IE parent process which is running separately from the other one and therefore not sharing the same session-cookie. How to do? simply execute IE using the –nomerge parameter: C:\Program Files\Internet Explorer\iexplore.exe –normerge. for convenience, you can create a new IE shortcut which includes this parameter.

After starting this second parent IE, it will look like this in Process Explorer:

HTML5-compliance regarding the file path parameter

While trying to help a newsgroup poster making his IE-related script work with IE8, French MVP Gilles Laurent (Master es scripting and automation), bought to my attention that, in order to comply with HTML5 rules, IE8 was handling file path parameter from a file sector differently.

So in order to prevent information disclosure (the path to a file may include the user name if the file reside under the user 'profile), there are actually two changes combined to achieve that:

  • The IE security setting “include local directory path when uploading files to a server” (already present in IE7) is set to “Disable” instead of “Enabled” as it was with IE7 for the “Internet Zone”

  • When this setting is set to “Disable”, the path returned will always start with C:\fakepath\FILENAME.EXT instead of starting with the real path

Once again, the official MS IE Blog describes this behavior.

And cut!

Tags:

Troubleshooting | Internet Explorer

SharePoint Designer 2007 now FREE!

by Marc 3. April 2009 11:25

Recently, the Microsoft SharePoint Team Blog announced the availability of SharePoint Designer 2007 for free.

While this, in general, sounds like good news to my ear, I, like another commenter, cannot prevent myself from expecting some issues while end-users will be playing around and finally break SharePoint installations…;)

An cut!

Tags:

SharePoint