Sharepoint Insight by Namwar Rizvi

Sharepoint Tips, Tricks and inside knowledge from real world experience by Namwar Rizvi

Posts Tagged ‘Debugging’

How to find Microsoft.SharePoint.ApplicationPages.dll and some other assemblies

Posted by namwar on June 12, 2010


You may be wondering where to find Microsoft.SharePoint.ApplicationPages.dll , if you are creating a new SharePoint application page? But don’t worry, it resides in _app_bin folder of your SharePoint site’s virtual directory.

Assuming your IIS inetpub is at C then the exact path of Microsoft.SharePoint.ApplicationPages.dll is

C:\Inetpub\wwwroot\wss\VirtualDirectories\<Your Virtual Server >\_app_bin\Microsoft.SharePoint.ApplicationPages.dll

Here is the full list of assemblies at _app_bin folder:

  1. Microsoft.Office.DocumentManagement.Pages.dll
  2. Microsoft.Office.officialfileSoap.dll
  3. Microsoft.Office.Policy.Pages.dll
  4. Microsoft.Office.SlideLibrarySoap.dll
  5. Microsoft.Office.Workflow.Pages.dll
  6. Microsoft.Office.WorkflowSoap.dll
  7. Microsoft.SharePoint.ApplicationPages.dll
  8. STSSOAP.DLL
Advertisements

Posted in Information, Object Model, Tips, Troubleshooting | Tagged: , , , , | Leave a Comment »

How to debug Email Event Receiver

Posted by namwar on January 14, 2010


Normally when you debug an event receiver in SharePoint, you attach your debugger with w3wp.exe process. But email received event is not processed by this process.

Instead, you need to attach your debugger with OWSTIMER.exe process. This is the “Windows SharePoint Services Timer” service.

If this process is not listed in your processes list then click on “Show processes from all users” to display all processes similar to following:

OWSTimer image

Posted in Debugging, Tips | Tagged: , , | Leave a Comment »

SharePoint / WSS 3.0 SQL Database not found error

Posted by namwar on July 21, 2009


While reading the newsgroups, I found a neat solution to share with my readers. If you have deleted content databases of a site collection but you are still getting an error similar to the following in error log

SQL Database ‘WSS_Content_345’ on SQL Server instance ‘DBS1’ not found.

It is because SharePoint config database still has a record of deleted database and trying to connect to it.

Solution:

Run the deletecontentdb stsadm command similar to the following :

stsadm -o deletecontentdb -url http://wss.company.com/sites/name1
-databasename WSS_Content_2

stsadm -o deletecontentdb -url http://wss.company.com/sites/name1

It will delete the old database entry from SharePoint Config database.

Posted in Errors, Solutions, Tips | Tagged: , , , , , | Leave a Comment »

Visual Studio 2008 extensions for Windows SharePoint Services 3.0, v1.3 – Mar 2009 CTP

Posted by namwar on March 24, 2009


A goow news for SharePoint community 🙂 Microsoft has releasesd the Mar 2009 CTP of Windows SharePoint Services 3.0 v1.3. This CTP contains excellent set of functionalities and saves your precious time. You can download the extensions from here

Following is the overview as released by Microsoft

This is the SharePoint developer tools for Visual Studio 2008. These tools are suitable for use with Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007. It includes project and item templates for common SharePoint artifacts, it includes build, packaging and deployment for SharePoint solutions and it includes the SharePoint Solution Generator which creates a new Visual Studio 2008 project from a SharePoint site.

The tools provide item templates for List Definition, List Definition from Content Type, Content Type, Field Control, Web Part, Module, Root File, Template, Event Receiver, and List Instance. It provides project templates for Team Site Definition, Blank Site Definition, List Definition, Web Part and Empty. It works with Visual Basic .NET and C# languages and a comprehensive user guide is included. It does not include the SharePoint Workflow templates as they are built in with Visual Studio 2008.

