Sebastian's WebLog

.NET Architecture & Technologies

March 2004 - Posts

Let the party get started!

Found on Frank's blog: ASP.NET Overtakes JSP and Java Servlets

I was really surprised about ColdFusion -  but Lotus is very interesting too: 19,000 loyal customers! Congrats!

The Alt-Click Trick

.. pressing Alt and Mouse-Click on a word or a marked phrase in Word 2003 will open a search dialog on the right screen side. There you are able to use dictionaries, thesauruses etc.. This dialog can freely be extended with other services. - Did you know? (taken from Microsoft's SharePoint Developer Tour FFM)

Switching E-Mail Clients regularly is my Hobby!

March 20th, Saturday night, 11:53 PM - It's time to change the E-Mail client. I don't know why but it happens every year. Do you remember Groundhog Day with Bill Murray? However, it's something like this ...

As I woke up this morning I got this feeling: that will be my personal email day 2004. The whole day I was afraid of upcoming pain converting tons of mails from client A back to client B. Do they have a common export/import format? What about the good old German special characters? (Last time I lost them to ³$§%~~ ....) But I had a plan: Last year I tried it via IMAP using account at my ISP. But it crashed and crashed and crashed .. dumb idea to move 2 or 3 GB over the Internet back to my machine. Years before I did it via export and import but this IMAP way seemed to be much efficient. I googled around to find a IMAP server for windows. I took first best download, installed server (don't ask me which software I've installed ...) and connected to from both clients (old and new) AND..... wow - it works! Just installed server from ???, no settings, no readmes.txt - it's running out of the box. (I should take a closer look at this software later, but I guess that's not Exchange because download was only a few MB large ;-)).

Now all emails are moved - All? No - not all! Last folder crashed ... but that's OK, because it's the Darwin Effect cleaning up my emails every year.

How often do you change your email client? (BTW: I'm really glad that time is over when I changed the operating system every year - no joke! :-))

 

CeBIT 2004

... back from my one day visit in Hannover. You'll find some images on my homepage -- see who's drinking red wine at the expense of  Hanser Verlag :-)

.NET User Group Rhein/Main sucht Gründungsmitglieder

Es tut sich was im Raum Rhein/Main, siehe http://www.entwickler.com/itr/news/psecom,id,14146,nodeid,82.html bzw. gleich http://www.dotnet-rheinmain.de/ !

Two Lines of Code - Installing Windows Services w/o InstallUtil.exe

After long time of browsing the web I finally found an article describing how to install/uninstall a service with only two lines of code.

Install:

String []installParams= {filename};
System.Configuration.Install.ManagedInstallerClass.InstallHelper(installParams);

Uninstall:

String []installParams= {"/u", filename};
System.Configuration.Install.ManagedInstallerClass.InstallHelper(installParams);

You have to add System.Configuration.Install reference manually.

Please have a look at Roaan's article at SA Developer http://www.sadeveloper.net/viewarticle.aspx?articleID=49 for further information about logging and stack output.

Which version control system do you use?

I'm looking for a (new) version control system supporting multiple locations (via replication) and full VS.NET integration.

What are you using?
- SourceSafe
- CVS
- ClearCase
- BitKeeper
- Perforce
- ???

Is it true that Microsoft is working on a SourceSafe replacement?

Three Dirty Steps to Fix UI Process Bug

In a prior post I told about the Incredible Bug in Microsoft's User Interface Block and I've linked to a bug fix from Steve. The following solution is Steve's solution. I've wrapped it up in a more colored style :-)

The actual release has a problem when application runs in web root and not in a virtual directory, as you can see in next line:

HttpContext.Current.Response.Redirect( HttpContext.Current.Request.ApplicationPath + "/" + viewSettings.Type + "?" + queryString, true );

A root context Request.ApplicationPath will return "/" and the expression above tries to redirect to "//MyView.aspx?...".

In order to fix this bug you have to follow these three steps:

1. Fix ActivateView-Method in WebFormViewManager.cs

// Old implementation:
if (previousView == null )
  HttpContext.Current.Response.Redirect( HttpContext.Current.Request.ApplicationPath + "/" + viewSettings.Type + "?" + queryString, true
);
else
  HttpContext.Current.Response.Redirect( HttpContext.Current.Request.ApplicationPath + "/" + viewSettings.Type + "?" + queryString, false
);

// New implementation:
string
path = HttpContext.Current.Request.ApplicationPath;
if
(path == "/")
  path = "";

if( previousView == null )
  HttpContext.Current.Response.Redirect( path + viewSettings.Type + "?" + queryString, true
);
else
  HttpContext.Current.Response.Redirect( path + viewSettings.Type + "?" + queryString, false
);

Of course, you can replace the last if-Statement by a single line by replacing true and false with the expression previousView == null ...

2. Fix IsRequestCurrentView-Method in WebFormViewManager.cs

// Old implementation:
string viewType = page.Request.CurrentExecutionFilePath.Replace(page.Request.ApplicationPath + "/", "");

// New implementation:
string path = page.Request.ApplicationPath;
if (path != "/")
 
path = "";

string
viewType = page.Request.CurrentExecutionFilePath.Replace(page.Request.ApplicationPath + path, "");

3. Add leading "/" in Web.config

The third and maybe the most problematic step is to add leading slashes in Web.config file for view paths. It might be problematic because you have to take care about your UI-Process Version and the underlying Web.config definitions otherwise the application crashes in a virtual directory and in a root context.

// Old:
<views>
  <view name="Homepage" type="default.aspx" controller="Default" />
</views>

// New:
<views>
  <view name="Homepage" type="/default.aspx" controller="Default" />
</views>

To-do
Unfortunately I didn't have a closer look at the sources but there should be a solution without editing the web.config files. It's never good to change an interface and also to change configuration specification ...

.NET User Group in Duesseldorf/Cologne, Germany

I'm looking for an active(!) .NET user group in Duesseldorf/Cologne, Germany but I could only
find the www.devgroup-ruhrpott.net in Essen (which is too far away from cologne).

So I'm thinking about founding a new one -- anyone else interested in? It would be really
great to find other developers supporting this idea!

Where are you? Please post your comments and let's start a new User Group right now!

More Posts