Let us see how it goes…
SharePoint, DotNetNuke, .Net in general : Tips I would like to remember myself and like to share with you.


protected void Page_Load(object sender, EventArgs e)This would not run as NETWORK SERVICE. However, there is actually only one instruction that cannot be performed with NETWORK SERVICE privilege. It is the “CreateEventSource()”. The instruction to actually write an event, WriteEntry(), runs with no problem.
{
// Create the source, if it does not already exist.
if (!EventLog.SourceExists("hoge"))
{
//An event log source should not be created and immediately used.
//There is a latency time to enable the source, it should be created
//prior to executing the application that uses the source.
//Execute this sample a second time to use the new source.
EventLog.CreateEventSource("hoge", "Application");
// The source is created. Exit the application to allow it to be registered.
return;
}
// Create an EventLog instance and assign its source.
EventLog myLog = new EventLog();
myLog.Source = "hoge";
// Write an informational entry to the event log.
myLog.WriteEntry("hello world.");
return;
}
Nothing to do with work. Some video stuff.
Many probably knows about .fll (FLV Flash Video) file. I have got some movie files where there are some annoying discrepancy between image and sound.
I was bored today so tried to do something with it.
There is this famous Avidemux freeware with which you could fix this discrepancy. The latest is 5.2. It appears not yet nicely support the H264 video format.
When it finds that your file is in the format, it popups:
H.264 detected. If the file is using B-frames as reference it can lead to a crash or stuttering. Avidemux can use another mode which is safe but YOU WILL LOSE FRAME ACCURACY. Do you want to use that mode?
I am not at all an expert in this area, do not know what this means exactly, so went on accepting use of the "safe" mode. That appears fine. However, if you do not do what you want at this first time you open the file and close it. The popup would never come again and as the consequence, you can not open the file, unless you go to its conf file (in XML) and manually clear the history. This was the first difficulty that I encountered.
The second thing is the sound. To adjust the sound so it goes nicely, side-by-side with the video, of course you want to see the video together with the sound in its preview mode. I use a mac at home by the way. And the latest mac version of the freeware does not seem to allow me to listen to the sound.
I went back to a previous version, 4.4. Its handling of the sound device seems ok. Good! But then it does not yet support the audio format of my files!!!
So finally what I did was the following. I open each of those files with the latest, 5.2, change the audio data format to mp3, then turn to the 4.4 and shift the starting point of the sound.
A nice holiday activity.
Really strange thing happened.
One of our developer tried to do a print-friendly rendering of a page. That is, when you print the page, logo is removed, hyperlinks is followed by their URLs written etc. A usual stuff.
He did so using media="print" trick with CSS.
He made it work nicely with FireFox but not on IE. Still needs some improvement, to support various browsers. That's OK. Not my business.
The weird thing is that it behaves differently when you get the page, css everything via a proxy.
The simplest example. If I start Fiddler to see if all come from where they are supposed to, you see it already different in the print preview...
You would normally suspect that some element of the page such as a css file fails to come, due to some authentication/authorization issue for instance, when you go thru the proxy. But Fiddler reports none. The key, linked as media="print", css seems downloaded OK. If the elements are the same, whether or not via proxy, it should behave in the same way...
After almost one day of fruitless investigation, given up... Asked him to revise it, so it works OK with IE as well, and with or without a proxy.
Mmmm...