I am experiencing a strange issue when publishing an ASP MVC application to Windows Server 2012.
The app is fairly simple, and on most of the pages visited it will query an Access database which is hosted on the server.
I noticed that the queries are quite slow (often taking between 7-10 seconds to complete), as shown when running the app with MiniProfiler.
As a simple test, I decided to host the app on my Windows 10 laptop to see if there was a difference, and it is much faster (Most queries are under 200ms).
This is what I tried so far:
- Match advanced Application Pool settings
- Match Firewall settings
- Enabled link local multicast name resolution (LLMNR)
- Confirmed that ODBC tracing is disabled (32 and 64)
- Moved the Access Backoffice.mdb file to the server's C drive (same as on the laptop)
- Made sure web.config match (apart from connectionString Data Source)
- Added
C:\inetpub\wwwroot\website
andC:\Test\Database
to antivirus scan exclusions - Increased the
MaxBufferSize
key value from 0 inAccess Connectivity Engine
in the registry
Does anyone know of a way that I can try debugging this issue, or any possible solutions?
notes
Both my laptop and the server are on the same network while testing this, and I am accessing the app from an ipad.
I am also experiencing the same slowness when using the application from a browser on the server itself (url = 10.0.0.1 or localhost)
When I execute the exact same query code from a console app on the server, it runs a lot faster (on par with the laptop). I am only experiencing this issue via the asp app.
Laptop Details:
- Processor : Intel Core i7-6700HQ CPU @ 2.60GHz
- RAM : 16.0 GB
- OS : Windows 10 x64
Server Details
- Processor : Intel Xeon CPU E5-2603 v4 @ 1.70GHz (2 processors)
- RAM : 32.0 GB
- OS : Windows Server 2012 x64
Connection String
I have tried the following:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=W:\My Backoffice.mdb
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Test\My Backoffice.mdb
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\ServerName\W\My Backoffice.mdb
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\ServerName\C\Test\My Backoffice.mdb
With both 16.0
and 12.0
as the ACE.OLEDB
version, where W is a Local server drive which is used as a network share acrcoss the domain. All of these gave the same result.