New features in version 1.3 include:

  • Can be installed on x64 Server OS machines running SharePoint x64. Previously only x86 Server OS could be used
  • Separate build commands for package, deploy and retract are added as Visual Studio menu items
  • WSP View improvements for consistency of deleting feature elements, merging features and adding event receivers to features
  • Command line build, package and retract commands are included enabling continuous integration and build servers. Previously command line build of SharePoint projects was very difficult
  • Refactoring support for renaming of Web Parts. Previously renaming a web part required changes in several files in the project
  • Solution Generator can now generate solutions from publishing sites. Previously only regular sites could be generated
  • Allowing partial trust BIN deployments of web parts
  • New project item template for SharePoint RootFiles items
  • Deployment will now optionally remove conflicting existing features on the development server prior to redeployment. Previously any feature name conflicts would result in an error
  • Ancillary assemblies such as for business logic can now be added to the SharePoint Solution WSP
  • Hidden features related to Site Definition projects are now shown in WSP View. They are no longer hidden
  • For advanced users a fast deploy is included to update only the compiled assembly on the SharePoint development installation
  • Deployment step logging is included
  • The List Definition from Content Type template now allows for the creation of a List Definition Event Receiver
  • The User Guide is now installed with the extensions instead of being a separate download

Posted in Debugging, Guidance, Templates, Tools | Tagged: , , , , , , , , | Leave a Comment »

How to fix Cannot run Windows SharePoint Services on this page?

Posted by namwar on February 3, 2009


If you are getting “Cannot run Windows SharePoint Services on this page…” error while trying to upload multiple files in Sharepoint and you are banging your head against the wall then don’t worry you are not alone 🙂 It is the shared pain by many of us facing the legacy errors of FrontPage Server extensions in Sharepoint. This error occurs if you modify Upload.aspx located in layouts folder. First and foremost, do not modify the standard upload.aspx or any other standard file in Sharepoint as it is not supported by Microsoft and your change will be overwritten by any new service pack or hot fix.

So having said that, if you have made a copy of upload.aspx, customized it and trying to use it then you may certainly face this error. Following is the solution to fix it:

  1. Open your copy of upload.aspx and search for 
    <input TYPE="hidden" NAME="_charset_" VALUE="utf-8"><!--webbot bot="FileUpload" endspan i-checksum="45034" -->
  2. Update the following string as follows
    <input TYPE="hidden" NAME="Cmd" VALUE="Save"><!--webbot bot="FileUpload" endspan  -->
  3. Save your file.
  4. Reset IIS
  5. Try to use the file in Sharepoint and Bingo!!!! no more error :):):)

Posted in Uncategorized | Tagged: , , , , | 9 Comments »

Verify your code with SharePoint Dispose Checker Tool

Posted by namwar on February 2, 2009


Today, a new tool  SharePoint Dispose Checker Tool  has been released at MSDN for checking your code against incorrect processing of IDisposable objects like. SPSite and SPWeb. This tool checks your assembly and identify potential problems of not disposing these objects. 

You can download SharePoint Dispose Checker Tool from here

and here is the great article from Paul Andrew (Microsoft Technical Product Manager for the SharePoint Developer Platform) about best practices and how to use this tool.

Posted in Bugs, Debugging, Object Model, Tools | Tagged: , , , , , , | Leave a Comment »

How to display real Error in Sharepoint web site

Posted by namwar on October 25, 2008


Just perform the following steps to display the real error happened in Sharepoint site instead of a generice Unknow error message.

  1. Backup your web.config of web application
  2. In SafeMode tag under SharePoint change 

              CallStack=”true

              MaxControls=”200

After changing, your SafeMode node will be similar to following

<SafeMode MaxControls=”200″ CallStack=”true” DirectFileDependencies=”10″ TotalFileDependencies=”50″ AllowPageLevelTrace=”false”>

3.  Set  customErrors mode=”Off

 

 

Posted in Configuration, Debugging | Tagged: , | Leave a Comment »