# Tuesday, May 31, 2005
public static bool IsWebInDebugMode
{
    get
    {
        bool _isDebug = false;
        

        if(HttpContext.Current.Cache["IsDebug"]==null)
        {
            XmlDocument _doc = new XmlDocument();
            string _cfgfile = HttpContext.Current.Server.MapPath("~/Web.Config");
                _doc.Load(_cfgfile);
            
            XmlNode _node = _doc.SelectSingleNode("configuration/system.web/compilation");

            if(_node==null || _node.Attributes["debug"]==null || 
               _node.Attributes[
"debug"].Value.ToLower()!="true")
            {
                _isDebug = false;
            }
            else
            {
                _isDebug = true;
            }
            HttpContext.Current.Cache.Insert("IsDebug", _isDebug, 
               
new System.Web.Caching.CacheDependency(_cfgfile), 
               DateTime.Now.AddDays(
1), 
               TimeSpan.Zero);

        }
        else
        {
            _isDebug = bool.Parse(HttpContext.Current.Cache["IsDebug"].ToString());
        }
        
        return _isDebug;

    }
}
ASP.NET | C#
Tuesday, May 31, 2005 3:45:03 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [12]  | 
# Monday, May 30, 2005
What Video Game Character Are You? I am a Defender-ship.I am a Defender-ship.

I am fiercely protective of my friends and loved ones, and unforgiving of any who would hurt them. Speed and foresight are my strengths, at the cost of a little clumsiness. I'm most comfortable with a few friends, but sometimes particularly enjoy spending time in larger groups.
(If I were not a Defender-ship you would be Pacman.)
What Video Game Character Are You?
Monday, May 30, 2005 5:33:45 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [14]  | 
# Monday, May 09, 2005

Via Willem Odendaal I opend the following web site http://www.squarefree.com/bookmarklets/forms.html#frmget. It holds an interesting collection of bookmarklets (Javascript commands that can be saved as bookmarks so they can be applied to every page that is opend in your browser).

For example: "remove MaxLength" ... shows how important it is to use ASP.NET Validation Controls in your Web Applications.

 

Monday, May 09, 2005 1:43:14 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [19]  | 

It's happening again. MichaelW and me are back on tour for TornadoCamp Xpress, the .NET 2.0 event of newtelligence. Today we started. We meet MichalK of Microsoft, he's a nice and smart guy, our local contact and I'm doing this post right in the middle of our C# 2.0 HOL.

I miss my familiy @ home - love ya! cu soon.

Cheers to the rest out there.

Event | Misc
Monday, May 09, 2005 1:21:00 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [18]  | 
# Thursday, April 21, 2005

While re-writing a few WebServices for .NET 2.0 i ran across following:

...
public static void WaitProc(object state, bool timedOut)
{
   MyAsyncResult myAsyncResult = (MyAsyncResult)state;
   myAsyncResult.OriginalCallback.Invoke(myAsyncResult);
}
...

This compiles without any problems in Visual Studio .NET 2003 but makes the compiler scream (Invoke cannot be called directly on a delegate) untill you change the lines to the following:

...
public static void WaitProc(object state, bool timedOut)
{
   MyAsyncResult myAsyncResult = (MyAsyncResult)state;
   myAsyncResult.OriginalCallback(myAsyncResult);
}
...

Thursday, April 21, 2005 2:12:24 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [18]  | 
If you have installed previous versions of Visual Studio 2005, such as Beta 1 or Community Technical Preview (CTP) builds of Visual Studio Team Suite, Visual Studio Standard or Visual Studio Professional, then you must uninstall the pre-Beta2 components in the exact order below before beginning to install any version of Visual Studio 2005 Beta 2.
  1. Go to the Control Panel and launch Add/Remove Programs
  2. Remove "Microsoft Visual Studio 2005 Professional" or other related IDE installs such as (Visual Studio Professional/Standard/Enterprise Architect/Team Suite, etc.)
  3. Remove "Microsoft SQL Server 2005 Express Edition"
  4. Remove "Microsoft SQL Server 2005 Tools Express Edition"
  5. Remove "Microsoft SQL Native Client"
  6. Remove "Microsoft Visual Studio 64bit Prerequisites Beta"
  7. Remove "Microsoft MSDN Express Library 2005 Beta"
  8. Remove "Microsoft Visual Studio Tools for Office System 2005 Runtime Beta"
  9. Remove "Microsoft Device Emulator 1.0 Beta"
  10. Remove "Microsoft .NET Compact Framework 2.0 Beta"
  11. Remove "Microsoft SQL Mobile 2005 Development Tools"
  12. Remove "Microsoft Visual J# Redistributable Package 2.0 Beta". If you receive an error message, see Note 1.
  13. Remove "Microsoft .NET Framework 2.0 Beta". If you receive an error message, see Note 2

Notes:
  1. If you see an error removing J# .NET Redistributable Package 2.0 from Add/Remove Programs, please run "msiexec /x {9046F10C-F5E7-4871-BED9-8288F19C70DF}" from a command line window
  2. If you see an error removing .NET Framework 2.0 from Add/Remove Programs, please run "msiexec /x {71F8EFBF-09AF-418D-91F1-52707CDFA274}" from a command line window
Thursday, April 21, 2005 11:05:12 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [14]  | 

Mozilla Suite and Firefox "favicons" LINK Code Execution Exploit

[...]a user clicks on a link, this code will create and launch the file c:\trojan.bat (on Windows).
On Linux and Mac OS X this code will create the file ~/trojan or /trojan[...]

Thursday, April 21, 2005 10:00:06 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [23]  | 
# Friday, March 25, 2005

:-)

Friday, March 25, 2005 2:22:20 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [13]  | 
# Wednesday, March 16, 2005

[Loren Halvorson]Microsoft recently released 1.0 of the Enterprise Library. I was curious how the Logging block stacked up to Log4net....[...]

Via Peter

Wednesday, March 16, 2005 10:08:35 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [12]  | 
# Tuesday, March 15, 2005

Miroslaw Maslyk has sent this small tutorial on how to use iFused with the FCKEditor. Thank you very much Miro ;-)

1. Rename file FCKeditor\editor\dialog\fck_image.html to fck_image.aspx.

2. On the top this file (fck_image.aspx) add this code:

<%@ Page Language="C#" %>
<%@ Register TagPrefix="Uploader"
 namespace="StaticDust.Web.UI.Controls"
 assembly="StaticDust.Web.UI.Controls.UploadDialog" %>
<script runat="server">
protected void Page_Load(Object source, EventArgs e)
{
   
StaticDust.Web.UI.Controls.UploadDialogButton _u =
     new StaticDust.Web.UI.Controls.UploadDialogButton();
   
_u.UploadDirectory = "~/images";
   
_u.ReturnFunction = "SetUrl()";
   
btnBrowse.Attributes["OnClick"] =
     "javascript:" + _u.JavascriptLink; }
</script>

3. Find btnBrowse input html tag , add runat="server" attribute and close tag (/>)

4. Replace in files FCKEditor\FCKeditor\editor\js\fckeditorcode_ie_2.js and fckeditorcode_gecko_2.js all fck_image.html sentence to fck_image.aspx

ASP.NET | C# | Projects
Tuesday, March 15, 2005 11:50:32 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [27]  | 
# Wednesday, March 09, 2005
Wednesday, March 09, 2005 10:59:20 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [16]  | 
Take the quiz: "Which American City Are You?"

New York
You're competative, you like to take it straight to the fight. You gotta have it all or die trying.

via Peter; via Sam

Wednesday, March 09, 2005 10:23:07 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [17]  |