Showing posts with label SharePoint 2007. Show all posts
Showing posts with label SharePoint 2007. Show all posts

Sunday, 15 May 2011

Turning on Detailed Error Messages in SharePoint 2010 - SharePoint ignoring value in the CustomErrors tag issue

This is not new but I found the situation in which the following recommended procedure won't work.
  1. On the web server, navigate to the site directory (probably something like: C:\Inetpub\wwwroot\wss\VirtualDirectories\80 )
  2. Open the web.config file in Notepad
  3. Search for the safemode node with the word "CallStack" and change the CallStack status to true
    <SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
  4. Search for the CustomErrors node and set the mode to Off
    <customErrors mode="Off" />
  5. Save and close.
So what to do if you update web.config and you still can't see detailed error messages?


The problem is that you're probably running into the error in the _layouts subfolder. In that case the solution is easy:


  1. On the web server, navigate to the c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS folder
  2. Open the web.config file in Notepad
  3. Search for the CustomErrors node and set the mode to Off
    <customErrors mode="Off" />
  4. Save and close.
Hope this helps,

David



Force to open InfoPath forms in the browser

If you were working with browser-based InfoPath forms in SharePoint 2007/2010, you might run into a really annoying issue. In some situations the forms are opening in the client application, this usually happens when:
  1. You have InfoPath application installed on your computer.
  2. You're opening the form from within the task (e.g. task in Approval workflow) - see next picture

To overcome this problem, I created a simple SharePoint solution which forces SharePoint to open the form inside browser. It uses JQuery framework and it's packaged into the standard SharePoint solution. All you need to do is to install the solution and activate Open InfoPath forms in browser feature under Site Collection Features.

You can download the solution here.

Hope this helps,

David

Tuesday, 10 May 2011

Prompt when opening PDF in SharePoint

This is a really annoying problem. You can see on the next screenshot what I'm talking about.


Why SharePoint just can't download the file and open it? It's the PDF file so you can't edit it anyway.

To be honest, we can't blame SharePoint in this situation. The SharePoint starts to treat PDF files this way after you install PDF iFilter and modify docIcon.xml file in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML folder.

In this article by Microsoft you can find that when installing PDF iFilter you need to add <Mapping Key="pdf" Value="pdf16.gif" /> entry to docIcon.xml file. The entry should be <Mapping Key="pdf" Value="pdf16.gif" OpenControl="" />. After you update the entry and restart IIS using iisreset, everything should be OK:




Hope this helps,

David

Tuesday, 26 April 2011

Moving SharePoint with Reporting Services (SSRS) to a new server


Imagine you want to move your SharePoint installation to a different server (i.e. server with a different name). You can do it simply by installing a new SharePoint on the server and restoring content databases. If you were running SQL Server Reporting Services in SharePoint integrated mode, the reports stored inside SharePoint won't be working anymore. Here is the fix:

1. Stop Reporting Services service on the server hosting the reporting services
2. Update path references in Reporting Services database:

UPDATE [ServerParametersInstance] SET [Path] = REPLACE([Path],'http://old-server','http://new-server')
UPDATE [Schedule] SET [Path] = REPLACE([Path],'http://old-server','http://new-server')
UPDATE [Schedule] SET [Path] = REPLACE([Path],'http://old-server','http://new-server')
UPDATE [Catalog] SET [Path] = REPLACE([Path],'http://old-server','http://new-server')



3. Start Reporting Services service again
    Don't forget to replace old-server and new-server tokens with your values.

    Thursday, 14 April 2011

    Barcodes generating web handler as SharePoint solution

    I'm just working on the project where I need to generate barcodes and display them inside SharePoint. I needed some component which would generate these barcodes and  I wanted it as SharePoint solution (wsp file) which would make the deployment easier and administrator friendly. I decided to develop a web handler (ASXH file), all you need to do is to call the web handler and pass all information (i.e. barcode data)  as URL parameters.

    Here is the example of generated barcodes:


    Visual Studio 2010 project is available here. You'll need WSPBuilder extension  to create the wsp package and Free 3 of 9 font installed on the server or dev machine.