1

Topic: Can't get logs working (.NET, IIS virtual directory)

Hello!
We've purchased both FileManager and ImageManager for .NET
We're developing the web application under Windows Vista, IIS 7, it is located in a virtual directory (not the site root).
We're experiencing some problems with URLs when previewing files & images, editing images and pasting links from ImageManager and FileManager into the TinyMCE editor itself.
We tried to debug those problems using logs, but we never managed to get them working. Here's part of our appSettings section:
<add key="log.enabled" value="true" />
<add key="log.level" value="debug" />
<add key="log.path" value="logs" />
<add key="log.filename" value="{level}.log" />
we've tried absolute filepaths for "log.path" as well.
Everyone has full permissions on the logs folder.
The problem is that the .log file never appears in the dicrectory.
What could be the reason?
Do we have to do something else to configure logging

Best Regards,
Anton Emelyanov

2

Re: Can't get logs working (.NET, IIS virtual directory)

The log file will appear ones something gets logged for example when you pick a file and insert it. If it doesn't get logged with the above settings then there is still some permission problem.

Best regards,
Spocke - Main developer of TinyMCE

3

Re: Can't get logs working (.NET, IIS virtual directory)

We try inserting files, editing images and all that.
Everyone has full permissions on the folder.
Could it be something else?
Are the permissions problems for log files written anywhere like to the System Event Log (could not find them there actually)?
Could there be a problem with Windows Vista, UAC, IIS 7 or the fact that application is in a virtual directory?
When we use relative paths for log file path will it search for the subfolder we point to in the plugin folder?

4

Re: Can't get logs working (.NET, IIS virtual directory)

The logs are written to imagemanager/logs. This directory should have the NETWORK_SERVICE group with write access. The logging should always work regardless of virtual directories just use the default config set log.enabled=true and log.level=debug and click on a file.

Best regards,
Spocke - Main developer of TinyMCE

5

Re: Can't get logs working (.NET, IIS virtual directory)

Full permissions for everyone and specifically for NETWORK_SERVICE on all the Logs folder we've found smile
We've tried a different machine, no result
We also tried to put the application into the web server root (inetpub\wwwroot) - it solved the problems we tried to solve with the URLs, but no logging again. We've enabled full access to everyone to every file and folder on the machine
what about the "general.error_log" setting. Should we care for it?

6

Re: Can't get logs working (.NET, IIS virtual directory)

You should only need to add the proper user rights no other changes. That log will then tell you how to configure the preview.wwwroot setting.

Best regards,
Spocke - Main developer of TinyMCE

7

Re: Can't get logs working (.NET, IIS virtual directory)

Full permissions for everyone enabled on everything from the disk root.
Are the source codes available so that we could debug that?
Or you may advise another way of debugging?

8

Re: Can't get logs working (.NET, IIS virtual directory)

The logging should work. Add the NETWORK_SERVICE group it's not part of the "everyone" group.

Best regards,
Spocke - Main developer of TinyMCE

9

Re: Can't get logs working (.NET, IIS virtual directory)

We did that explicitly for NETWORK SERVICE, too.
Sorry for bothering, we just really need that working. Very nice tools, wish to use them in our projects...
Little thingies like this make that a bit hard...

10

Re: Can't get logs working (.NET, IIS virtual directory)

I've never seen a similar case where it's not possible to get it to write the files correctly. Are you using a NAS or SMB share for your files and have that mapped in the IIS? Tell me more about your environment.

Best regards,
Spocke - Main developer of TinyMCE

11

Re: Can't get logs working (.NET, IIS virtual directory)

No, everything is pretty simple. It's a developer machine under Windows Vista with IIS 7, no domain (active directory), no network shares.
We just added a piece of code to the same application which creates a file in the logs directory and writes to it.
It did it successfully.
So it is not a permission problem.
Could we receive a debug binary which writes such errors to the system log or the source codes?

12

Re: Can't get logs working (.NET, IIS virtual directory)

