DCSIMG
December 2006 - Posts - Meron Fridman's Blog

Meron Fridman's Blog

December 2006 - Posts

קצת פירגון לעמיתים שלי

 ברכות לדורון גולדברג ושגיב אברהם שעובדים איתי ושעברו היום את המבחן 74-133. נראה לי ששלושתנו מחזיקים חצי מכמות העוברים בעולם את המבחן הזה :-). סחטיין על ההישג אמרתי לכם שזה אפשרי

Excellent tip - Using SQL Server 2005 Web Services with InfoPath but not only...

I found this excellent tip in the Infopath team blog, but it is useful not only for Infopath developers...

Here’s your problem: You want to use a stored procedure in a database to access your data through InfoPath, but you don’t really want to have to write script for every query to change the stored procedure’s query parameters.  We’ve all been there.

Well, stop your coding, right now, because SQL Server 2005 allows you to create SOAP Web Service “endpoints” that act as a type of exposed stored procedure over HTTP.  Among other cool things, this will allow you to have the parameters you need exposed as query parameters in InfoPath’s data source.  It's easy to set up in SQL Server 2005 using the CREATE ENDPOINT T-SQL statement.  For example, let's say there is a simple Stored Procedure called "getAge" that takes an integer value and returns every person in a table that has that age.  The SQL statement to expose that Stored Procedure as a document literal SOAP Web Service could look like this:

CREATE ENDPOINT getSpecifiedAgeEndpoint

STATE = STARTED

AS HTTP

(

   SITE = 'myserver',

   PATH = '/getspecifiedagewebservice',

   AUTHENTICATION = ( NTLM ),

   PORTS = ( CLEAR )

)

FOR SOAP

(

   WEBMETHOD 'GetRecordsWithSpecifiedAge'

   (

      NAME = 'AdventureWorks.dbo.getAge',

      SCHEMA = DEFAULT,

      FORMAT = ROWSETS_ONLY

   ),

   WSDL = DEFAULT,

   BATCHES = DISABLED,

   DATABASE = 'AdventureWorks'

)

The web service will then be located at http://myserver/getspecifiedagewebservice?wsdl.  Note that this web service will not be exposed through IIS; It’s all happening directly from SQL Server 2005.  One method will be exposed at the URL called “GetRecordsWithSpecifiedAge”.  For more information on getting the endpoint up and running correctly, see this MSDN article.

You can find the full article here.

MOSS Query Tool

via Mart Muller

This is the next version of the SharePoint Query Tool, designed for MOSS (SharePoint 2007). It has a similar feature set to the SharePoint Query Tool - it allows you to use a point and click interface to gather information such as search scopes and properties, type in search terms, and click a button to create both the search SQL syntax as well as the Xml document that is needed to run a query against MOSS. You can see results in plain text, structured Xml and now a dataset view. It supports FREETEXT and CONTAINS as well as wildcard searching. A very valuable tool for those trying to write custom SharePoint queries.

Get it here.

How to enable debugging in a SharePoint Site

Via Renaud Comte

If you want to get the real yellow ASP.Net page with the real error message, just update your web.config  :

<SafeMode MaxControls="200" CallStack="false" ...> < !-- Become-- > <SafeMode MaxControls="200" CallStack="true" ...> <customErrors mode="On" /> < !-- Become-- > <customErrors mode="Off" /> <compilation batch="false" debug="false"> < !-- Become-- > <compilation batch="true" debug="true">

Just make an IISRESET to be sure (or use "%systemroot%\sytem32\IISAPP.vbs /a YourSharePointApppool  /r" to be faster ) and open your site

Plan Web site structure and publishing using MOSS 2007
Read the following articles for best practices about planning web site structure and publishing:
MossMenu source code released

The SharePoint Products and Technologies Team Blog published the MossMenu source code.

The AspMenu class that ships with WSS 3.0 (and by extension MOSS 2007) is nearly identical in behavior to ASP.NET 2.0’s Menu class (as the name implies). AspMenu derives from Menu and adds tweaks to work around a few reasonably well known annoyances and provides improved highlighting support.

 

Unfortunately, this class was marked sealed and is therefore not eligible to be used as the base class for derived types. Effectively, this means that customers cannot inherit the additional functionality of the AspMenu class when trying to provide further customization of the menu.

 

We realized this problem too late in the release process and were unable to remove the sealed marker from the AspMenu class that ships with WSS. However, we are instead providing the source code for that class here (as an attachment to this blog entry) under the name MossMenu.

 

Note: MossMenu is provided as is and will only work on sites built with WSS 3.0 or MOSS 2007. MossMenu relies on some JavaScript which has been included along with the C# source. This is really just for completeness’ sake [aside: some trival about the use of the apostrophe for the possessive forms of nouns] as this script is automatically included on most pages through the core.js script include reference.

 

Read the full article and download the source code from the following link:

 

http://blogs.msdn.com/sharepoint/archive/2006/12/02/customizing-the-wss-3-0-moss-2007-menu-control.aspx

 

Meron