.NET

Exception handling (logging) via elmah

Posted on

When developing my applications I was looking for a global way of handling my exceptions. There are some packages you can you for handling your exceptions. First I used the Enterprise Library Exception Handling Block but today I changed from the Enterprise Library to another library called elmah. In the next few minutes I will […]

.NET

MVC 3 problems validating a decimal

Posted on

Last I was doing some MVC3 development but I kept on having validation problems with my forms. My form looked like this: I don’t know if you see my problem already but I had some problems validating my decimal. When I submitted my form I always get the following error message: The field Max. aantal […]

.NET

Define 2 keys in an MVC3 model object

Posted on

Last I was converting an application into MVC3. But when I came to the point where I needed to create an object that contained 2 keys. I could not do this with following code: I always received the error message: Unable to determine composite primary key ordering for type ‘Project.Models.ModelObject’. Use the ColumnAttribute or the […]

.NET

How to check X509 signature of saml token

Posted on

Last I was creating a module to read a saml token response. One of the features of this module was validating the token. One of the required validations was checking the signature. And here I had some difficulties to complete this task. I had 2 main problems with this task. 1. The first problem was […]

ASP.NET

Session is null in HttpHandler

Posted on

Last I was working on a project and had the following scenario. There was a form on localhost:8081 where 2 parameters were filled in. The action for this form was localhost/eventHandler In the eventHandler I used the PreRequestHandlerExecute method to execute my code. Here I wanted to put one of the parameters into the session. […]

Java

Writing to a URLConnection

Posted on

Today I was trying to create an application that reads data from a website. The problem I had was that the form I needed to fill in to get to the page I want to read is a page with a POST form. Due to the fact it was a POST form I could not […]

SQL

How to delete and regenerate a foreign key object

Posted on

Last a college asked if it was possible to delete a foreign key object and regenerate it from the original database. His database objects where dossiers and clients. Client are managed in another application. Therefore it was needed that he could throw his clients table away and regenerate it with the latest version of the […]