Thursday 1 December 2011

BUG: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

Solution:

Dont keep Server.Transfer or Request.Response inside try block.

try
{
    Server.Transfer("RoleProfile.aspx?RoleId=" + _duplicateRoleId + "&Source=CheckDup");

}


1. Either Remove Try block
2. Or use some thing like Response.Redirect("Default.aspx", false);

 


Parser Error Message: Unrecognized configuration section system.web.extensions.

Solution: Add the following in the virtual direfctory web.config

  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensions SectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebService sSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerial izationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>

The type ' ' exists in both ' ' and ' '

Solution:
Change CodeFile to CodeBehind….

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="InsightReportMasterPage.master.cs"
    Inherits="ABB.CRS.Web.UI.MasterPages_MasterPage" %>

The directory '{0}/App_Code/' is not allowed because the application is precompiled.

Solution:
If you get the same error, the solution is just deleting the App_Code folder on the IIS web site application. The error is actually self explaining and showing the solution.

Error: Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.

Solution:
Try to check web part maintenance page in case error webpart cause this issue.
How to open this page, please follow the below:
Type the string “?contents=1” at the end of the url of the page.

For example

http://mysite/pages/default.aspx?contents=1

The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Solution:
Check all the files mentioned files in the physical folders of the project.  There is a chance that some files would have deleted from file system.