June 2005 - Posts

whats that? inherits -but no object

After a strong conference week  yesterday arrived my 2nd child Alina. Everything is ok with my wife and my doughter. I attended the "birth event" and i must say- its not mine.

 

Posted by preishuber | 2 comment(s)

Kind of Browser Issue

Today the german magazine IX (Heise) posts in their news portal a security issue

Windows Bluescreen if showing to big scaled images in browser

The idea is quite simple

<HTML>
<BODY>
<IMG SRC="./sweetydead.jpg" width="9999999" height="9999999">
</BODY>
</HTML>
I tryed it and receive no bluescreen. Perhaps the memory or harddisk runs full an then BANG. I dont know. My second notebook (3GHZ HT) runs this tests and the CPU load goes up for a long time and the machine is not longer useable. Also mouse hangs. But after several minutes the task manager comes up ( after CRTL-ALT-DEL).

Also some other browser (not all) have this issue.

The problem is, its quite simple to reproduce. A html email is enough and the image do not need to be big. How to prevent such a bug in development process?

What i am wonder about is the ethic question. Should Heise wait till the bug (bug?) is fixed make the issue public?

 

Posted by preishuber | with no comments

release date: great news from press

"It is official - the countdown to launch has begun! During my Tech.Ed keynote this morning, I announced that SQL Server(TM) 2005, Visual Studio® 2005 and BizTalk® Server 2006 will launch the week of November 7. This will be the biggest launch ever for these products, and we're very excited to deliver them to you."

Paul Flessner

Senior Vice President

Microsoft

Wow! later than i expected.
Posted by preishuber | with no comments

Set page theme programaticly from everywhere

For a session with hands on part i tryed to build a extended ASP.NET Themes example.

The goal is that the user can select the theme. Thats all, not much or?

But as murphey always says ....

1) i created two themes

2) i created a strongly typed attribute in profile section of web.config

<profile >

    <properties>

              <add name="theme" type="string" defaultValue="DevTrain" allowAnonymous="true" />

    </properties>

</profile>

2) tryed to put a master page ( which i need in any case) and set the theme

But: Theme must pe set in preinit event and master page doesnt have preinit

3) Tryed to use a page base class and code the prinit event. The page base can be set in web.config

<pages pageBaseType="...">

The baseclass must inherit from page and be placed in app_code

4) now the problems begins realy. The Profile Class is not availaible in base class. Do not know why.  I found some tipps to use acquirequeststate event from global.asax. Doesnt work. Another tipp was to build a httphandler.

But i found a better and easier way. 1 line of code

5. Use the preinit event of the page base class. Access the profile with httpcontext AND access the profile in a "latebindinding" matter with the item property. Profile.Theme doesnt work.

theme=httpcontext.current.profile.item("theme").tostring

Thats all. A perfect day.

 

Posted by preishuber | 1 comment(s)
More Posts