Friday, January 05, 2007

This means that you can’t post values containing HTML or script tags.  So when you have an ASP.Net page with a textbox on it, and your users enters something like

And then the user press a submit button, they get this error.
More info about this can be found here.

Just change the page-directive on top of your page by adding the tag "validateRequest".  Set this tag to false and your users are able to add HTML tags in your textbox.

1/5/2007 10:21:40 AM (Romance Standard Time, UTC+01:00)  #     | 

I got this error when accessing an ashx file, wich returns some data to me.  After trying to figure out what the problem is, I came to this solution.

It seems that .Net closes connections prior to it being finished.  I think it's a bug in .net which concerns me. 

Find a solution here : http://support.microsoft.com/default.aspx?scid=kb;EN-US;915599

1/5/2007 8:34:32 AM (Romance Standard Time, UTC+01:00)  #     | 
 Wednesday, January 03, 2007

When you want to build your solution in VS 2005, together with TFS as source control it could that you encountered the following error:

Build FAILED.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2797,9): error MSB3491: Could not write lines to file "obj\project.vbproj.FileList.txt". Access to the path 'd:\builds\project\obj\project.vbproj.FileList.txt' is denied.

The problem is that this file is checked into source control and they are marked as read-only.  Even by setting the read-only flag to off it doesn’t work, because the next build the flag is switched on again.  As they are intermediate files, generated by the build, these should never been checked in.  So to solve the error above, delete the file from SCC, delete the file from your HD and try again.

1/3/2007 2:47:30 PM (Romance Standard Time, UTC+01:00)  #     | 

As always, you want only a single instance running of your program.  To do this you have to make use of the Mutex object.  By using reflection we get the executing name of our application.  We will use it for checking if there’s already an instance.

The Mutex object can be used for interprocess synchronization.  With this we could check if our application is already running.  With the waitone method we can request the  ownership of our mutext object.  If it return false, then there’s already a process running using this mutex object.

Example code :

using System.Reflection;
using System.Threading;

…..

private static Mutex s_Mutex;

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
s_Mutex = new Mutex(true, Assembly.GetExecutingAssembly().GetName().Name);

if (s_Mutex.WaitOne(0, false))
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
else
MessageBox.Show("Already an instance running", "your application", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}

1/3/2007 9:41:28 AM (Romance Standard Time, UTC+01:00)  #     | 
 Saturday, November 25, 2006

Yesterday we had our .Net 3.0 event with sessions about WPF, WCF and WF.  It was a big success.  The comments we heard afterwards from the attendants were good.

The first session, presented by Gill Cleeren and myself, was a no slide presentation.  It was a try out for us, but what afterwards we heard only positive comments.  Unfortunately we had too little time.

The second session, done by Kurt Claeys, had a very high level.  He did a deep dive into WCF and WF. Just like us, the time was a little too short for Kurt.

You can download here my demos.  The demos of Gill can be downloaded here.

I want to thank all the attendants and if you have any comments or questions about the event or the presentations or the demo’s, you can always leave a comment or send me a message.

Update :

You can find the article about this event also on our corporate blog.
Here are some images:

.Net 3.0 | WCF | WF | WPF
11/25/2006 10:50:25 PM (Romance Standard Time, UTC+01:00)  #     | 
 Friday, November 17, 2006

Jim Erwin found a very special warning from the compiler :

http://geekswithblogs.net/jerwin/archive/2006/11/16/97285.aspx

11/17/2006 12:31:00 PM (Romance Standard Time, UTC+01:00)  #     | 
 Thursday, October 19, 2006

Here at the customer we are encountering a problem when calling our .Net web applications.  Many users are getting a HTTP 400 – Bad Request error (Request Header Too Long). 

After many investigations with other people who do not have this problem when connecting to the web applications, it seems that only users who are belonging to too many groups (>300) get this error.

Here are a few articles on this problem:
http://support.microsoft.com/kb/327825
http://support.microsoft.com/kb/269643/
http://support.microsoft.com/kb/263693/

After checking the workaround proposed in these articles (increasing the MaxTokenSize value to 65535), but it is already done on our workstations!  According these articles, "the token size to 65 KB allows a user to be present in more than 900 groups. Because of the associated SID information, this number may vary”.  In addition, the naming conventions used here for security groups do not help!

If you want to check in which group you belong, you can use following command in a DOS box:

ismember /list

If you want to know, the total groups use this command:

ismember /list|find "User" /c

For myself, at this moment, I belong to 478 groups.

At For the moment, we do not have a solution for this problem.

10/19/2006 4:53:45 PM (Romance Standard Time, UTC+01:00)  #     | 

The Ordina’s N-Technologies team would like to invite you to this event, which will include 2 sessions.  It will be held the 24th of november 2006.

In the first session Gill Cleeren and Sven Cipido will show you more about WPF.  We will show you the capabilities of WPF by showing you many examples. 

In the second session Kurt Claeys will talk about WCF and WF.  He will use a typical developer case to show you how SOA can be implemented in .Net 3.0.

 

For more info or to subscribe for this event, click here.

.Net 3.0 | WCF | WF | WPF
10/19/2006 4:52:40 PM (Romance Standard Time, UTC+01:00)  #     | 

Gill Cleeren, a colleague and friend of me wrote an article about styles and triggers in WPF.

In this article, Gill Cleeren focuses on the aspect of styles and triggers in Windows Presenation Foundation. Styles make it possible to create applications with a uniform look and with a high level of maintainability. Triggers allow WPF styles to change one or more properties in response of a user interaction. In this document, we will use both these technologies to create a richer user experience.

You can find the article here.

WPF
10/19/2006 4:49:19 PM (Romance Standard Time, UTC+01:00)  #     | 
 Monday, August 28, 2006

I had this problem almost a year ago, but finally I've written it down.

The problem I had (and sometimes other developers too) is that I don’t had administrator rights on my local PC.  So I called the people from security about this issue.  They were very helpful for this problem.  Step by step they upgrade my account with more rights and more rights (e.g. rights for the event log, rights for the registry…).  With a few of them I got a step further, but at the end I still haven’t enough rights to install the service.  The last step was to give the full administrator rights on my local PC and it’s just this step that I needed.  As following MSDN article states “Only processes with Administrator privileges are able to op handles to the Service Control Manager that can be used by the CreateService and LockServiceDatabase functions”.

So now we had a problem.  The security people came with two solutions:

  • Every time we need to send the new version to them and they will install it on the server. 
  • We got a second PC with administrator rights, but not connected to the network

Both solutions aren’t that great, but we choose for the second option.  Ones we had the PC, we add our accounts in the administrator group, so we could install the service with our account and we had network connection.

As you can see, in some cases administrator rights as a developer are important on your development machine.

Diederik Krols also blogged about this item, and he has a nice Bart Simpson chalk board about this, which I will include here also and maybe you need to give this picture to security people if you encountered the same problem ;-).

BTW: Dierderik was my scrum master/technical architect there and he helped me a lot with this issue.

8/28/2006 7:02:17 PM (Romance Standard Time, UTC+01:00)  #     |