Author Archive

Getting Telerik RADEditor for MOSS installed – Part 1

Friday, July 18th, 2008

Getting Telerik RADEditor for MOSS installed – Part 1

Getting Telerik's RADEditor installed in our SharePoint was somewhat challenging. I found the installation instructions from Telerik, while attractive, a bit hard to follow. Anyway, here's what I did…

Install from EXE

I purchased and installed RadControls for ASPNET AJAX Q1 2008 from the exe file. Apparently there are other options as well.

On our development server there was not problem with this step. On our production server I got an error that read:

H2Reg.exe
** Error **
MS Help 2.x runtime files are not installed on this PC.
Installation/registration of help files cannot proceed.

I couldn't find any help on Telerik's support site. When I clicked through the error, the installer said "Successfully Installed." Who wants to argue with that?

Manually install DLLs

I assumed (more on that later) that AJAX for .NET was installed, so next is Deploying the RadTools where we're told to install Telerik.Web.UI.dll and Telerik.Charting.dll in the GAC.

All well and good, but a careful look at the Telerik folder reveals two sets of these dlls, one in /bin and one in /bin35. Which ones to install, then?

An email to Telerik Support eventually generated an answer which included two links to their installation instructions (gee, thanks.) and this intriguing tidbit: "use /Bin DLLs for VS 2005/.NET 2.0 and /Bin35 DLLs for VS 2008/.NET 3.5."

OK. Cool. We're using VS 2005 on the development machine. Has anyone install .NET 3.5, yet? Being new to .NET I wasn't sure how to tell but I only saw Control Panels for .NET 1.1 and .NET 2.0 so I'm in business. Or am I?

Apparently there are three different ways to deploy the dlls to the GAC

  1. Use the .NET Framework 2.0 Configuration Control Panel per http://www.telerik.com/help/aspnet-ajax/installaddtoglobalassemblycache.html
  2. Drag and drop the .dlls into C:WindowsAssembly per http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html
  3. Run gacutil from a VS cmd also per http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html

I chose option 1.

Tell SharePoint to relax

Per http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html, you have to open web.config (for every website !?) via IIS Manager and add <SafeControl> tags for the dlls. No problem.

Test

I found the instructions for testing the RadControls straightforward, but I did run into a couple errors.

My first load of the page after adding the RadControls was rewarded with…

An error occurred during the processing of /_catalogs/masterpage/LICORdefault.master. Could not load file or assembly 'Telerik.Web.UI, Version=2008.1.512.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The system cannot find the file specified.

Well, the Telerik docs do say to pay attention to the version you are installing so after flailing a bit I found that viewing the folder at C:WindowsAssembly told me that the dlls weren't version 2008.1.512.20 but were version 2008.1.515.20. So I had to go back and reedit the web.config and the master.page.

Then I got…

An error occurred during the processing of /_catalogs/masterpage/LICORdefault.master. Unknown server tag 'asp:ScriptManager'.

Remember I said I assumed ASP.AJAX was installed. Uh, wrong. How does one really tell if the ASP.AJAX extensions are really installed? Long story short, I found that it was but it wasn't configured for this SharePoint site. So this entailed massive edits to the web.config file as per http://asp.net/AJAX/Documentation/Live/ConfiguringASPNETAJAX.aspx (Again I ask, so one really has to do all this to every web.config for EVERY site!? There has to be a better way.)

So then I got…

The control type 'System.Web.UI.ScriptManager' is not allowed on this page. The type is not registered as safe.

Oops. I didn't tell SharePoint to relax. Back to web.config and add <SafeControl Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*" Safe="True" /> (Per the SharePoint Team Blog.)

­Voil !

Install RADEditor

No problem. The install instructions for the RADEditor solution worked like a charm.

Access Denied – Publishing Infrastructure Feature

Thursday, July 17th, 2008

Back after 8 months hiatus.

In the interum, we wiped everything and started from stratch. SharePoint Experts did a great job holding our hand through *every* step of setting up a basic SharePoint infrastructure. (Thanks, Matt!)

So first day getting back to making something. And got an error! wow.

When I tried to activate the Office SharePoint Server Publishing
Infrastructure on the site collection, SharePoint simply responded, "Access Denied"

Digging in the log files says:

"07/17/2008 12:00:37.13     w3wp.exe (0×07BC)                           0×1850    Windows SharePoint Services       General                           72by    High        Feature Activation: Threw an exception, attempting to roll back.  Feature 'PublishingResources' (ID: 'aebc918d-b20f-4a11-a1db-9ed84d79c87e').  Exception: Microsoft.SharePoint.SPException: Provisioning did not succeed. Details: Failed to provision the scheduling job definitions.  Page scheduling will not succeed. OriginalException: Access denied. —> System.Security.SecurityException: Access denied.     at Microsoft.SharePoint.Administration.SPPersistedObject.Update()     at Microsoft.SharePoint.Administration.SPJobDefinition.Update()     at Microsoft.SharePoint.Administration.SPWorkItemJobDefinition.Update()     at Microsoft.SharePoint.Publishing.Internal.RootProvisioner.<>c__DisplayClass5.<AddSchedulingJobDefinitions>b__4()     at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(…     

