# Wednesday, August 31, 2005

[http://www.opera.com/pressreleases/en/2005/08/30/]
It's been ten years: Ten years of innovation and ten years of gratitude to Opera users. Today, Opera Software ASA gives back to its community.

Opera just launched its online party. As a sign of gratitude for the community's continuing support, Opera will give away complimentary registration codes for 24 hours. At the party site, people can also chat with Opera employees (including the CEO and CTO), play games, check out the history of the Opera browser, download music made by employees and send in their greetings. In addition, people can check out what happened at midnight at Opera's anniversary party
[...]

http://my.opera.com/community/party/reg.dml

Wednesday, August 31, 2005 9:06:58 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, August 11, 2005
OIS

For years I used ACDSee 3.0. It always remembered me of the days of Windows 95/NT 4.0. That is the past now.

Deep deep in your file system there lies a neat tool that does the job very well. The only problem I did not recognize that its even there for years. After i found it, and yes also liked it. I decided to use it and added the missing part to integrate the Office Picture Manager into daily work. Context menu integration:



Here ist the reg-file:
REGEDIT4

[HKEY_CURRENT_USER\Software\Classes\Folder\shell\Browse Pictures ...\command]
@="\"C:\\Program Files\\Microsoft Office\\OFFICE11\\OIS.exe\" \"%1\""


 

Thursday, August 11, 2005 1:01:05 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, August 10, 2005

Carefully said I do not like that sharepoint "hijacks" the Internet Information Server. When you create a virtual directory it is just not accessable because SharePoint took over IIS.

Funny fact: This is the second post how to fix issues with IIS and "extension" that cause issues :-)

So i decided to hack a small utility serving my needs:

ExcludeFromSharepoint.zip (3.46 KB)

Enables to exclude applications from sharepoint services through the directory context menu.
Install using the "-install" switch; Uninstall using "-uninstall" switch.

Because I'm running my machine under a LUA (Limited User Account) i wrote the tool in a way that you can install and uninstall it without administative rights - the contextmenu will be installed per user!

if(args[0]=="-install")

{

    RegistryKey _rkey = Registry.CurrentUser;

    _rkey = _rkey.OpenSubKey("SOFTWARE\\Classes",true);

    _rkey = _rkey.CreateSubKey("Folder").CreateSubKey("shell");

    _rkey = _rkey.CreateSubKey("Exclude from Sharepoint");

    _rkey = _rkey.CreateSubKey("command");

    _rkey.SetValue(null, App.Application.ExecutablePath + " \"%1\"");

}

else if(args[0]=="-uninstall")

{

    RegistryKey _rkey = Registry.CurrentUser;

    _rkey = _rkey.OpenSubKey("SOFTWARE\\Classes\\Folder\\shell",true);

    _rkey.DeleteSubKeyTree("Exclude from Sharepoint");

}

else

{

...

}

 

The Implementation works with the webserver extensions version 4.0 or higher

 

    RegistryKey _rkey = Registry.LocalMachine;

    _rkey = _rkey.OpenSubKey("SOFTWARE\\Microsoft\\Shared Tools\\" +

        "Web Server Extensions",true);

   

    foreach(string _subKeyName in _rkey.GetSubKeyNames())

    {

        try

        {

            int.Parse(_subKeyName.Replace(".",""));

            RegistryKey _fpKey = _rkey.OpenSubKey(_subKeyName,true);

            _fpDir = (string)_fpKey.GetValue("Location");

        }

        catch(Exception _ex)

        {

            string _err = _ex.ToString();

            break;

        }

    }

 

and uses the stsadm.exe from the shared tools of the server extensions.

    System.Diagnostics.Process _p = new System.Diagnostics.Process();

    _p.StartInfo.FileName = Path.Combine(_fpDir, "BIN\\stsadm.exe");

    _p.StartInfo.Arguments = "-o addpath -url http://localhost/" +

        _strProjectName + " -type exclusion";

    ...

    _p.Start();

 

ASP.NET | C# | Indigo | Misc | Projects | Security | WebServices
Wednesday, August 10, 2005 5:43:48 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