I basically has a similar setup. I use IIS 7 on Vista Enterprise 64-bit and it writes the files correctly. However I needed to add the "users" group so it would write since when logged in as a normal user it will use NT/Challange reponse to auth as your user account not the NETWORK_SERVICE user.

We could send you a debug build but I don't think it's required.

Best regards,
Spocke - Main developer of TinyMCE

13

Re: Can't get logs working (.NET, IIS virtual directory)

We do not use impersonation.
We've seen that it used NETWORK SERVICE to create that code-made file (NETWORK SERVICE became the file owner). Does your product use any other account than the ASP.NET application it runs in?
Will that debug build help? Will it give us information on the exception that occurs when writing logs?

14

Re: Can't get logs working (.NET, IIS virtual directory)

No, it uses the standard user that is setup for the .NET runtime. Check what user the .NET application pool is using. Check this screen shoot for details: http://screencast.com/t/9xKiJSyE8JL

The debug build will not display any errors since it checks for the write access gracefully and ignores any write errors if they occur.

Best regards,
Spocke - Main developer of TinyMCE

15

Re: Can't get logs working (.NET, IIS virtual directory)

Of course we checked the application pool identity
It's network service
If not the debug build, what may help ? smile

16

Re: Can't get logs working (.NET, IIS virtual directory)

Can you create directories inside the application? Or is all write access disabled for everything?

Best regards,
Spocke - Main developer of TinyMCE

17

Re: Can't get logs working (.NET, IIS virtual directory)

From any programmable part of application we may do ANYTHING to the file system because we've opened everything to network service
We've also just tried creating folders via ImageManager. Everything works fine.
May be a piece of code which creates the log file would help us?

18

Re: Can't get logs working (.NET, IIS virtual directory)

Hmm strange... Could you send me the exact config options you use for the logger? It's like it's not enabled. Also remember that web.config files inherit from each other so if there are multiple ones in a site they might over ride each other.

Best regards,
Spocke - Main developer of TinyMCE

19

Re: Can't get logs working (.NET, IIS virtual directory)

We tried very different options with similar results. We tried (inside of appSettings) like this:

<add key="log.enabled" value="true" />
<add key="log.level" value="debug" />

and like this:

<add key="log.path" value="D:\BG_Redesign\web\Scripts\tiny_mce\plugins\filemanager\logs\" />
<add key="log.enabled" value="true" />
<add key="log.level" value="debug" />

and like this:

<add key="log.path" value="logs" />
<add key="log.enabled" value="true" />
<add key="log.level" value="debug" />

and setting values via session variables.
The same result with every variant.

20

Re: Can't get logs working (.NET, IIS virtual directory)

Anything else we may do here?
Or should we just give up? smile

21

Re: Can't get logs working (.NET, IIS virtual directory)

I can't reproduce the problem, never seen it before so. But since very thing else except logging seems to work you could send me all relevant paths so I can try to figure out it manually how to configure it.

I guess the preview.wwwroot might be: D:\BG_Redesign\web

Best regards,
Spocke - Main developer of TinyMCE

22

Re: Can't get logs working (.NET, IIS virtual directory)

Hello! Have there been similar problems reported regarding logging?
We still cannot get File&ImageManager working properly on every case with virtual directories and we haven't managed to generate a single log ever.

23

Re: Can't get logs working (.NET, IIS virtual directory)

We turned on auditing on the Logs folder and see no actions - successful or failed. Nothing is trying to write there.

24

Re: Can't get logs working (.NET, IIS virtual directory)

If it doesn't write logs it doesn't have write access to the files or the web.config isn't configured correctly.

Best regards,
Spocke - Main developer of TinyMCE

25

Re: Can't get logs working (.NET, IIS virtual directory)

I canot create folders,can upload ,can insert images but canot edit images in imagemanager in context menu.Try to see my log files canot work .I have installed in a joomla website with godaddy windows shared hosting.Please anybody help?