Saturday, August 26, 2006

CSAML: C# Application Markup Language

Enjoy this comparison of C# and XML as a programming language
---
C# Application Markup Language (CSAML): An Evolutionary Leap by Charles Petzold
Several weeks ago, Microsoft Corporation began a limited circulation of a specification and beta compiler for the new C# Application Markup Language or CSAML (sometimes pronounced "scammel"), and I’m pleased to say I find it fascinating. This merging of C# and XML is an important evolutionary leap for both standards, and represents a profound advance in the Xmlization of all textual data.
---

:-)

Keywords:
Microsoft C# XML joke parody
XML as Declarative programming language

Friday, August 25, 2006

Log4Net for ASP.NET 2.0

This article might help to setup Log4Net in ASP.NET application:
Log4Net: The Definitive(?) How-To for Those Who Have Already Experienced Some Degree of Frustration Trying to Set It Up the First-Time Around by Chad Finsterwald.

Learning from Catastrophic Database Design Failures

Great presentation about database design by Kevin Loney:
Learning from Catastrophic Database Design Failures

- There is no such thing as a harmless logical read.
- Tune the application, not the statistics.
- Time spent testing is never wasted.
- Most application performance problems are the result of deliberate design choices.
- "No production database will run in Third Normal Form."
The data must ultimately be stored in a format that is as close as possible to the users’ needs. You must never place data normalization above the business needs.
- Avoid active use of remote data.

Seriously evaluate the impact of design changes.
Test rigorously.
And ask for directions – but be careful whom you ask...

Thursday, August 17, 2006

VSS 2005 over Internet and VS.NET 2005 over HTTP

Ufff... that was a challenge: I tried to setup VSS database on Internet server and connect my machine over Internet.

The mistake was to try to connect from my DEV machine to //Server/VSS share directly.
Such solution doesn't fly: it's painfully slow and insecure.

Right approach is to properly setup VSS over HTTP.

Start with Alin Constantin's article:
Installing and configuring Microsoft Visual SourceSafe for Internet (Remote) access

But Alin's article There are still few tricks.
For example, my server (which I use for hostin VSS database) has multiple web sites (and multiple IP-addresses) associated with the server, so as a result I had to manually create VssUpload_db1 and VssDownload_db1 virtual folders.
(VSS admin creates these folder in Default web site, which doesn't work in my "multiple web sites" case.)
See:
There was a failure uploading the URL topic.


Another problem was about language mismatch between client and server VSS on different machines.
I was getting error: "The current source control operation cannot be completed.

The Visual SourceSafe Web Service returned the following error:
"The SourceSafe Web service was unable to process your request.
The selected language for non-Unicode programs in your computer does not match the one selected on the server."

This problem was discussed here:
Visual Studio Source Control and SourceSafe - selected language for non-Unicode programs
In my case I had to setup English as default language on my DEV (VSS client) machine. That's not good, but at least it works.


Unfortunately "View History" functionality doesn't work in VS.NET with Internet plug-in


Keywords:
VSS 2005 over HTTP
VS.NET 2005
Visual Source Safe 2005
Visual Studio .NET 2005
C#.NET, VB.NET

Friday, August 04, 2006

Best practises for ASP.NET web sites developers

Good article by Jeff Prosise explaining typical ASP.NET development pitfals:
Keep Sites Running Smoothly By Avoiding These 10 Common ASP.NET Pitfalls

Here's the bottom line from the article:
- Does your app use LoadControl to load user controls dynamically? If so, make sure this is done in such a way that LoadControl will work both with and without output caching.
- Are you using kernel-mode output caching and session state in the same page? If so, remove the OutputCache directive to avoid caching that page or turn kernel-mode output caching off for the entire app.
- Are you calling FormsAuthentication.RedirectFromLoginPage in your ASP.NET 1.x-based app? If so, either change the second parameter to false or modify the Expires property of outgoing persistent forms authentication cookies to a more appropriate timeout.
- Do any of your pages generate inordinate amounts of view state? If so, turn off view state for individual controls or keep it on the server.
- Does your app use SQL Server session state? If so, make sure you disable sessions in pages that don’t use sessions.
- Does your app use the ASP.NET 2.0 role manager? If so, enable role caching to increase performance.
- Does your app use custom data types as profile properties? If so, you'll avoid problems by creating custom data types that are compatible with XML serialization or by attributing the types as serializable and using the binary serializer to serialize and deserialize types.
- Does your app do database queries that take a long time to return? If so, consider whether the pages are candidates for becoming asynchronous.
- Does your ASP.NET app use client impersonation? If so, simple authentication in ASP.NET might enforce ACL-based permissions with less hassle.
- Have you profiled your app’s database activity? Examining communication between the app and database is a good first performance-tuning step.

Tuesday, August 01, 2006

Multiline HTML buttons

Here's HTML code to Multiline caption buttons:
====
 <button>multiline<br>button<br>text</button>

<input type="button" value="Carriage&#13;&#10;return&#13;&#10;separators" style="text-align:center;">
====

Actual buttons:



---
Keywords: HTML DHTML Multi-line Multy line button caption. Web Forms. IE Internet explorer FireFox Opera

Reorder multiple <select> fields in a web page

Nice article about reordering listbox fields.
User can move one or several fields at once. User can use buttons or mouse wheel.
Reorder multiple <select> fields in a web page - JavaScript

Keywords: select options reorder postback javascript jscript asp asp.net perl

Followers

About Me

My photo
Email me: blog@postjobfree.com