This is a migrated thread and some comments may be shown as answers.

Custom FileBrowserContentProvider

5 Answers 231 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Denny
Top achievements
Rank 2
Denny asked on 10 Jul 2008, 03:56 PM
Hi, I am trying to create a Custom FileBrowserContentProvider in order to link to our db file system. On image manager, everything seems ok,  it can retrieve directories, upload images, preview images and even altering the image in the image editor. However when i try to save as thumb nail, it throws javascript error. 

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.

I double check and it can save when running the image editor without the Custom  FileBrowserContentProvider. Is there something i have missed?

development environment:

VS2008
IIS7
ASP.NET 3.5
IE 7

Best Regards,

Denny Wong

5 Answers, 1 is accepted

Sort by
0
Axe
Top achievements
Rank 1
answered on 13 Jul 2008, 02:58 AM

Denny, what version are you running? I noticed this same problem with SP1 (2008.1.515.35??? - I think) then got SP2 (2008.01.0619.35) and it was fixed. I noticed this on the DB File Browser Content Provider example. It wasn't working then it was after the update. If Telerik can confirm this was a fix. I looked at release history and maybe had something to do with point 12 - "Fixed the DialogHandlerUrl editor property to accept application relative paths

As this thread is on a similar path (pun not intended) I am getting javascript error on a custom FileBrowserContentProvider used for non-virtual paths for the image editor when trying to save new edited image, however I only get this error when I use the custom FileBrowserContentProvider in a DialogOpener and not within the editor itself. The error is - "Sys.WebForms.PageRequestManagerServerErrorException: '/OTLS/Handler.ashx?path=Images/304895625_39084d0205_o.jpg' is not a valid virtual path."

Don't know if it helps but the the javascript function that throws the error is:

function Sys$WebForms$PageRequestManager$_endPostBack(error, response) {  
        // DevDiv Bugs 130268: There could have been a 2nd request that started while this one was being  
        // processed. Detect this by comparing the request for the current response to the _request field,  
        // which stores the latest request that has begun. If they are different, do not clear the state  
        // data that will be required by the 2nd request's response.  
        if (this._request === response.get_webRequest()) {  
            this._processingRequest = false;  
            this._additionalInput = null;  
            this._request = null;  
        }  
 
        var handler = this._get_eventHandlerList().getHandler("endRequest");  
        var errorHandled = false;  
        if (handler) {  
            var eventArgs = new Sys.WebForms.EndRequestEventArgs(error, this._dataItems, response);  
            handler(this, eventArgs);  
            errorHandled = eventArgs.get_errorHandled();  
        }  
        // DevDiv Bugs 130268: See above  
        if (!this._processingRequest) {  
            this._dataItems = null;  
        }  
        if (error && !errorHandled) {  
            // DevDiv 89485: throw, don't alert()  
            throw error;  
        }  
    } 

Is there any workaround for this?

Regards
Axe
0
Denny
Top achievements
Rank 2
answered on 15 Jul 2008, 08:43 AM
Hi Alex, thanks for the suggestion, I was running 1.0415.35. I have just upgraded to the latest 1.619.20, and the problem still there. So is the saving in the Image editor work for you when using CustomFileBrowserContentProvider?
0
Axe
Top achievements
Rank 1
answered on 15 Jul 2008, 05:23 PM
Hi Denny

Yes I have it working but only when used as a dialog of an editor not as a standalone DialogOpener.
Where are you sourcing your images from?
Mine is from a folder behind the web app root and although it took a bit or trial and error I got it working. I can post some code but it's 3:20am and I gota get some sleep before work in a few hours. If you can leave some detail of where you are getting images from it may help.

Regards
Alex
0
Denny
Top achievements
Rank 2
answered on 16 Jul 2008, 08:52 AM
Hi Alex

All images are getting from database. The problem I have is that everytime after i alter the image thru the image editor and click save, it get hits on the javascript error before it reach my custom provider codes, but other methods like delete, upload, preview in the image manager work just fine. One thing i havn't tried which i might do when i get back to office is that, we are running the editor on IIS7 with intergrated mode instead of classic mode. I know that the Progress bar for the RadUpload is not supported in intergrated mode but not sure if this is the case for the image editor. Will get you informed once I have tested it.

Denny
0
Axe
Top achievements
Rank 1
answered on 16 Jul 2008, 11:22 AM
Hi Denny

I tried the DB File Browser Content Provider sample on IIS7 and it works fine and I also tried my FileBrowserContentProvider and it worked as well.
I have only tried the 3.5 version of the assembly though. I would suggest trying the sample on your machine through IIS to see what result you get. If it works then you can rule out any bugs in the Telerik assembly.

Regards
Alex
Tags
Editor
Asked by
Denny
Top achievements
Rank 2
Answers by
Axe
Top achievements
Rank 1
Denny
Top achievements
Rank 2
Share this question
or