Fortunately I quickly found a fix thanks to SharePoint MVP Vincent Rothwell at http://blog.thekid.me.uk/archive/2007/02/05/activating-office-sharepoint-server-publishing-infrastructure-access-denied.aspx

…I recently had to activate the publishing infrastucture on a WSS v3 Teamsite. This had always worked before, but now I was getting `Access Denied' when activating the `Server Publishing Infrastructure'.

This was due to my change in devlopment procedure. I always used to create development farms using Administrator for everything, but scince I found problems with feature activation I am developing using the Microsoft Guidelines for MOSS accounts. This means the AppPool account has limited permissions.

To solve the `Access Denied' problem you need to elevate the permissions of the AppPool of the web application on which you are trying to activate the Publishing Infrastructure feature.

One way to achieve this is to temporarily change the AppPool of the web application.

1. Open IIS Admin.
2. Location the Web Site for your WSS web application.
3. Goto to the properties and select the `Home Directory' tab.
4. Change the AppPool to be the same as Central Administration.
5. IISRESET
6. Activate the Publishing Infrastructure feature on your site.
7. Change to AppPool back to the original.
8. IISRESET.

This should allow you to enable the feature and use the publishing features within MOSS.

 

theme already exists on the server.

Wednesday, November 21st, 2007

 Well, one more day and one more error.

 A theme with the name "THEMENAME 1011" and version  already exists on the server.

Awesome.  

I'm making sure that I rename the folder, inf file, spthemes.xml and I see the changes I make reflected after an iisreset. I've also made sure that the "codebase=" line in the inf file is unique. Still no joy.

I'm not sure it helps that we, in our incredible wisdom, set up SP in a distributed fashion, with one app server and two WFEs. Now I'm never sure what is updated and what isn't. I usually run iisreset on both WFEs just to feel a little better. 

Guess I won't use themes, then.
 

Still learning… (aka. SPD or not to SPD)

Monday, November 19th, 2007

Sometimes one is so dense you just have to draw 'em a picture. So I did. I drew myself a picture to clarify my understanding of SharePoint's basic architecture and best practice re: site deployment.

First, in Figure 1 is displayed my understanding of the file system and the web application space. In the file system are a whole host of files which SharePoint may or may not access at runtime. Notable for my interest are the areas containing custom site definitions, features and themes.

In the web space, we have, based on a third-party recommendation, deployed web applications and site collections in a one-to-one correspondence, with each site collection containing any number of subsites.

Second, best practice for development of sites and site features dictates the usage of a solution package (Figure 2) which will contain things like custom site definitions, features and themes. When deploying these solutions (Figure 3), it is best to allow the solution package to update the file system with our custom sites and features and, where possible, use the features themselves to update other aspects, like a set of custom themes, aka. "feature stapling."

As time passes, upgrades are facilitated by this methodology because adding additional features or updates will simply involve deploying an updated solution package.

Thirdly, the most powerful method of customizing sites is through the management of a custom master page as shown in Figure 4. In my scenario, I'll have multiple site collections all deployed based on a custom site definition. These site collections will reference my custom master page. This master page becomes the key tool to control the branding of the site UIs and tell these sites where to access custom styling resources, like custom style sheets.

So far so good until I am forced to ask a really stupid question: How do I develop my custom master? SharePoint introduces an aspect I've never had to manage in the J2EE space (netbeans/dreamweaver/tomcat/etc.). This is the customized vs. uncustomized issue. Ug!

All the tutorials (when I can get them to work) and documentation assume SharePoint Designer. My understanding is that as soon as I try to develop my own master page with SharePoint Designer a copy gets "customized" into the content database and all references for my site collection get decoupled from the master page in the file system and pointed to the other renegade master page as in Figure 5.

How does one develop without causing a proliferation of renegade "customized" files?

A Day in the Life…

Wednesday, October 24th, 2007

Just another day trying to learn SharePoint…

 

4:15am – Wake up for some unknown reason. Immediately think about SharePoint. Am I going to be able to get it to work today?

 

5:20am – Still awake. Stressed about SharePoint. Eat a peanut butter sandwich.

 

8:35am – Wake up late. Yikes!

 

9:00am – Delete a dozen emails from colleagues on how SharePoint searching, check-in/check-out and email-enabled groups still aren't working. Can't deal with that.

 

