I am having a very strange problem with an ASP.Net project using an Entity Layer, a Data Layer and a Service Layer generated using .netTiers 2.3.1. The project runs fine on my machine (32 bit WinXP machine with with IIS 6; this machine is used to compile in for "Any CPU" mode), but when I transfer the compiled project on a Windows 2k8 (64 bit, IIS 7) server, it does not run properly anymore.
I have a page with a FormView to insert a new row in a table which works fine on my machine, but that does not work on the server or on a colleague's machine running Windows 7 (IIS 7). I used SQL Server profiler to track down the problem, and I can see the insertion query and other queries being sent to the server properly, but the data does not get inserted in the database. It is not there when I look for it. It is as if the transaction would not get committed.
Also, after the insertion, I run more queries in the datasource and the formview OnInserted event handlers. However one of these queries is blocking subsequent queries. If I remove the code initiating the blocking query, them it is simply the next query that becomes the blocking query. As I said, all this is running fine on my machine, and when I transfer the aspx pages and the binaries to the server, it stops running properly. Has anyone ever had such a problem?
UPDATE:It is not a 32 bit vs 64 bit problem but rather an IIS 6 vs IIS 7 problem.
I found out what was wrong. I was missing the following line in the subsection of the section in my Web.config file:
This does not seem to matter when using IIS 6, but it does when using IIS 7.
Adding the line above can also be done using the IIS 7 interface by going in the Modules section of the Web site, and by clicking on Add Managed Module...