I have a .net 3.5 application running in production on Windows XP x86 dualcore.
I have now installed the application on windows 7 x64, quadcore with hyperthreading.
The application is a gui which communicates through WCF with a windows service that communicates with SQLExpress 2008 R2 through Linq2Sql.
We also use Windsor Castle for Dependency Injection/IoC
A certain Linq2Sql statement in the XP-environment takes about 1,5-2 seconds. In windows 7 this statment takes about 5-7 seconds. I have run sql profiler and resource monitor and it seems that the application waits for about 5 seconds and then fires the actual sql-query. so the delay seems to occur below my Datacontext and before the database
I have tried the following:
- changed the connection string to sql authentication
- unplugged the network cable
- uninstalled the antivirus program
- disabled LLMNR
- Removed IPv6 on the network cards
- added transactionscopes with read uncommitted in the code
- tried to add locks (multithreaded environment)
- tried to pin the application to one cpu
- run as admin
My theory is that something is timing out, but what?!?
When setting the target platform to x86 instead of AnyCPU the program behaves as expected. So the problem seems to be that Linq2Sql and x64 doesn’t really play together. I don’t know if we can get it as a bug but it behaves bad any way.