December 2006 - Posts

Codebehind, Codefile, Inline & Profiles

I installed against all rules SP1 for Visual Studio 2005 on Vista. After then i developed my projects as Web Project. This have some changes for your daily work:

1. No inline Code is possible, Attibut codebehind is used again. This ends up that you can not work with visual web developer with the same files cause its using Attribut Codefile

2. i can not view file in browser ( right click in aspx)

3. Profile doesnt work. Means you can not type profile.myVal which is defined in web.config as Profile MyVal. Workaround is a Class Generator which i have not used.

I switch back to file based development. 

Posted by preishuber | 1 comment(s)
Filed under:

use HttpFiddler with ASP.NET development Server and IE7

HttpFiddler is a free HTTP debugging proxy and essential for daily asp.net developers work. It works as a proxy and change this settings in IE7 to forward request to fiddler. IE7 does not forward calls made to url contains localhost.

Workaround: make the call to the machine name in IE7. Fix the port in the setting of the Web projekt to a dedicated like 1000. So the call is now http://name:10000/....

The ASP.NET development server does only accept requests to localhost (hardcoded). So add a rule to fiddler which change the name like:

if (oSession.host=="name:10000"){
oSession.host="127.0.0.1:10000";
}
  

this snippet must be placed in function: OnBeforeRequest

Posted by preishuber | 2 comment(s)
Filed under: ,

Marry Christmas: Stille Nacht-Heilige Nacht

I live in Hochburg-Ach (Austria) where Fanz Xaver Gruber was born in 1787. He composed "Silent Night, Holy Night" in Oberndorf (which is 15 minutes away).

In that matter i whish you all a silent night and a merry christmas.

Some Performance Thoughts on ASP.NET 2.0

One of the lucky things on my Vista upgrade is IIS7, or better said the unlimited IIS. IIS 5.1 which is part of Windows XP limits the amount of sessions to 10. Now I can make performance tests with Visual Studio 2005 Test.

I have a scenario where client and server is same machine (yes i know, dont do that). I call a page which contains a gridview of customers.

First test should show how bad it is to have debug enabled.

First  Test

 

Indikator

Instanz

Kategorie

Computer

Farbe

Bereich

Min.

Max.

Durchschn.

User Load

_Total

LoadTest:Scenario

XP-PRE4


100

0

25

22

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


100

51,2

58,2

54,8

Avg. Response Time

_Total

LoadTest:Request

XP-PRE4


1

0,43

0,48

0,45

Available MBytes

-

Memory

XP-PRE4


1000

635

639

637

Exceptions

_Total

LoadTest:Errors

XP-PRE4


-

-

-

-

Http Errors

_Total

LoadTest:Errors

XP-PRE4


-

-

-

-

Result with debug=false

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


100

49,8

58,6

55,0

which is nearly the same, but the available RAM was a little bit more.

Datareader in SQLDatasource

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


100

55,0

63,8

60,9

Available MBytes

-

Memory

XP-PRE4


1000

654

703

691

The default setting is dataset, which is needed eg for paging. The difference is 10% faster and some more memory available.

DataCaching of SQLDatasource 5 seconds

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


100

44,2

78,2

74,5

Not much as i expected, but scenario is not realistic enough cause SQL Server is also on same machine.

Caching 1 second

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


100

28,2

78,2

71,1

What i expected

Disable Viewstate in Page

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


1000

97

101

99

Viewstate makes problems in traffic and processor use. Reducing size speeds up.

Use localized Page

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


100

96,4

99,8

98,2

Something i was always afraid of, using the new features like sitemap navigation, themes or resx files. Seems nearly have no influence in performance.

Output Cache 10 seconds

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


1000

64

250

231

What i know from beginning, output cache boost and winform developers doesn't have a feature like that. We have now near 4-5 time more request per second. 1 server instead of 4 !

Additonal set a label

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


1000

41

103

95

This test is a preparation for my next step. I added a label which is set in the Page Load with the current time. No Output Caching.

Substitution Control

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


1000

249

263

256

Now i have switched on Output Cache again with 10 seconds. I replaced the label with a substitution control and implemented the shared(static) method to replace the current time in the cached result. As you can see the result is approximately the same as 2 test before ( it is a little bit faster which make no sense).

But as i posted earlier in my blog substitution is not supported by iis 7 integrated mode. Which brings me to my next test.

Application Pool integrated, no Cache

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


100

66,0

75,8

70,7

Application Pool classic (ISAPI)

Requests/Sec

_Total

LoadTest:Request

XP-PRE4


100

62,8

71,2

69,6

As you see the difference is quite small but as expected integrated is faster.

 

I hope this gives a idea what you can do to increase the performance of your ASP.NET application.

My tip at the bottom line: dont trust anybody if talking about performance, measure it!

Posted by preishuber | 4 comment(s)
Filed under:

Expression Design September CTP: why? what? and when?

I am using graphic products for following purposes: Create images for web and for pre press. For the first purpose I need jpg and gif. For the second CYMK formats like tiff, jpg or pdf are needed. From my microsoft history I have hundreds of MIX files from photodraw.

From my point of view, Expression Design can do nothing better than other tools today

My essential format  MIX not supported. CMYK support seems to be not implemented correct.

btw: i like the UI.

Posted by preishuber | with no comments
Filed under:

IIS 7 Apppool "integrated" fails with ASP.NET Substitution

My tests with ASP.NET 2.0 on IIS7 shows that there are some compatibility issues

Die HttpResponse.WriteSubstitution-Methode wird vom integrierten IIS-Pipelinemodus nicht unterstützt

i had to changed the Apppool settings to "klassisch" (classic?) to use the isapi extension like iis6.  This reduces the performance ~2%.

What i dont know is whats happens next, what are the main diffrences between this both modes?

Posted by preishuber | 2 comment(s)
Filed under:
More Posts