Queries execute faster when hosted on laptop than on server - asp.net-mvc

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 and C:\Test\Database to antivirus scan exclusions
Increased the MaxBufferSize key value from 0 in Access 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.

Related

Soap-server responds with error 12030 after requests over HTTPS

My Delphi 10.4 application uses a HTTPRIO-component to communicates with SOAP REST Server over HTTPS.
It is installed on more then 100 PC's, and it works fine almost everywhere.
However, I now have 2 clients that get the following error:
"Error sending data: (12030). De verbinding met de server is niet normaal beƫindigd"
(--> The connection to the server did not end normally )
The user has a Windows 7 Home Premium machine (I have Windows 10 Pro).
Firewall was disabled.
If I copy the complete application-dirctory with all the dll's to my machine everything works fine.
Where should I start looking for a solution?
Which properties of the HTTPRIO-component could have an effect on this behaviour? Or which dll's?
I checked the article Peter Wolf suggested but without succes. (The register-settings should be OK). All the registers are present with the right values, but the windows update could not be installed. Also downloading the stand-alone update KB3140245 fails. It juist says "failed".
any hints are welcome!
kind regards,
Dirk Janssens

How to make container installation behave like host machine installation

I'm working with the following:
Docker for Windows v20.10.11
Docker running in Windows container mode
mcr.microsoft.com/windows:1903 base image
Proprietary application installed on top of this base image
Each year we create a Docker image with the latest version of our company's software. However this year's version behaves differently. Host machine installation runs fine. Containerized installation fails to run in certain situations. I can start the application as a simple EXE, for example using the Docker run command. The app will start and show up in "tasklist". However I can't start the app via the COM API, which is a critical requirement. The problem appears to be COM related. Normally we can create COM objects for our software just like for any other application. For example, IE returns a COM object just fine:
Creating these objects for our application works outside containers. However inside the container, our latest installation gives this error:
Access permissions appear to be ok. I tried a couple tests to prove this. First I can install other software like MS Word into a container and create COM objects for that:
Second I tried retrieving + modifying the application's DACL in PowerShell.
Changing access masks or trustees can cause an Access Denied error:
This also appears to confirm the access permissions were Ok by default.
Next I made sure COM is aware of the application. This appears to be fine. I get the same result on host machine and container when running this PS script:
gci HKLM:\Software\Classes -ea 0| ? {$.PSChildName -match '^\w+.\w+$' -and
(gp "$($.PSPath)\CLSID" -ea 0)} | ft PSChildName
The application shows up just like any other. The details show up fine when querying by AppID. LocalServer32 points to the correct EXE:
Some other things I tried:
Querying registry keys. There are 7 keys created when installing our software. These appear identical on host machine install and container install.
Even though permissions appear fine, I still tried logging into the container as alternate users. For example "nt authority\system" is another virtual admin user. I also changed the password of the "builtin\administrator" user to enable logging in with that one. Lastly tried creating new users entirely and adding them to the Administrators user group. All these attempts had the same errors as "builtin\containeradministrator" (default user).
A minor check was ensuring CMD.exe / Powershell is running as x64:
Re-registering the DLLs associated with the installation using regsvr32.
Starting from different base images. https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-base-images. The full Win Server base image behaves exactly the same way regarding errors. The smaller Win Server Core base image is even more problematic, as I can't even start the app's EXE manually using that base. Lastly I tried other tags of the full Windows base image such as 20H2 and 2004. Same result from those. Multiarch or x64 makes no difference.
Included the "Ogawa hack" which was historically needed to make MS Office apps function correctly with COM: https://stackoverflow.com/a/1680214/7991646. It could be necessary for other COM apps too, but didn't help with my specific installation.
Is there anything else I can do to diagnose or solve this COM issue?
There are several things to consider:
The Considerations for server-side Automation of Office article states the following:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
The When CoCreateInstance returns 0x80080005 (CO_E_SERVER_EXEC_FAILURE) page describes possible reasons.
If many COM+ applications run under different user accounts that are specified in the This User property, the computer cannot allocate memory to create a new desktop heap for the new user. Therefore, the process cannot start. See Error when you start many COM+ applications: Error code 80080005 -- server execution failed for more information.
Finally, you may find a similar thread here helpful, see Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).

Citrix printing - 2 of many thin client workstations cannot print

We have a application deployed in a Citrix environment. Many workstations can print to the Citrix print server fine via our application, but 2 cannot (this is limited to our application ie MS Word document prints fine). Of the many workstations, 2 with issues are on the same host as other workstations without issues. There are no printing issues with our application on other workstations. The application is published from the same host. Not having a Citrix background not sure how to go about troubleshooting this.
Check that Citrix host (on which users have issues) have the same policies applied comparing to others. In Citrix XenApp 6.0 and higher run AppCenter console and inspect policies and WorkerGroups they applied on.
Secondly, check Citrix host Windows Event Log for printing errors or printer creation errors.
And lastly check print server for received print jobs and their status.

How to set connection affinity mask in SQL server 2005 when enabling VIA protocol

I have developed an SUP HWC application(for iOS) to fetch data from SQL server 2005 using stored procedure.In SUP workstation, I'm able to see the preview while creating MBO.I deployed my application in Sybase control center and able to view the application.Till now every thing works fine :)
When I'm fetching data from the iPhone simulator, got following error:
error code 503 com.microsoft.sqlserver.jdbc.sqlserverexception the tcp/ip connection to host failed
I'm trying clear error by fallowing this:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bd5bb6c2-a4d9-4071-b2e6-a6c83970b212/commicrosoftsqlserverjdbcsqlserverexception-the-tcpip-connection-to-the-host-has-failed
Where, its saying to enable VIA protocol.I enabled it and restarted the SQL server service...
And got following error:
The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details.
I'm trying to solve this by following link:
http://support.microsoft.com/kb/955768
where, in Method-2 point no-7 it says like this:
Right-click VIA, and then click Properties. In the Listen Info box, type a connection affinity mask that matches the configuration of the computer, and then click OK.
My problem is, How do i find connection affinity mask in configuration of a computer.
Here is MY system details:
1. i7 Processor(having 8 processors) with 64 bit win7 OS.
2. My iPhone emulator is running on virtual MAC(on point-1).
Please help.Thanks.
Well.The service is started for me by making connection affinity mask as [0xAA] in the setting. :)
But, still I'm not able to access my SQL server Database from iPhone HWC application(made by SUP tool) and getting same error:
"error code 503 com.microsoft.sqlserver.jdbc.sqlserverexception the tcp/ip connection to host failed" :(
Any clue??

Will NodaTime work in a web application which has been hosted in a intranet environment without internet connection?

I have a Web application which is hosted in an Intranet Environment without Internet connection. Will NodaTime work in the web application and will it be able to retreive the TimeZone information from the TZDB/ OLSON DB without internet connection?
Yes, a version of TZDB is built into the NodaTime assembly, and is accessible via DateTimeProviders.Tzdb. It's typically the version which was the latest at the time of the release build.
You can supply a newer version too, should you wish to (still without a network connection at execution time, because you'd take this step separately).
What doesn't exist at the moment (and it sounds like you don't need) is using an internet connection to fetch the latest version and use it at execution time.

Resources