OK, this one is really strange and I cannot explain it at all. Just to set up the environment, I'm using ASP.NET 2.0 and the latest version of FCKEditor (2.4.3) running on IIS6 (Windows 2003 SP2).
I have built a CMS system for a bunch of web sites. Its a little complicated but I will hopefully be able to explain it. I have one folder that multiple domains are assigned to in IIS. That folder has inside it the code for the web site, CMS, FCKEditor, etc. Also the folder for the userfiles are all located in a folder named uploads. Inside that folder uploads is a folder for each web site. Inside the code it looks at the domain name and then determines which web site it is and assigns the users to the correct folder inside of uploads.
Here is what it looks like:
/root /bin /fckeditor /uploads /site1 /site2
So when you go to http://www.example1.com, it looks in the database and see that the site is assigned to folder /site1/ and sets it via the session variable. I'm using the below and it works great.
protected override void OnInit(EventArgs e) { //Some SQL Code Here and variables here...removed to save space Session["FCKeditor:UserFilesPath"] = "/uploads/" + clubFolder + "/"; }
Now here is my problem. I have ran into a situation where I cannot create a new domain (or subdomain) for every website. Instead, this place wants to use the one domain http://www.example2.com and each website is defined by its first directory. So http://www.example2.com/one/ and http://www.example2.com/two/ are two different sites each with their own folder to save stuff in.
So what I did on the server so I didn't have to have 18 copies of my application laying around I defined the root application and then inside that I created a virtual directory that points to my application. Simple enough, should work great. But now that my application is inside a virtual directory it seems to ignore the UserFIlesPath variable. Here is what it looks like.
/root /bin /fckeditor /uploads /site1 /site2 /one <--This is the virtual directory which points back to /root /two <--This is the virtual directory which points back to /root
Although I know the session variable is getting set (as I can write it out), it completely ignores it. I have also searched high and low on the forums and tried these settings also:
System.Configuration.ConfigurationManager.AppSettings["FCKeditor:UserFilesPath"] = "/uploads/" + clubFolder + "/"; System.Configuration.ConfigurationSettings.AppSettings["FCKeditor:UserFilesPath"] = "/uploads/" + clubFolder + "/"; Session["FCKeditor:UserFilesPath"] = "/uploads/" + clubFolder + "/"; Application["FCKeditor:UserFilesPath"] = "/uploads/" + clubFolder + "/"; Session["FCKeditor:UserFilesAbsolutePath"] = "/uploads/" + clubFolder + "/";
But none of them seem to make a difference at all. Any suggestions?
Richard
Re: File Browser Issues - ASP.NET 2.0
So, you should make things work under the same application. As /one is pointing to root, I think you are able to set the editor BasePath to /one/fckeditor/, not /fckeditor/. You may also try to set it to ~/fckeditor/ to see if it works.
I hope that helps you.
FredCK
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: File Browser Issues - ASP.NET 2.0
So instead, I have recompiled the ASP.NET dll to include some code to pick the right folder instead by checking the database for the right code.
Thanks,
Richard