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

RadEditor's ImageManager and virtual directories

1 Answer 113 Views
Editor
This is a migrated thread and some comments may be shown as answers.
headPropellerHead
Top achievements
Rank 1
headPropellerHead asked on 16 Feb 2011, 09:56 PM
Environment:
Visual Studio 2008, C#, Rad Controls for ASP.NET AJAX v.2010.3.1317.35

I am using RadEditor and trying to configure a virtual directory for the RadEditor.ImageManager.ViewPaths.

I have used IIS Manager to create a virtual directory called Email under my website. If I click on that virtual directory in IIS Manager I can see the files that exist in the respective physical location. I can open a web browser and browse to the virtual directory URL, i.e. http://localhost/<websitename>/Email.

I am setting the ImageManager ViewPaths property in codebehind:

 

string[] viewImages = new string[] { "~/Email" };

 

 

RadEditor1.ImageManager.ViewPaths = viewImages;

When I run the application in the development environment and open the ImageManager for RadEditor, there are no files available for selection.

If I create an Email folder under the website and point to that folder for the ViewPaths property, the files are available.

How should I configure virtual directory so that the ImageManager can see the files properly when running in the Visual Studio 2008 development environment,

Thanks for your help!

 

 

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 21 Feb 2011, 02:48 PM
Hello Russ,

This is a server problem not related to the FileBrowser dialogs. You should make sure that the Email folder is accessible as well as the files in it. You can use the code below for that purpose:

using System.IO;
...
protected void Page_Load(object sender, EventArgs e)
    {
        string resolvePath = Server.MapPath("~/Email");
        Response.Write("Images resolve to: " + resolvePath);
        foreach (string file in Directory.GetFiles(resolvePath))
        {
            Response.Write("<br/>File: " + file);
        }
    }

The following KB articles could be helpful for this scenario:

Using RadFileExplorer with physical and shared folder's
and
Uploading images and files to a Shared Drive.

Best regards,
Rumen
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Editor
Asked by
headPropellerHead
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or