We bought Q2 2012 SP1 (version 2012.2.724) to upgrade the old version. The primary purpose of the Telerik is to use the Radeditor as the WYSIWYG editor and manage file uploads. We'd been using old version for many years in the past and thought of upgrading due to new features and better browser support.
The default installation works ok in both dev and prodcution environment but wanted to use customprovider for all file uploads. The moment I switch to custom provider the Radedior File upload dialogs stars giving "Value Cannnot be null" erro intermittenetly. This happens only in production environement and the error pops up 50% of the time. When trying to expand the folder tree it hangs with the "rotating wheel animation" sometimes due to the same error.
Please help
Dev Environment: Windows 7 / IIS7 / Asp.NET 3.5
Production Environment: Windows Server 2008 / IIS 7 / Asp.Net 3.5
My sample code block is below.
The Error
Server Error in '/' Application.
Value cannot be null.
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.ArgumentNullException: Value cannot be null.
Parameter name: type
Source Error:
Stack Trace:
The default installation works ok in both dev and prodcution environment but wanted to use customprovider for all file uploads. The moment I switch to custom provider the Radedior File upload dialogs stars giving "Value Cannnot be null" erro intermittenetly. This happens only in production environement and the error pops up 50% of the time. When trying to expand the folder tree it hangs with the "rotating wheel animation" sometimes due to the same error.
Please help
Dev Environment: Windows 7 / IIS7 / Asp.NET 3.5
Production Environment: Windows Server 2008 / IIS 7 / Asp.Net 3.5
My sample code block is below.
protected void Page_Load(object sender, System.EventArgs e)
{
string[] sImagePath = new string[] {"/_Global/" + ModuleProperties.SiteID + "/img/content"};
radEdtContent.ImageManager.ViewPaths = sImagePath;
radEdtContent.ImageManager.UploadPaths = sImagePath;
radEdtContent.ImageManager.ContentProviderTypeName = typeof(myprovider).AssemblyQualifiedName;
}
public class myprovider : Telerik.Web.UI.Widgets.FileSystemContentProvider
{
public myprovider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag)
: base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)
{
}
public override string StoreFile(UploadedFile file, string path, string name, params string[] arguments)
{
//StoreFile method handles renaming of files if exists.
string fileExtention = name.Substring(name.LastIndexOf("."));
string fileNameWithoutExtension = name.Substring(0, name.IndexOf("."));
string newFileName = fileNameWithoutExtension + DateTime.UtcNow.Ticks + fileExtention;
string result = base.StoreFile(file, path, newFileName, arguments);
return result;
}
The Error
Server Error in '/' Application.
Value cannot be null.
Parameter name: type
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.ArgumentNullException: Value cannot be null.
Parameter name: type
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
|