Disable Event Validation in SharePoint
28. November 2007 08:54

So you developed a slick MOSS webpart, but you do some fancy AJAX and the ASP.Net event validation system is throwing exceptions for you?

Sometimes it isn't practical/possible to register all your values for event validation with the clientscriptmanager, and you just need to disable the feature.

Open up your sharepoint web.config, and search for  "<Page"

Add a new attribute to the tag, enableEventValidation="false"

It should now look something like this:

    <pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7" enableEventValidation="false">
Save your web.config, and your good to go.
Tags: Comments (0) | Permalink
SharePoint External File and Document Storage API
9. November 2007 08:51

So has anyone worked with this thing yet!?  Microsoft has quietly released some new functionality in a hotfix for WSS.  This new functionality allows WSS to work with externally stored files and documents.

There still isn't any documentation on this, but it's being written now, and will probably be available with SP1.  So if your concerned about being able to store large files outside your database, just wait another month or so...

Here is the small amount Microsoft has said publicly so far:

An external storage API is available for Microsoft Windows SharePoint Services 3.0. The external storage API lets you store documents or files on an external storage device other than Microsoft SQL Server. This API also lets you upgrade existing Windows SharePoint Services 3.0 sites to point to an external storage device.

Which you can find here.

Tags: Comments (0) | Permalink
SharePoint Link Love - Friday November 9th, 2007
9. November 2007 05:29

It's friday, and this is SharePoint Link Love.  Here are the most interesting SharePoint links this week:

MOSS Search Server Express was released, and Joel Oleson has some good coverage.

Eric Charran has two great articles.  His discussion on how to Debug a Custom OWSTimer Job was literally posted minutes before I went to Google for a solution, and undoubtedly saved me an hour or two.  He also links to a great KB article on the proper way to change service accounts in SharePoint 2007.

Jeremy Thake has a new blog actually running in SharePoint, which is great to see, and he's got a great customer oriented article about Microsoft Marketing Search Server 2008.

And last, Something I found interesting, Robin has a post about InfoPath Forms with Custom lookup Dialogs.

Tags: Comments (0) | Permalink
Create a Numbers Table using SQL Common Table Expressions
7. November 2007 04:57

The concept of a CTE, or common table expression, is something new in SQL 2005, and it is hugely powerful for things such as traversing trees or hierarchies, among other things.

You can use a CTE to generate an ad-hoc Numbers Table.  Try this:

WITH Numbers(n)
AS
(
SELECT 1 AS n
UNION ALL
SELECT (n + 1) AS n
FROM Numbers
WHERE
n < 1000
)
SELECT n FROM Numbers
OPTION(MAXRECURSION 1000)

That will generate numbers to 1000.  Change the comparison expression, and raise up the max recursion depth, to go to a higher number.  Or, instead of using the CTE in your SQL, you could just do a SELECT INTO and dump it into a table.


If your not sure why you would want a numbers table, just think about it a bit, or go Google!  A numbers table is fantastically useful for all sorts of tasks in a database, including parsing text, joining against to create multiples, and more.

Tags: Comments (1) | Permalink
SQL Reporting Services Error- Maximum request length exceeded
6. November 2007 06:04

When trying to deploy a large report to your SSRS server, you may run into an error like this:

Error 2 There was an exception running the extensions specified in the config file. ---> Maximum request length exceeded.

You could, quite honestly, run into this error in a lot of situations involving a web app, but we're talking specifically about SSRS in this post.

The basic problem here, is that your posting an amount of data to a web app larger than it is configured to accept.  Hence, it is throwing an error, and simply saying "no!"

It's an easy fix though! You've got to tweak the web.config for the web app, which in the case of reporting server, is usually somewhere like this:

C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

Find the web.config file for your reporting services instance, open it up, and track down the line that looks something like this

<httpRuntime executionTimeout = "9000" />

Now just add a max request length attribute in there to fix the problem, adjust your size as needed.  This is 5meg.

<httpRuntime executionTimeout = "9000" maxRequestLength="500000" />

And now you'll need to restart IIS.  start->run->"iisreset"


Good luck!

Tags: Comments (8) | Permalink