Unable to debug application pages of SPSF project

Jul 13, 2012 at 9:49 AM

Hi there!

We're using SPSF (the latest release) to develop a custom application in VS2010. Everything works fine and perfect except for application pages under SPSF projects. Whenever there is an error the code-behind of an application page of SPSF project the system shows:

 


 

Server Error in '/' Application.

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. 

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
  <system.web>
    <customErrors mode="Off"/>
  </system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
  <system.web>
    <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
  </system.web>
</configuration>


and we cannot debug it at all.

We already did all necessary configuration in both the web.config files for IIS (..\inetpub\wss\...) and WSS (..\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS) but still receiving the same error as above without details. Currently and as a temporary workaround we do copy the same code-behind in a non-SPSF project application page to trace the error details and debug the code but it doubles our development time.

Any suggestions would be highly appreciated.

 


Coordinator
Oct 21, 2012 at 11:19 AM

Application pages generated with SPSF shouldn't  be any different to applications pages you create in another way.

The only thing I currently see that differs is that the SPSF application page does not have

<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages"

%>

 in the aspx file.

But as you say, when you copy the content to another application page 1:1  you don't get the issue, so the code seems not to be the problem...
Can you provide a sample project in order to reproduce the issue?