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.

Wednesday 30 November 2011

Configuration Error (Unrecognized attribute ‘Type’) Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Solution: Sharepoint site is pointing to ASP.NET framework 1.1. The fix will be adjust it back to ASP.NET framework 2.0


There was an error encrypting or decrypting credentials. Either a credential update is currently being performed, or you must update the farm account credentials on this server before you can perform this task.

Solution:
   Steps:.
1.  Open SharePoint 3.0 Central Administration, click Operations, and then click Timer job definitions under Global Configuration.
2. Verify that the Administration Application Pool Credential Deployment job definition is no longer displayed in the list. 
3. Delete the Administration Application Pool Credential Deployment job definition, if it is still available.

Server Error in '/' Application. The control with ID 'RadTextBox1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

Solution: This error occurs when you have added a control from RadControls for ASP.NET AJAX to a page which does not contain a ScriptManager control. To resolve that error please add a ScriptManager control to your page:

[ASPX] Add the following line in the Master Page using Sharepoint Designer 2007.
<asp:ScriptManager ID="ScriptManager1" runat="server" />   

Error - Attempted to perform an unauthorized operation while deploy SharePoint solution.

Reason: The possible problem is that you are trying to deploy solution on a site to which you don't have authorization to deployment.
Solution: Go to Central Administration and then select Sharepoint-80 site then finally add your name as Secondary Administrator for that site.

Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.

Solution: 1. Include assembly namespace in aspx page.
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="asp" %>
2. If your control is right on your main page, chances are you have already done this.  But in my case the Ajax control was embedded in a user control, so I didn’t have it on the main page yet.
Then you can simply include the manager by changing the standard script manager
<asp:ScriptManager ID="scriptMaster" runat="server"></asp:ScriptManager>
to this:
<asp:ToolkitScriptManager ID="toolkitScriptMaster" runat="server">
</asp:ToolkitScriptManager>

The project file cannot be opened. The project type is not supported by this installation.

Open .csproj and edit the <ProjectTypeGuids> in that file.
<ProjectTypeGuids>{9E5D3E2D-E4E2-418e-8D80-2F0DA9A94F9A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Need to be changed like
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The system cannot find the file specified

Solution:
Please make sure that the 'Telerik.Web.Design.dll' file is present in your project's bin folder.

Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration. ScriptingScriptResourceHandlerSection'

Simply add to web.config

<assemblyBinding> 
  <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
  <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
  <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
  </dependentAssembly>
  <dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
   <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
  </dependentAssembly>
</assemblyBinding> 

Invalid character error from ScriptResource.axd

Solution:
Step 1: Turn off ScriptCombining on the ToolkitScriptManager
<ajaxToolKit:ToolkitScriptManager CombineScripts="false"  id="tkScriptManager" runat="server"></ajaxToolKit:ToolkitScriptManager>
Step 2: Turn off script compression
<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="false" enableCaching="true"/>
</scripting>
</system.web.extensions>