Thursday, 27 March 2008

Working with PDF's Dot Net

The PDFSharp open source Dot Net classes make working with PDF's in .Net very easy.
http://sourceforge.net/projects/pdfsharp

Friday, 7 March 2008

Create Page gives Access Denied error on Sharepoint

Came accross this problem where users with Full Control rights of a Sharepoint site were getting the Access Denied message when they clicked on the "create page" button.

The reason was that the users who create pages need to have read rights to the "Master Page Gallery"!

Thursday, 6 March 2008

Add custom Styles to Rich Text Editor Sharepoint - content editor web part

To add custom styles to the Rich Text Editor in SharePoint (both the ones accessed through the content editor web part and the inbuilt page content web part), just add styles in the format ms-.ms-rteCustom-nameofclass to your css style sheet that your master page uses. It's as simple as that.

If you are not using custom master pages style sheets, then just add the styles in the format rteCustom-Title (rteCustom- should appear before the style name) to a stylesheet and upload the stylesheet css file to the style library of the site collection, then go to site settings - master page settings and choose the override style sheet option and point to the style sheet that you just uploaded to. That's it, now when you open the rich text editor in sharepoint, type in some text, highlight the text you typed and from the styles dropdown choose the style you want.

Example of custom style that would appear in the css class .ms-rteCustom-TitleRed{Font-family: arial;Font-size: 14pt;Color: Red;}

Tuesday, 19 February 2008

Set "Show Subsites" option in Sharepoint Modify Navigation to False

Programatically set the "Show Subsites" checkbox in the Modify navigation section of a sharepoint site to false using the code below

spweb.AllProperties["__IncludeSubSitesInNavigation"] = "False";
spweb.Update();

Friday, 15 February 2008

Modify the Edit HTML Toolbar in Sharepoint

Modifying the Edit HTML toolbar that appears in Sharepoint Publishing pages is very easy.

In your page layout you could add attributes like AllowFonts="false", AllowImages="false" and so on..here is an example of disabling fonts and html editing



That's it!

Publishing InfoPath Forms connecting to Webservices into Sharepoint

The following applies to attaching a certificate to an infopath form and deploying it to sharepoint. This certificate is necessary because the infopath form that we use connects to an external webservice so "full control" level security must be applied to the form.

Thanks Kieran Toon for the below..:-)

To deploy an Infopath form to SharePoint with code behind publish the form to a common network location(the wizard will take care of this - first option on first screen). Have the administrator upload the form using Central Admin and then activate it for your site collection. This form will then appear a content type which you can use as you wish in any document or forms library



That is correct, forms with .Net enabled code can be deployed as web enabled forms but they need to be deployed through central administration.

http://spsfactory.blogspot.com/2007/01/walkthrough-publishing-administrator.html
http://technet2.microsoft.com/Office/en-us/library/8285b82e-19db-4408-859f-1430830fe0fb1033.mspx?mfr=true
BlackPearl now publishes the InfoPath form but this does not seem to be accomodated. Maybe there could be an option added to the wizard which would deploy the InfoPath form to central administration and performing the other actions needed.




Excellent pointer. From this information, it allowed me to find this excellent article - Creating InfoPath Form Templates That Work With Forms Services (http://msdn2.microsoft.com/en-us/library/aa945450(VS.80).aspx) which contains the following.

Note:
After publishing a browser-enabled form template that contains managed code to Microsoft Office Forms Server 2007, to Office SharePoint Server 2007 with InfoPath Forms Services, or to a shared location, the form template must be uploaded and approved by a server administrator before it will be allowed to run.
These other links were also pretty useful in understanding the limitations of Web Enabled InfoPath forms.

InfoPath features that are supported in InfoPath Forms Services (http://office.microsoft.com/en-us/infopath/HA102040851033.aspx?pid=CH100211501033)
InfoPath 2007 features that are unavailable in InfoPath Forms Services (http://office.microsoft.com/en-us/infopath/HA102105871033.aspx)




http://k2underground.com/forums/thread/18335.aspx

Tuesday, 29 January 2008

KB934525 Troubleshooting "Cannot start service SPAdmin on computer '.'."

If when running the sharepoint upgrade wizard you get the error KB934525 Troubleshooting "Cannot start service SPAdmin on computer '.'." follow step 4 in the following link which is

"Option # 4

On the machine where psconfig failed to start the SPAdmin service run:
%commonprogramfiles%\Microsoft Shared\Web Server Extensions\12\BIN\psconfig -cmd upgrade -inplace b2b -wait -force
Modify the service timeout values in the Registry:

HKLM\SYSTEM\CurrentControlSet\Control add/modify DWORD value ServicesPipeTimeout to 60000 (60 seconds)

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control add/modify STRING value WaitToKillServiceTimeout to 120000 (120 seconds)
Restart the server machine.

"


This fixes the problem

http://blogs.technet.com/wbaer/archive/2007/10/15/kb934525-troubleshooting.aspx