DataBinding with Nullable types

One of the new thrilling features in .NET 2.0 is the introduction of generics, and as an consequence we also got the Nullable type.
Nullable makes it possible to set value types (Integer, DateTime) to null.

When using Windows Forms Data Binding in combination with Business Objects with members of type Nullable, you soon run into problems when you whant to set the DataMember to null. There is no buildt-in way to do this. At the P&P Summit in Oslo last week I discusses this problem with Rockford Lhotka, we came up with  a solution using the ProviderExtension modell in Windows Forms.

A colleague of mine Thomas Bruusgaard wrote this blogpost about how to implement the NullableExtension.  
You can aslo read what Rocky wrote about this.

 

26105 error while installing Team Foundation Server.

Setup:
I installed Microsoft Visual Studio Team System, with a single server Team Foundation Server (TFS) configuration. The configuration are using domain users as setup, service and reportings useres.

Problem:
During installation of Team Foundation Server, the 26105 error occured, after the installation Wizzard validated system requirements and the installation process started.

Solution:
After investigating the installation log, it seams like the problem is related to creating the TFS SharePoint site. Even though I followed the installation guidance it seams the setup user doesn't have the enough privileges to create the TFS site. The setup user was created as a domain user with local administration privileges. To correct the problem I added the TFSSETUP user to the STS_WPG group on the local machine.

VB vs. C# what is it all about? Religion?

I am an experienced C# developer myselve, and I can of couse come up with tons of reasons why it makes sence for me to write code in C# instead of VB.NET. But when i comes to the end, what are the real reasons why you should choose one above the other? Wy should we advice customers to choose C# instead of VB or opposite.

Are there any reasons why we should advice a company with several VB programmers to choose C# when migrating to .NET?
Are there any business sectors where C# are suitable? Are there any solutions to complex for writing in VB.NET?

There are so many questions, but are there really an correct answer when i comes to the end, or is it all about religion.

Any ideas?

Mads Nissen, MVP Awarded.

Mr. Mads Nissen, a very clever colleague of mine, have just become a MVP. Congratulations Mads, keep up the good work. http://weblogs.asp.net/mnissen/archive/2005/07/07/418360.aspx

Where are the comments..