I develop with 1.1 and 2.0 - When VS 2003 creates a web solution it is configured to use the 2.0 runtime. Placeing the following code to the Global.asax's of your 1.1 projects and setting execute permissions on the aspnet_regiis.exe helps much.

protected void Application_Start(Object sender, EventArgs e)

{

      if(System.Environment.Version.Major==2)

      {

            System.Diagnostics.Process _p = new System.Diagnostics.Process();

            _p.StartInfo.FileName = "%WINDIR%\\Microsoft.NET\\Framework\\v1.1.4322\\aspnet_regiis.exe";

            _p.StartInfo.Arguments = "-s W3SVC/1/ROOT" + Request.ApplicationPath;

            _p.StartInfo.UseShellExecute = false;

            _p.StartInfo.RedirectStandardOutput = true;

            _p.Start();

      }

}

 

ASP.NET | C# | Misc
Wednesday, August 10, 2005 11:56:11 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
I got an E-Mail from a student this morning asking how to thumbnail an uploaded image. Here is a "quick" solution (there are a few things you can do to increase quality, set JPEG compression factor or keep gif transparency). If you like to dig deeper have a look at one of the articles i wrote for the DotNetPro magazine's #Talk column (dnp0305_Thumbnail.pdf [German])

 

<%@ Page Language="C#" %>

 

<script runat="server" Language="C#">

 

    public void UploadFile(object sender, EventArgs e)

    {

        System.Drawing.Image _img =
             System.Drawing.Image.FromStream(
             this.InputTypeFile.PostedFile.InputStream);

 

        int _maxWidth = 100;

        int _maxHeight = 100;

 

        int _width = _img.Width;

        int _height = _img.Height;

 

        string _filename =

              System.IO.Path.GetFileName(

              this.InputTypeFile.PostedFile.FileName);

           

        string _uploadPath = System.IO.Path.Combine(

            Server.MapPath(".\\upload\\"),

            _filename);

       

        if (_width > _height)

        {

            width = Math.Abs((int)(height *

                        _img.Width /

                        _img.Height));

            _height = _maxHeight;

        }

        else

        {

            _height = Math.Abs((int)(_maxWidth *

                        _img.Height /

                        _img.Width));

            _width = _maxWidth;

        }

       

        System.Drawing.Image _newImg =

            _img.GetThumbnailImage(width, height, null, null);

           _newImg.Save(_uploadPath);

           _img.Dispose();

    }

 

</script>

<body>

    <form id="form1" runat="server">

 

    <input id="InputTypeFile" type="file" runat="server" />

    <asp:Button ID="Submit" OnClick="UploadFile" Text="Upload" />

 

    </form>

</body>

</html>

ASP.NET | C# | Misc
Wednesday, August 10, 2005 10:41:33 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Monday, August 08, 2005
You Are an Espresso
At your best, you are: straight shooting, ambitious, and energetic At your worst, you are: anxious and high strung You drink coffee when: anytime you're not sleeping Your caffeine addiction level: high
Monday, August 08, 2005 2:13:41 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, August 04, 2005

Like Christian Weyer and Damir Tomicic I like the word Indigo more than "WCF" and just read that Kenny will continue to refer to it as “Indigo” for a little while.

 

Indigo | Misc
Thursday, August 04, 2005 11:04:45 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, August 03, 2005

...And i was just Added :-)

 

Shinja Strasser is the head of the NET UG Usergroups. He is publishing a main feed for the members under http://blogs.netug.de/. Now he opend the main feed for a few guys of the german community.

Wednesday, August 03, 2005 2:28:14 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Monday, August 01, 2005

Boy, look at it - it's five now!

:-D 

Monday, August 01, 2005 1:30:41 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

First of all thank you to everybody who helped (Microsoft, INETA, S&S, E-Team...), spoke (Christian Weyer, Dirk Primbs, Achim Oellers, Dr. Holger Schwichtenberg) nad attended the event.

A few things learned:

  • Min. Session time is 60 min.
  • Print out the list of attendees ordereb by lastname ascending
  • Call restaurant to make sure the speakers diner will be served :-P

The feedback until now was very good and Stephan and I plan to do the ".NET Summit NRW 2006" next year. bigger, better, more

:-)

Monday, August 01, 2005 1:29:36 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  |