Telerik;0x800a139e - JavaScript runtime error: ASP.NET Ajax client-side framework failed to load;0x800a1391 - JavaScript runtime error: 'Sys' is undefined

For Internet Explorer users getting the following error:


Problem:

Recently I encountered an issue, RadScriptManager started throwing the following errors:

0x800a139e - JavaScript runtime error: ASP.NET Ajax client-side framework failed to load.

0x800a1391 - JavaScript runtime error: 'Sys' is undefined


This issue is observed on IE 11 and doesn't appear on Chrome or Firefox Browsers.

Suggested solution:


I had below in my web.config. I removed runtimeversion2.0 and it worked well.


<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd"
                 type="Telerik.Web.UI.WebResource" verb="*"
                 preCondition="integratedMode,runtimeVersionv2.0"/>  




String was not recognized as a valid Boolean, System.FormatException: String was not recognized as a valid Boolean,Boolean parameter SQLDataSource,Setting up Boolean Value SQLDataSource InsertParameters

I had a SQLDataSource with insert parameters and one of which data type was set to Boolean. And I was setting the default value for insert parameters in code behind.

aspx code:
<asp:Parameter Name="bIsActive" Type="Boolean" />


I assumed that 1 or 0 would naturally be converted into Boolean when I did this:

SqlDataSource1.InsertParameters["bIsActive"].DefaultValue = c.Checked ? "1" : "0";


But instead I saw this:

String was not recognized as a valid Boolean.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: String was not recognized as a valid Boolean.
Fig 1: String was not recognized as a valid Boolean


ASP.NET can easily convert 1 and 0 (integer types), but struggles with Strings.

Solution:


I used True and False strings instead of 0 and 1.

SqlDataSource1.InsertParameters["bIsActive"].DefaultValue = c.Checked ? "True" : "False";

This Page Can’t Be Displayed Turn On TLS 1.0, TLS 1.1, And TLS 1.2,This page can't be displayed error,Cannot Access Some HTTPS Sites with Internet Explorer

For Internet Explorer users getting the following error:

This page can’t be displayed - Turn on TLS 1.0, TLS 1.1, and TLS 1.2
in Advanced settings and try connecting to https://websitename
again. If this error persists, contact your site administrator.
Change settings. 
This issue is observed on IE 11 and doesn't appear on Chrome or Firefox Browsers.


Resolution:


 Launch Internet Explorer | Tools (Alt+X on IE 11) | Options | Advanced and make sure the settings match those below: 


Access denied,Access denied saving files,Windows 7 Access Denied saving files, Windows 7 Cannot save files to Drive:,open text files as administrator

I have Windows 7 machine and have set myself as the Administrator. However, when trying to modify an XML file in Notepad and save the file, it states 'Access Denied!'. It will not save the file.



Below is the solution worked for me:

Step 1. Open the notepad application in elevated mode. This can be done by right click the Notepad icon from Windows > Click 'Run as administrator'.

Step 2. You can now edit and save that file in the same folder without any issues.



If you want to open the notepad elevated every time, then right click the Notepad shortcut icon > in 'shortcut' tab click on the 'Advanced' button > tick 'run as administrator'.



Win32Exception (0x80004005),Win32Exception (0x80004005) The wait operation timed out, The wait operation timed out,SQL Timeout expired
I was running an .NET console application that upon initial load pulls a list of items from a SQL server via a stored procedure. Within few seconds of loading the application, received the below error message:

Exception::System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out::Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.::.Net SqlClient Data Provider

Cause:
The problem was that the stored procedure took ~37 seconds to complete, which is slightly greater than the default timeout for a query to execute - 30 seconds. I figured this by executing the stored procedure manually in SQL Server Management Studio.

Resolution:
We need to set the CommandTimeout (in seconds) so that it is long enough for the command to complete its execution.

added the below line before filling the data adapter.
SqlCommand.CommandTimeout = 60; //60 seconds that is long enough for the stored procedure to complete.