First of all I will say thank you donetjunkies for upgrading to the Community Server, it was about time to do something about it.  The new system seems to be better than the old and hopefully reliable as well. But!! When upgrading to the new system, what have you done with the comments to my postings.. They are all gone. :(

Posting comments on my weblog.

To all of you, reading my weblog. I have during the last months, been hassled by evil persons posting rubbish comments on my weblog.  Suppose I am not the only one, been hassled by these persons. Because of this, I have decided to disable comments on my old postings. If you still want to comment on my postings, please do by sending me an email and I post them for you.

Path Helland is leaving Microsoft.

It must be a big loss for Microsoft when Path Helland starts working for Amazone March 7th. Path, how you keep up the brilliant work at Amazone.com and keep on blogging.

http://blogs.msdn.com/pathelland/archive/2005/03/03/384636.aspx

Calling the postback function of the parent form a child window. (ASP.NET)

I needed a way to refresh a ASP.NET page from a child window, without loosing the current state of server controls. I used the child window to retrieve som values from an ASP page, who posted the values back to an ASP.NET page, who stored them in session state on page load. Then I wanted to refresh the parent form to load the selected values into the form and close the child window. I wrote this magic javascript code inside the form tag of the aspx page after storing the values in session state..

window.opener.execScript("__doPostBack('someButton','')","JavaScript");
window.close();
It works..

SqlException: General network error. Check your network documentation.

There is a lot of people out there complaining about SQL Server returning a General network error while executing a command form ADO.NET version 1.1 or 1.0. Since it is a General network error, it seems to me that there are as many reasons for this error as there are people having it. I found several postings and articles about this strange error message, and finnaly I also found a workaround that fixed the problem for me...

What i did was to append: max pool size = 7500, to my connection string.
This fixed the problem, but didn't explain why the problem occured in the first place.. What I discovered later on was that Norton Internet Security was blocking requests to my SQL server, causing some strange errors while pooling connections. When disabling Norton Internet Security, SQL Server works perfect again.. Even without the max pool size setting in the connection string.

 

 

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.

Problem
When usign System.Data.OracleClient with Oracle9i client, i got the following message while connecting to the Oracle database from and ASP.NET application.

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.


Cause
Security permissions were not properly set when the Oracle 9i Release 2 client was installed on Windows with NTFS. The result of this is that content of the ORACLE_HOME directory is not visible to Authenticated Users on the machine; this again causes an error while the System.Data.OracleClient is communicating with the Oracle Connectivity software from an ASP.NET using Authenticated User privileges.

Solution
To fix the problem you have to give the Authenticated Users group privilege to the Oracle Home directory.

  • Log on to Windwos as a user with Administrator privileges.
  • Start Window Explorer and navigate to the ORACLE_HOME folder.
  • Choose properties on the ORACLE_HOME folder.
  • Click the “Security” tab of the “Properties” window.
  • Click on “Authenticated Users” item in the “Name” list.
  • Uncheck the “Read and Execute” box in the “Permissions” list under the “Allow” column.
  • Re-check the “Read and Execute” box under the “Allow” column
  • Click the “Advanced” button and in the “Permission Entries” verify that “Authenticated Users” are listed with permission = “Read & Execute”, and Apply To = “This folder, subfolders and files”. If not, edit that line and make sure that “Apply To” drop-down box is set to “This folder, subfolders and files”. This should already be set properly but it is important that you verify it.
  • Click the “Ok” button until you close out all of the security properties windows. The cursor may present the hour glass for a few seconds as it applies the permissions you just changed to all subfolders and files.
  • Reboot, to assure that the changes have taken effect.

Try your application again.

Team Development with Visual Studio .NET and Visual SourceSafe

I found this very usefull article on MSDN about Team Development with Visual Studio.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/tdlg_rm.asp

The article among other things explains how to use Visual Source Safe with ASP.NET project.

Commerce Server 2006.

Microsoft are planing a new release of Microsoft Commerce Server in early 2006. They have now released a overview of the upcomming release...

http://www.microsoft.com/commerceserver/2006preview/

 

Oracle 8.1.7 and Stored procedures from ADO.NET

How hard can it be? I'm trying to create stored procedures i PL/SQL and call these from the new GotDotNet Data Access Application Block. But it doesn't work.

I have also tryed to do the same thing from OracleClient in System.Data.OracleClient.
My stored procedure are declared with a output parameter of type T_CURSUR, but i wont work.....I'm currently using Oracle 8.1.7....

Anyone who knows how to do this?

Old Oracle databases and Enterprice Library

From the documentation of the upcoming Enterprice Library, I can see that the Application Block included only supports Oracle 9i or newer. I was planning to use Enterprice Library to build a solution framework for one of my customers, one of the requirements was compability with Oracle 8.1.7... So it seems like I have to use the Community developed Application Block 3.1 insted. Hopefully this will work.

The solution: Problems with Whitehorse and the Distributed System Designer

Problem: The Distributed System Designer in Whitehorse failed when I tryed to add a Web Service, Web Application or other components to the designer. The error message was "Language".

Reason: The release I am using of Visual Studio 2005, requires to have all programming languages installed. I only had C# installed.

Solution: Install all VS languages.

Problems with Whitehorse and the Distributed System Designer

When designing a distributed system in Whitehorse, I get
an strange error while working with the Application
Connection Designer. When I try to drag a WebService or
WebApplication into the designer, I get an error message
popping up. The message is "language".

My PC environment is running Windows XP, with norwegian
language settings. But changing the language settings to
US English do not change anything.

Anyone who knows what cause this problem?

Problem’s running ASP.NET 1.1 applications after installing Whidbey.

Whidbey mess up ASP.NET 1.1 scriptmaps while installing. This results in problems while running ASP.NET 1.1 applications. To correct the problem, I had to run “aspnet_regiis.exe –r“, to change current script map from 2.0.40607 to 1.1.4322.

Accelerate your projects.

Why build your own components for configuration managment, logging, exception management, etc when you can use Application Blocks. 
You can combine several different  blocks into your own solution framework. This is what I usually do. Have a look at my article about the Configuratiom Management Block to get started.

I'm planning to poste more articles like this, if there is some interest you there..

Configuration Management

I just posted an article about how to start with Microsoft Configuration Management Block.  Here it is Quick start: Microsoft Configuration Management Application Block (CMAB)

Validation of Entity objects.

When working with entity objects the need of validating object members occurs. Especially when sending entity object through layers or while saving data to databases, validation is important. I’m now working on an Entity Validation library.

The idea is to tag the entity members with Attributes and then run the entire entity class through a validation method. The validation method then throws exceptions if the validation fails.