9:11am – Sip coffee. OK. Over the past two weeks I've learned I can't use Themes. Updates to themes via a Feature don't apply automagically. Site Definitions only apply upon site creation. Ok. It's all about master pages. I'm not going to try to over-achieve. I'll just walk through a tutorial. Mmmmm. Four books to choose from….ah…Here we go…

 

9:13am – Start create a Custom Master Page tutorial.

 

9:32am – The tutorial wants me to use SharePoint Designer. Uh oh. SharePoint Designer customizes everything it touches. Crud. What am I going to use when I really want to do this for real?…Shhh. Just do the tutorial.

 

9:40am – Find out Step 11 doesn't work. Where did the "Master Page" option go in Site Settings?

 

9:55am – Delete and recreate the site collection over and over. Choose different templates. Nothing helps.

 

10:02am – Must be a Feature. Yep. Book says I need Publishing but thought I had all that set up. Review Features. Start with the Farm and work up from there…ah…"Office SharePoint Server Publishing Infrastructure" is not active for the Site Collection. Wonder why.[click ...wait for refresh...]

 

10:03am – Error. Access Denied.

 

10:04am – Push chair from desk. Wonder what I've done to deserve this.

 

10:20am – Flail around. Make sure I'm System Account several times. Google stuff. Get nowhere. Find article by Heather Solomon further confirming this feature is probably the issue. She must not sleep. She must just write SharePoint documentation all the time.

 

10:21am – Notice that the other web application in the Farm does have the feature enabled. Start tutorial over.

 

10:33am – Stuck at step 13. Where's the master page I just saved? It's not in the drop-down list to choose from. Go back to Designer.

          – Ah, the page is still checked out. Maybe that's the problem. ok…Check In…Minor or major version? Uh…"Publish a major version" sounds good.

          – "This document requires content approval. Do you want to view or modify its approval status?"  Uh….sure…Yes…

 

10:35am – Get the absolute silliest error message I've ever seen:

"A World Wide Web browser, such as Windows(R) Internet Explorer(R), is required to use this feature."