Unable to connect to remote server,Unable to connect to remote server WebService, System.Net.WebException Unable to connect to remote server
I received the following error, while calling a Webservice from an ASP.NET application.

System.Net.WebException: {"Unable to connect to the remote server"}.

Cause:

The internet explorer had the settings of a company proxy server and the application's web.config had no defaultProxy element on it. If the defaultProxy element is empty, the proxy settings from Internet Explorer will be used.


Resolution:

Add the defaultProxy element in web.config and set useDefaultCredentials=true.

<system.net>
    <defaultProxy useDefaultCredentials="true" >
    </defaultProxy>
  </system.net>




Telerik Error Creating Control,Error Creating Control Failed to create designer, Telerik Design time error,RadControls
You’ll find this error from time to time when switching to Design View in Visual Studio to work with Telerik Radcontrols, especially after Upgrading to a new version of Telerik UI for ASP.NET Ajax.


Causes:

  • There is a GAC-reference for the Telerik.Web.Design assembly in the project and the      GAC has been updated. As a result, the Telerik.Web.Design assembly, referenced by the WebSite, does not exist in the GAC.
  • The reference to the Telerik.Web.UI assembly (either in Register directive or web.config, or Telerik http handlers/modules registrations in web.config) contains hard-coded version number which does not match the version of the Telerik assembly referenced in your project.
  • Open the application in a machine that doesn't have Telerik UI Installed.


Fortunately there are several ways to solve this problem:

  • GAC Deploy the required version of the Telerik.Web.Design.dll.

The Telerik.Web.Design assembly contains the Visual Studio designers of the controls. 
          Telerik.Web.UI.dll requires Telerik.Web.Design.dll of the same version in the GAC.
Use the command gacutil /i [path to Telerik.Web.Design.dll with latest version]

  • Bin-deploy the design-time assembly Telerik.Web.Design.dll

Remove Telerik.Web.Design.dll from the GAC
Copy Telerik.Web.Design.dll to the bin folder
          Restart Visual Studio

  • Bin-deploy the assembly Telerik.Web.UI.Skins.dll
Copy Telerik.Web.Skins.dll to the bin folder
          Restart Visual Studio
  • In web.config file, removing the specific version, Culture, and PublicKeyToken from the Telerik.Web.UI.WebResource.axd entry.

         Correct Syntax:
        <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*"   validate="false"/>

The second solution did the trick for me. Hopefully one of the above solutions will work for you.


After installing Visual Studio 2013 and opening my solution, I received the below error:

Configuring IIS Express failed with the following error:
Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.

The root problem was that the "My Documents" folder had setup to be on a network share, and the share was not accessible. Once I changed the "My Documents" folder location to a local folder (by modifying the registry value), it started working again.


Changing this key worked for me:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal


I know that this may not be a common scenario that you might run into, but I've posted it here because it gives the same symptoms.
Registry Editor




I had a requirement to use a .NET dll assembly that was built against version 'v2.0.50727'to reference to it in my .Net Framework 4.0 windows forms application.

After referencing the dll, compilation error occurred in the application - "are you missing a using directive or an assembly reference."

Reason: As the DLL is a CLR 2.0 runtime assembly, it cannot be loaded in the 4.0 runtime.


Solution:

You will need to set useLegacyV2RuntimeActivationPolicy to true in app.config file. This is required to use mixed mode CLR 2 assemblies(targeting version 2.0.50727 of the CLR), in a .NET 4 application.

<startup useLegacyV2RuntimeActivationPolicy="true">
   <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>



While attempting to export the crystal report on a terminal server, it resulted in the following run-time error:

"No export DLLs found".


This errors message appears because the application cannot find the export DLLs on terminal server environment.

Solution

I copied all the below export related dlls (U2*.dll) that are in C:\Windows\CRYSTAL Folder to C:\Windows\System32 Folder. The problem is very well solved.

Crystal Report Export Dlls

