Monday, November 24, 2008

Unit Testing in Sharepoint

Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here.
The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.

Tuesday, November 18, 2008

How to get physical path of 12 in code.

//use reference to below
using System.Web;


string strPAthTo12hive =HttpContext.Current.Server.MapPath(@"~\_layouts/1033/PurchaseLinks.js");

Sunday, November 16, 2008

Infopath form closes as soon as you open it in sharepoint workflows.

I had a strange error as soon as a VS 2005 workflow that I wrote for Sharepoint would try open an InfoPath form it would close without giving any errors. The only error was the following in the logs: EventType ulsexception12, P1 w3wp.exe, P2 6.0.3790.1830, P3 42435e74, P4 microsoft.office.infopath.server, P5 12.0.6219.0, P6 4845c8d9, P7 9573, P8 194, P9 fileloadexception, P10 82lz.
To resolve this issue ensure that there are no empty parameter floating around in the ItemMetadata.xml files that the InfoPath form is not using. Once I removed all unwanted parameters the issue was resolved.

ErrHow to resolve Error: ".asmx was not recognized as a known document type."

If you get an error below when trying to add a reference to webservice:
The document at the url http://localhost:81/PWA/_vti_bin/psi/project.asmx was not recognized as a known document type.The error message from each known type may help you fix the problem:- Report from 'DISCO Document' is 'Root element is missing.'.- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.- Report from 'http://localhost:81/PWA/_vti_bin/psi/project.asmx' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.
Type ?wsdl after the webservice URl and the error should be resolved or alternativly click on the service description in the summary window and the Error should be resolved. Below is image to describe the process.