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.
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
cscript c:\windows\system32\iisapp.vbs /a "[App_Pool_Name]" /r
Subscribe to:
Comments (Atom)