Dll NameDESCRIPTION
U2DAPP.DLLApplication destination
U2DDISK.DLLDisk file destination
U2DMAPI.DLLMAPI format (Microsoft Mail, Microsoft Exchange)
U2DNOTES.DLLLotus Domino destination
U2DPOST.DLLMicrosoft Exchange Public Folders
U2DVIM.DLLVIM destination
U2FCR.DLLCrystal Reports format
U2FDIF.DLLDIF format
U2FHTML.DLLHTML format See HTML under Additional Components for additional runtime information.
U2FODBC.DLLODBC data source
CRXF_PDF.DLLPDF format Replaces U2FPDF.DLL from version 8.See Page Ranged Export under Additional Components for additional runtime information.
U2FRDEF.DLLReport Definition format
U2FREC.DLLRecord format
CRXF_RTF.DLLRich Text FormatReplaces U2FRTF.DLL from version 8 and earlier.See Page Ranged Export under Additional Components for additional runtime information.
U2FSEPV.DLLComma Separated Values format
U2FTEXT.DLLText format
U2FWKS.DLLLotus 1-2-3 format
U2FWORDW.DLLMicrosoft Word for Windows format
U2FXML.DLLXML format
U2FXLS.DLLMicrosoft Excel format

SQL Errors and Solutions,The conversion of a varchar data type to a datetime data type resulted in an out-of-range value,SQL,SQL tips

SQL Server Error Message:

 The conversion of a varchar data type to a datetime data type resulted in an out-of-range value

This error occurs when the varchar value does not form a valid date.

Error Message:


Server: Msg 242, Level 16, State 3, Line 1

The conversion of a char data type to a datetime data

type resulted in an out-of-range datetime value.
 

Causes:

This error occurs when trying to convert a string date value into a DATETIME data type but the date value contains an invalid date. The individual parts of the date value (day, month and year) are all numeric but together they don’t form a valid date.


To illustrate, the following SELECT statements (all based on US date format MM/DD/YYYY)will generate the error:

SELECT CAST('02/29/2006' AS DATETIME) -- 2006 Not a Leap Year   

SELECT CAST('06/31/2006' AS DATETIME) -- June only has 30 Days   

SELECT CAST('13/31/2006' AS DATETIME) -- There are only 12 Months

SELECT CAST('01/01/1600' AS DATETIME) -- Year is Before 1753


Another way the error may be encountered is when the format of the date string does not conform to the format expected by SQL Server as set in the SET DATEFORMAT command. For example, in United

To illustrate, if the date format expected by SQL Server is in the MM-DD-YYYY (US date format) format, the following statement will generate the error:

SELECT CAST('31-01-2006' AS DATETIME)

Solution/Workaround:

To avoid this error from happening, you can check first to determine if a certain date in a string format is valid using the ISDATE function. The ISDATE function determines if a certain expression is a valid date. So if you have a table where one of the columns contains date values but the column is defined as VARCHAR data type, you can do the following query to identify the invalid dates:

SELECT * FROM [dbo].[Orders]
WHERE ISDATE([OrderDate]) = 1

Once the invalid dates have been identified, you can have them fixed manually then you can use the CAST function to convert the date values into DATETIME data type:

SELECT CAST([OrderDate] AS DATETIME) AS [Order Date]
FROM [dbo].[Orders]

Another way to do this without having to update the table and simply return a NULL value for the invalid dates is to use a CASE condition:

SELECT CASE ISDATE([OrderDate]) WHEN 0
THEN CAST([OrderDate] AS DATETIME)
ELSE CAST(NULL AS DATETIME) END AS [Order Date]
FROM [dbo].[Orders]

SQL Errors and Solutions,.NET Errors and Solutions,Unable to find the requested .Net Framework Data Provider. It may not be installed.,.NET

I got this error "Unable to find the requested .Net Framework Data Provider. It may not be installed." when I try to retrieve the data from SQL Server.

Reason:


Whoo!!

I had wrongly mentioned the Data provider name in my dll.

I had mentioned as

Conndll.ProviderName = "System.Data.Sqlclient" 'c in client should have been upper case letter

instead of

Conndll.ProviderName = "System.Data.SqlClient"