Monday, August 13, 2012

How To Fix “Request Failed” when creating SharePoint application pages with “CodeBehind” in SharePoint 2007

    Problem

    You have developed an ASP.Net (aspx) web application that you are deploying to the applications (_layouts) folder in Microsoft Office SharePoint Server (MOSS) or Windows SharePoint Services (WSS) or you have developed an ASP.Net (aspx) page that supports a feature such as Association.aspx or Initiation.aspx. When deployed you received the following message(s)

    clip_image001

    Solution

    Step 1 – Copy the assembly to your SharePoint application’s  bin directory

    Copy the assembly (dll) to the bin directory of the SharePoint server which is usually located in c:\inetpub\wwwroot\wss\VirtualDirectories\SharePoint80 where “SharePoint80″ is the name of the SharePoint application that will host the application page once deployed

    Step 2 – Add the assembly to the global assembly cache

    Add the DLL for the ASP.NET project to the GAC
    While logged into your SharePoint server, open the visual studio command prompt and type the following command (remember you MUST be on your server and you should navigate to the location of the DLL).  If you can’t locate the Gacutil tool it’s available with the Windows SDK and most versions of .Net so you can usually find it by searching your system.

    clip_image002

    To manually install the assembly into the global assembly cache type the following command
    Gacutil -if MyASPNetWebApp.dll

    clip_image003

    To uninstall
    Gacutil /uf MyAssemblyName (without the .dll extension)

    clip_image004

    Bonus

    You can automate this as a build event in visual studio


    clip_image005

    Source: http://www.sharepointassist.com/2009/02/16/request-failed-when-creating-sharepoint-application-pages-with-codebehind-in-sharepoint-2007/ 

No comments:

Post a Comment