|
Article relates to
|
RadEditor 5.x - 7.x, RadEditor for ASP.NET AJAX
|
|
Created by
|
Rumen Zhekov
|
|
Last modified
|
2010/04/02
|
|
Last modified by
|
Rumen Zhekov
|
HOW-TO
Upload images and other files to a Shared Drive
SOLUTION
You will be able to upload any images located in a
virtual folder, which is a subfolder of the web application, hosting the editor. This means that you need to create a virtual directory that is a subdirectory of the web application folder, which will point to the physical folder located on the other PC. You also have to set the needed ASPNET/NETWORK SERVICE permissions to this virtual directory.
Here is an example that assumes that we have a domain environment and both computers are members of the same domain. The machine hosting the editor application must have IIS 6.0 installed. This scenario does not work with IIS 5.1.
The computer that we are sharing Images from is an XP Pro Operating system for example. Machine name “SharedImages”. Current user on that machine is
domain\User with password “
pass”.
We share a folder from that computer using a name “
test” with
Sharing permissions for the group “Everyone” from “domain” (not the local machine “everyone” group). We set the permissions for that group to “read” and we add another user that we will afterwards use from the server 2003 machine to authenticate with. In our example, this will be “
domain\user” with password “
pass”. We then move on to the
Security tab and add the “
everyone” group from “domain” and the “domain\user”. The “domain\user” can have higher access privileges (depending on the needs).
We move on to the Server 2003 machine which hosts our application. We open IIS 6.0 manager, and navigate to the application to which we need to set a virtual directory. Selecting the web application, right-click, select “New Virtual Directory”. Input the alias “test”, click Next, and enter the network path (UNC) \\SharedImages\test”. Click next and input the credentials of “domain\User” from machine “SharedImages” and the correct password (“pass”). To do this “uncheck” Always use the authenticated user’s credentials…….”. Click Next. Allow only the “Read” permissions from the Virtual Directory Access Permissions screen. (This will create a virtual directory, unlike had you selected the “Run Scripts (such as ASP) checkbox, which would have created a web application). Click Next and Finish. From the newly created virtual directory, you should be able to see the contents of the shared folder file://SharedImages/test by selecting the “test” virtual directory under your web application in the left navigation screen of the IIS manager.
Open the aspx/ascx file where the editor resides and input the new virtual directory ImagesPaths to point to your new virtual directory like this:
(RadEditor Classic)
<radE:RadEditor
id="RadEditor1"
Editable="true"
ImagesPaths="~/test"
UploadImagesPaths="~/test"
DeleteImagesPaths="~/test"
Runat="server">
</radE:RadEditor>
(RadEditor for ASP.NET AJAX)
<telerik:RadEditor
ID="RadEditor1"
Enabled="true"
ImageManager-ViewPaths="~/test"
ImageManager-UploadPaths="~/test"
ImageManager-DeletePaths="~/test"
runat="server" >
</telerik:RadEditor>
Save your page and open the editor page in your browser.
Note that this scenario applies if your web application is running on the 2003 server IIS 6 platform and are accessing a shared folder from another computer.
The following blog post by Rick Strahl and Telerik forum thread could be helpful to determine
the account that the application in running under and set the required permissions to it:
Understanding ASP.NET Impersonation Security
and
Virtual Directory.
Another approach for uploading files to physical and shared drives is shown in this KB article:
Using RadFileExplorer with physical and shared folder's paths
Please
Sign In
to rate this article.