Thursday, September 18, 2008

Set Path for stsadm.exe

Another one from Jonathon J. Frost's blog, this post demonstrates how to set the path for stsadm, so that you do not have to type the full path or keep it in your build scripts. The basic gist is setting something called an environment variable on the machine that the script is running (dev machine, server, etc.). Just one of those things that makes life just a little easier.

SharePoint - Getting More Meaningful Error Messages

One of the first things I noticed when I started SharePoint development was the error messages disappearing. In a regular .NET app, one merely needs to ensure the custom error handling is off, like so:



Of course, in production this should be turned on so that the end user gets a friendly error page, giving them a nicer experience, and perhaps an email form or some help desk phone numbers. This also prevents malicious users from getting more info than you want them to have.

However, in sharepoint, something else must be done in order to get helpful error messages.




Again, when going live, these settings should be changed to "false", but having them set to true will give you some of the same error messages you would see if you are working .NET.

On a side note, another resource for error messages are the SharePoint Logs, located in the 12 hive in the Logs directory. An additionally handy thing about the logs is that they can be opened with excel, which makes them a bit more readable, and also sortable.

Restarting the app pool, vice IIS restart

Jonathon Frost posted about how to recycle the app pool from the command line, vice restarting IIS, which takes 80% longer. This saves you a few seconds of waiting, which might sound trivial, but when you are doing backend SP development and continually GACing the dll on which you are working and restarting iis it can really add up.

cscript c:\windows\system32\iisapp.vbs /a "[App_Pool_Name]" /r

Friday, August 29, 2008

SP Shortcut to get Using Statement

Little Red Underline Helper
When you have referenced a dll in your project and try to use one of it's objects that are not included in the using statements, Visual Studio will provide a red underline, per usual when something is screwed up, but it will also provide a little red underline at the end. Clicking . will provide two options: fully qualify, or add to using statements. Either one gets you what you want in order to use the object.

SP Limited Read Permissions

If a user is set to limited read permissions, they will only see the latest approved major (e.g. 1.0, 2.0, etc.) and will not see minor versions (0.0, 1.1, 1.2, etc.). We were having a problem seeing changes in the style library because we didn't realize that they were all set to minor versions.

Thursday, August 28, 2008

More thoughts on Menu Control

A requirement of the customer is to be able to control the order of menu items. Using one of the built in providers, such as the one used by the built in menu control that is edited via the "site navigation settings". This will enable control of which subsites are displayed, link order, and title. However, this does not enable control of such things for the top level site collections. To do this, I plan to store a list of site collections in a document library, and start the menu build process by looping through those items to create top level links.

Additionally, a workflow might be able to be kicked off every time a site collection is created, tasking the creator to make an entry in the document library. However, the top level sites are fairly static and our created by the dev shop.

Tuesday, August 26, 2008

Locator Brainstorm

SharePoint-ize the Locator application:
  • Continue to use SSIS to retrieve xml from the web service, transform, and populate the SQL database with information from existing AD-like system.
  • Develop a solution for then putting that information into a custom list.
  • Incorporate the use of a custom list for editing bio information that does not come from the web service.
  • Develop a workflow for approval
  • Develop a workflow that enables users to give other users permission to edit their bios
  • Use of a custom SharePoint form for viewing both information from the web service and bio information that is approved.
  • Use of word templates to populate word documents from the custom list in order to provide a word document (pdf as well??) view of all information.