Hi I have been trying to get the image manager (within the RadEditor) working correctly within my application but with no luck. I am trying to use a shared folder as the path for the images using a virtual folder configured in IIS but again with no luck but I don't understand why not. I have followed every guide I could find on this site but none of these seem to work. I have successfully configured the virtual directory and the account running the web page has access to the folder as I have used the following code and tried to change the folder to somewhere else and that gave me the javascript alert but my current setup does not.
The following gives no error but the upload button is greyed out on the deployed site.
string[] imagePath = { "/Images" };
whereas the following throws the javascript error saying it cannot access the directory but works on localhost when developing.
string[] imagePath = { "~/Images" };
private void FullPermissionsTest(string testPhysicalPath)
{
try
{
string physicalPathToTestFolder = System.IO.Path.Combine(testPhysicalPath, "TestDirectory");
System.IO.DirectoryInfo testDir = System.IO.Directory.CreateDirectory(physicalPathToTestFolder);// Create folder
testDir.GetDirectories();// List folders
string testFilePath = System.IO.Path.Combine(testDir.FullName, "TestFile1.txt");// test file paths
System.IO.File.Create(testFilePath).Close();// Create a file
testDir.GetFiles("*.*");// List files
System.IO.File.OpenRead(testFilePath).Close();// Open a file
System.IO.File.Delete(testFilePath);// delete the test file
System.IO.Directory.Delete(physicalPathToTestFolder);// delete the test folder
}
catch (Exception ex)
{// Show the probelm
string message = ex.Message;
string script = string.Format("alert('{0}');", message.Replace("'", @""""));
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "KEY", script, true);
}
}
I have attached a screenshot of the setup of my virtual folder please could someone help with this as it is currently holding up go live of a project.