Saturday, December 18, 2010

Configsource

A collegua of me sent a while ago a link about ConfigSource. I think this is an easy way for dividing the web.config is some logical parts. So I am goiing to use this in my (private) projects. Unfortunately the external file must be in a relative physical path to the application because of security reasons.


Update:The attribute configSource works only for a complete section and NOT for a single ConfigurationElement.

Monday, December 6, 2010

ToOADate

For a couple of my hobby web sites I use an Access database. When I upgrade these website to ASP.NET 4.0 Framework I have had also to update some calls to the database for the DateTime columns, I have to use the ToOADate() method.

Wednesday, November 17, 2010

Repeater: Custom ItemTemplate

When you want to create a custom item template in a repeater you have to readthis article. In this article the css-class and the html depends of the content of the data collection. So you want a different ItemTemplate for another row.

Web.config customErrors element

In de web.config of a (web) application it is possible te configure the customErrors element. Mostly for development I want to see the details of the errors so I can fix these quickly. But when the application runs for end-users I want to be informed about these errors and the users sees a friendly message "there is something wrong, this is registrerd".

Monday, November 1, 2010

ildasm.exe

In the command prompt of Visual Studio it is possible to call the windows tool
ildasm.exe. With this tool the assembly manifest is readable and so the related assemblies can be retrieved.

Monday, October 18, 2010

Public token key

With the 'sn.exe' tool of Visual Studio it is possible to retrieve the public token key. But watch for the casing!!

Use the command: sn.exe -Tp "FilePath to assembly"

Tuesday, October 12, 2010

Fiddler and localhost

Working with Fiddler for seeing the details of the Http request of a website is usefull for optimizing the performance of a website. Check if there are unneeded requests or if there are many requests which triggers a 404.

A tip when working with localhost you must http://localhost.:1519/default.aspx instead of
http://localhost:1519/default.aspx. So add a point behind the hostname.