Welcome Guest Search | Active Topics | Sign In | Register

How to catch exception for inaccessible folder in FileExplorer Options
nkho
Posted: Monday, July 5, 2010 9:39:51 PM
Rank: Newbie
Groups: Member

Joined: 6/28/2010
Posts: 6


Hi all,

Currently I am using the EO.Web File Explorer feature. However, I notice that if I specify the remote path for root folder, some of the folders which are inaccessible will cause an error to the file explorer because the access to inaccessible folder is not caught properly.
Below is the error message:

EO.Web Controls Client Side Debug Message:
EO.Web control 'FileExplorer1_ctl01' error message: The callback on 'FileExplorer1_ctl01' has failed due to a server side exception. Click OK to see the exception message. (set ClientSideOnError to handle this error).

You can turn off this message by setting EO.Web.Runtime.DebugLevel to 0 (Not recommended for debug build).


Further error message:

[UnauthorizedAccessException: Access to the path '\\stp123\HRDpt\shared' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7712175
System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) +1923
System.IO.Directory.GetDirectories(String path, String searchPattern, SearchOption searchOption) +37
System.IO.Directory.GetDirectories(String path) +14



I tried to use the suggested 'ClientSideOnError' properties and realized that it detects the file instead of folder.
So would like to ask if there is a way to catch UnauthorizedAccessException for folder in the library of eo.web.dll and there is any event handler for us to detect once the folder is being clicked?

Thank You

Rgds
Nkho




eo_support
Posted: Tuesday, July 6, 2010 9:18:58 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Unfortunately there is no way for you to detect or handle such errors in the current version. You will always need to use an account that has sufficient access to the folders that you are browsing.

What we can do is to catch and handle this error in our code so that you will not receive the error message. The result is user will not see that folder/file if access is denied on that folder or file. Please let us know if this will work for you.

Thanks!
nkho
Posted: Tuesday, July 6, 2010 11:54:06 PM
Rank: Newbie
Groups: Member

Joined: 6/28/2010
Posts: 6
Yes, this will work for me. Can you please tell me how can I achieve that?

Please advise.

Thanks!
eo_support
Posted: Wednesday, July 7, 2010 8:28:42 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We will have to change our code to achieve that. : ) Give us a few days and we should be able to provide a new build to you with that change.

Thanks!
nkho
Posted: Thursday, July 8, 2010 12:24:53 AM
Rank: Newbie
Groups: Member

Joined: 6/28/2010
Posts: 6
Alright, thank you!
eo_support
Posted: Thursday, July 8, 2010 9:18:06 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We have posted a new build that addressed this issue. Please see your private message for download location.

This build will not throw out exception, however it still trigger a client side error message for certain tasks (such as create folder, rename folder, etc). If you wish to silence that message, you will need to handle the FileExplorer's ClientSideOnMessage event. It will be something like this:

Code: HTML/ASPX
<eo:FileExplorer ClientSideOnMessage="your_handler" ....>
...
</eo:FileExplorer>


Code: JavaScript
function your_handler(control, name, message, type, args)
{
    if (name == "server_call_failed")
    {
        //show your custom message...
        ....
    }
}


Hope this helps.

Thanks!
nkho
Posted: Sunday, July 11, 2010 11:05:23 PM
Rank: Newbie
Groups: Member

Joined: 6/28/2010
Posts: 6
Hi thank you for your ealier new build. It works fine.

Now I have found another problem which is I can't access the gridview control at .aspx.cs page if it appears inside splitter. However if it is outside splitter then it is accessible inside .aspx.cs page. Do you know why and is there anyway for me to access the gridview id inside .aspx.cs so that I can populate data into it?

Thank you
eo_support
Posted: Monday, July 12, 2010 9:51:22 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I am not sure what you mean by can not access the GridView control if it appears inside splitter. Can you provide a test page that demonstrates the problem? Also in the future you can start a new thread if the new question is not related to the old question.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.