Tuesday, March 17, 2009

How-to see descriptive Error messages in MOSS

How many times you have cursed Microsoft for that single line error message that always appear for so many different reasons but always says "An unexpected error has occured." :-(

To have a more detailed messages in MOSS while you perform your development tasks, you may want to enable debugging in the web.config file for the SharePoint web application. Please note here that this is not recommended to be done in a Production environment.

Edit your web.config file as shown in red below:

<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10"TotalFileDependencies="50" AllowPageLevelTrace="false">

And:

<customErrors mode="Off" />

And get rid of any bugs from your application quickly.

Monday, March 16, 2009

SharePoint Designer coming your way !!!

Good news guys. The most useful tool for the MOSS community has finally come out-of-the shell, it is believed to be made available for "FREE" coming 1st April, 2009.

Yes, you heard it right. Free, you may download the designer from the official Microsoft download site starting April 1st, 2009.

But administrators, watch out. There may be a bit of thinking required before the developers start using this tool to make those site-level changes. This could mean more efficient backup-restore planning would be required.

But definitely, this is yet another big step for MOSS to get closer to the world.

Monday, March 9, 2009

Error writing to the Event Log - Windows Server 2008

The EventLog.WriteEntry code runs successfully under Win Server 2003, but doesn't execute with Windows Server 2008. This line generates and error:

"The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security".

This can be resolved by following the below steps:

#1 Go to Start -> Run -> regedit

#2 Navigate to Computer > HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog

#3 Right click on "EventLog" key, select Permissions, and add the [Network Service] account with read/write permissions.

Note: Microsoft seems to have replaced the ASPNET account with the "Network Service" account.

#4 Restart the IIS (start -> Run -> iisreset)

#5 Now Go to Start -> Administrative Tools -> Computer Management -> Local Users and Groups -> Groups

Double click the [Administrator] Group -> Add the "Network Service" account.

Go back and try to refresh your web page again.

There you Go.....

Hope this saves some time for the others.

Thursday, February 19, 2009

Remove the '! New' tag for uploaded items

A requirement to reduce the time period for which the "! New" tag is displayed for any new items uploaded to a site made me hunt for this solution.

And it is right under the STSADM hood, such a powerful tool indeed !

I wanted to get the "! New" tag displayed only for the current day on which a document is uploaded to a document library. By default, MOSS looks like it remembers this for more than a day.

Here is a simple command, which does the job fairly easily.

stsadm.exe -o setproperty -pn days-to-show-new-icon -pv 1 -url [your site url]

You may set the propertyvalue (pv) = 0, if you don't want to display it ever.

Monday, February 9, 2009

Installing Windows 7 Beta on my VPC

Great !!! So last week-end I was successfully able to install Windows 7 Beta on the Microsoft Virtual PC 2007.

Pretty slick ! Based on the similar lines of Vista, Windows 7 follows a very much identical approach to getting things started up and running.

I will try to get the walk-through document and upload here very soon. This would include the screen-shots of each step I captured during the install.

Stay tuned !!!

Technorati Tags: ,,,,,

Monday, February 2, 2009

SharePoint Dispose Checker Tool

This one was a long awaited from Microsoft. They have released "SPDisposeCheck" which looks at the code in SharePoint and confirms that there are no memory leakages or extra memory consumption. As we are all aware of, this has been an issue since long going un-noticed into the deployment. So let's use this tool to run our projects through this checker before we go for any deployments.

Visit the MSDN code page and download SPDisposeCheck

Technorati Tags: ,,,

Friday, January 30, 2009

Web Development Helper

This is a good one!!!

We as a Web Developer may want to leverage this awesome HTTP sniffing tool.  This tool is a great asset when doing web client development like Flash, Silverlight, AJAX, and other likes.  As a Microsoft developer we have these two tools, and they are free :-) Fiddler and Web Development Helper.  I’m getting to like this Web Developer Helper.

It actually sits is your browser.  So you just need to turn it on and  get an explorer bar at the bottom showing all that you need.

Take a look at it.

Technorati Tags: ,,,

Wednesday, January 14, 2009

Windows 7 for you !

Last week, Windows 7 beta was made available to all for download and install.

Just to let you know that the 32-bit version is also available now in "Hindi", the Indian National Language. Though, it is not yet included in the list of 64-bit, but let us keep our finger's crossed to hear sooner than later from Microsoft. To help you find and install with the instructions you may find them at the Windows 7 Team Blog.

I'll try to install sometime during this week-end.

Technorati Tags: ,,,,

Saturday, January 10, 2009

Using LINQPad

LINQPad lets you interactively query SQL databases in a modern query language: LINQ.

LINQPad supports everything in C# 3.0 and Framework 3.5:

  • LINQ to SQL
  • LINQ to Objects
  • LINQ to XML

LINQPad is also a great way to learn LINQ: it comes preloaded with 200 examples from the book, C# 3.0 in a Nutshell.

Want to look at a preview of How LINQPad looks like, here it is:

LINQPad

Download LINQPad

Tuesday, December 23, 2008

Figuring out the SQL Server Version Number

I was about to install the SP2 from SQL Server when things started to give me woes with all sorts of issues. I wanted to uninstall and then tried to figure out the version and what SP did I have, when I realized, how difficult some little things could be. You can figure this out in two different ways:

#1 In SQL Server Management Studio Object Explorer when connected to the instance.

#2 By executing the query SELECT SERVERPROPERTY('ProductVersion') against a Database Engine instance.

The following table shows the version numbers that correspond to versions of SQL Server 2005:

Version Number   SQL Server Version

9.00.1399   SQL Server 2005 (initial version)

9.00.2047   SQL Server 2005 SP1

9.00.3042   SQL Server 2005 SP2