(I've got at least five different browsers installed!) Flail around looking for a setting in Designer. Google. Get nowhere.

 

10:37am – Bang head on solid objects nearby.

 

10:56am – Refresh a few pages. The new master page still doesn't appear in the Master Page Gallery. Ug. Check the Site Master Page Settings page one more time…oh…ok…there it is now…

 

10:58am – "Warning: The selected master page has no approved version. This site may appear to be broken to users without the view versions right in the Master Page Gallery." Wonder what the heck that means.

 

11:00am – It worked. OK! One tutorial. One page. Two hours. I'm cookin' now!!

 

11:11am – Next page. Next tutorial.

 

11:12am – Step 3. Create a document library.

          –  Error. Cannot complete this action. Please try again.

 

11:13am – [Stare at screen] …

 

11:14am – …

 

11:15am – …

 

11:22am – …

 

11:23am – Go play on Linux…

NavBar ID Attrib in ONET.XML file can prevent application of site template

Friday, October 12th, 2007

Just For Posterity Department:

I was trying to create my first custom Site Definition. This was my first foray into ONET.XML other wonders.  I thought I was making some simple changes, but creating a site with my new Site Definition (by choosing it from the site template list) kept failing.  In the browser, SharePoint displayed this helpful error message:

 Cannot complete this action.
 
 Please try again.

Mmmmm. Hoping for a little more, I dig into the log folder at C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12LOGS. It isn't any more helpful.

 Failed to apply template "LICOR_Team_Site#0" to web at URL "http://sandbox1:8081/7", error  0×80004005

<snippet from log file>
10/12/2007 09:46:25.69  w3wp.exe (0×1DE0)                        0×1650 Windows SharePoint Services    General                        72h9 High     Failed to apply template "LICOR_Team_Site#0" to web at URL "http://sandbox1:8081/7". 
10/12/2007 09:46:25.69  w3wp.exe (0×1DE0)                        0×1650 Windows SharePoint Services    General                        72k2 High     Failed to apply template "LICOR_Team_Site#0" to web at URL "http://sandbox1:8081/7", error  0×80004005 
10/12/2007 09:46:25.69  w3wp.exe (0×1DE0)                        0×1650 Windows SharePoint Services    General                        8kh7 High     Cannot complete this action.  Please try again. 
</snippet from log file>

I eventually find out that my problem was in a <NavBar> element. I added a custom NavBar element and, not knowing any better, I changed the ID attribute to the integer 5001. MSDN just says that the param "Specifies the ID" [ http://msdn2.microsoft.com/en-us/library/ms430616.aspx ], so I just picked something not like the others, which were in the 1001-1040 range.

5001 was bad. I don't know why, but there is either a limit to what you can assign OR there was another object not specified in this particular ONET file that conflicted.

Changing my custom NavBar ID to 1030 made my Site Definition work.

Anyone know why?

Designer export fails with "Guid should contain 32 digits" error

Thursday, September 13th, 2007

FOR WHAT IT'S WORTH DEPARTMENT

Trying to work out migrations (as others have before me). I was using SharePoint Designer to backup individual sites, until I encountered,

"Error occurred while exporting the web http://site/
Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
"

Huh? LOL. Sometimes you just gotta laugh.

So Google to the rescue. I learned that this message comes up alot and in many contexts. I found these posts that related to exports, though:

http://www.eggheadcafe.com/software/aspnet/29580784/wss-30-export-fails–g.aspx

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2003817&SiteID=1

http://www.developerfood.com/export-of-site-fatal-error-guid-problem/microsoft-public-sharepoint-setup-and-administration/07a2ba4f-eb25-4ef9-a1bf-97d2850af506/article.aspx 

This last one had 99% of the answer. SOMETHING in SharePoint doesn't parse the file called "fields.xml" that is at
c:program filescommon filesmicrosoft sharedweb server extensions12 emplatefeatures satypes"

So, in "ezy's" words,

"I first made a backup of the "fields.xml", then I modified this file and
replaced all of the instances where the field id # had a { (I removed the
squiggly bracket from in front of the id # and the other bracket } from the
end of the id #). I then saved the changes, tried the export over again and
it completed without any errors.

You'll be wanting to reset IIS afterwards, though.

The day before I had created some custom lists and workflows. I'm thinking this had something to do with it. 

 

 

=========================================================

UPDATE

Just to be sure I put the old xml file back and reset IIS again. Sure enough, I got the error! I owe "ezy" a pint. 

SharePoint pages completely broken…because of hostname!?

Wednesday, July 25th, 2007

It's worse than I thought.

Firefox is fine. A default install of IE7 cannot run any scripts AT ALL when accessing the site with the Alternative Access Mapping.

and six others.

If I use the host name sandbox_sp-sql, IE blocks session cookies (see previous post).
If I use the alternative access mapping sandbox1, scripts break in IE7.

wow.

More to follow…

Unwanted headers appearing…because of hostname!?

Wednesday, July 25th, 2007

Here's an odd one…

I ran a VM with a vanilla install of XPsp2 and IE7 to do some testing to find that unwanted header text appears above the top-right menu ("Skip to main content")

and the left menu ("Quick Launch").

This does not appear on my other browsers (IE6, Firefox, etc.)

Given the trouble I had with the hostname containing an underscore (see previous post) I thought I'd try the alternative url. Sure enough! The unwanted headers disappear! UH?!?!

Using the machine name and accessing the site with that as the hostname: no unwanted header text and no "script error."
Using the Alternative Access Mapping as the url: unwanted header text is visible and many script errors.

And IE script error messages are so helpful, too.

Line: 1257
Character: 57
Code: 0
Error Message: Expected ')'

But an Add-on called "DebugBar" (available on the IE7 Add-ons website) provides a "IE Interpreted Source Code" view. Nice. Too bad line 1257 had nothing to do with anything and just some innocent table tags. I'm still not sure I'm seeing "Line: 1257" Is it possible to see Line 1257?

I've Googled this but no one else seems to have been bothered with this…Mmmmm…

Triggering the application of a custom theme

Thursday, July 12th, 2007

Share Perran says,

"When you apply a theme to a site in V3 (just like V2), the theme.css is not the file which is actually applied to the site.

"Instead your theme and the other CSS is combined forming a file called something to the effect of “ThemeName1011-65001.CSS”. This is the file you need to edit.

"Select View Source from the browser while viewing your site, you'll notice that file is applied.

"You will find this file in the _themes folder using SharePoint Designer 2007."

But what if you don't have or want to use SharePoint Designer for this? How does one get at the combined file?

I prefer to apply a new theme and make future changes to the file system.  Tigirry provides a great HOW-TO in his blog.

Subsequent changes to the custom theme seem surprisingly tough though. Most posts indicate that to get further changes to take, one must apply a different theme with Site Settings (Home > Site Settings > Site Theme) and then re-apply the desired theme.  (Bil Simser calls it the "Rinse, Lather, Repeat" method. LOL!)

Even then, I found the changes weren't being made probably due to an ISAPI cache or something.  I found I had to
use an extra step to make my changes

  1. edit and save the css file
  2. recycle the app pool
  3. apply another theme
  4. re-apply the desired theme

Here are two approaches to avoid this problem provided by Bil Simser:

I still like to edit files directly so I'll try creating a web part, but how to code the pool recycle? Mmmm.