We are using SqlDatabase from the DAAB. We are running in a WCF service hosted in IIS. We seem to have isolated the slowness to creating parameters, specifically AddInParmeters. One of my developers believes it has to do with the SqlClientPermission attribute
using the SecurityAction.Demand, when we run a test using DAAB and create 1000 AddInParameters in 3300ms, when we use ADO.NET directly we do the same code in 21ms. We created our own code to play around with this Attribute and found that if we set it to Assert
it does the code in 34ms, Demand is 1580ms, and LinkDemand is 20ms. Reading MSDN says we should not use LinkDemand in 4.0.
Is there a security change in ASP.NET 4.0 that would affect a WCF service calling an assembly that uses ADO.NET to access a sql server database?
kpinniger
Member
5 Points
3 Posts
DAAB Performance in ASP.NET 4.0 is slower than in ASP.NET 2
Jun 28, 2011 07:45 PM|LINK
We are using SqlDatabase from the DAAB. We are running in a WCF service hosted in IIS. We seem to have isolated the slowness to creating parameters, specifically AddInParmeters. One of my developers believes it has to do with the SqlClientPermission attribute using the SecurityAction.Demand, when we run a test using DAAB and create 1000 AddInParameters in 3300ms, when we use ADO.NET directly we do the same code in 21ms. We created our own code to play around with this Attribute and found that if we set it to Assert it does the code in 34ms, Demand is 1580ms, and LinkDemand is 20ms. Reading MSDN says we should not use LinkDemand in 4.0.
Is there a security change in ASP.NET 4.0 that would affect a WCF service calling an assembly that uses ADO.NET to access a sql server database?
Thanks,
Kurt
Kurt Pinniger