Friday, July 24, 2009

Invalid token 'Text' at root level of document.

ERROR: You may come across the below error while trying to run the makecab.exe command to generate a .WSP solution package for sharepoint webparts(or any other solution)
Invalid token 'Text' at root level of document.
XML document must contain a root level element.Data at the root level is invalid. Line 1, position 1. In DDF files


SOLUTION: Delete the frontpage server extension pages in your project. As for example my webpart project contained the .aspx pages. So once I deleted the .aspx pages , this error went off.

Failed to convert key to token - The public key for assembly '(null)' was invalid when running the sn command to know the publickeytoken of an asembly

ERROR: When trying to know the Public key token fo the strong assembly using sn command you may receive an error as below:
Failed to convert key to token -- The public key for assembly '(null)' was inval id.

SOLUTION: This error comes because the command options are case sensitive. The option Tp is case sensitive.
C:\Program Files\Microsoft Visual Studio 9.0\VC>sn -Tp \PendingTaskReport.dll

wsp has an unsupported extension, and cannot be added to the

ERROR: wsp has an unsupported extension, and cannot be added to the Solution

SOLUTION: If you watch the file extension, it may be in the upper case letter. Change the file extension from upper case to lower case and the run the stsadm command now. It will execute successfully.

ERROR: Could not find file: ´╗┐

ERROR: Could not find file: ´╗┐ERROR: MakeCAB aborted: 1 errors encountered

SOLUTION: Create a text file in any other location. Rename it to .DDF. Write the contents of the DDF file and save it. Add this file as an exisiting item to your project. Now run the MakeCab.exe. It will execute properly.

Wednesday, July 22, 2009

Debugging WCF service hosted in local IIS

PROBLEM: debug WCF service

SOLUTION:
1.) Set the breakpoints in the WCF service class.
2.) Change the build path of the WCF service application to the bin directory of the service hosted in the IIS
3.) Build the application in the debug mode.
4.) Run the application.
5.) Attach the 'W3WP' process to it. If in case you are not getting the process select "All Process" checkbox.
4.) Perform the operations and the break gets a hit.

Cheers !!!

Cannot use the special principal 'sa'. Microsoft SQL Server, Error: 15405

ERROR: Cannot use the special principal 'sa'. Microsoft SQL Server, Error: 15405

SOLUTION: run this command in the query editor window for each database
exec sp_changedbowner 'sa','true'