DumpCount, DumpFolder for WER on Windows 2012 R2 server not working - windows-server-2012

I have an application which crashes every time on win 2012 server and generates a huge amount of dumps in the app folder. To restrict this to a minimum, I have been trying to set DumpCount and LocalDumps settings as per article here but doesn't help, dumps are generated too many and causing disk problems.
https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
https://learn.microsoft.com/en-us/windows/win32/wer/wer-settings
Notice that I have set registry as
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\MyApp.exe
and within this MyApp.exe with parameters below
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\CrashMe.exe]
"DumpFolder"=hex(2):43,00,3a,00,5c,00,54,00,65,00,6d,00,70,00,5c,00,64,00,75,\
00,6d,00,70,00,73,00,00,00
"DumpType"=dword:00000002
"DumpCount"=dword:00000003
Even I did try settings in HKCU and WOW6432Node note, restart but doesn't help.
Also, notice that I did testing on Win10 client, it works there!

Related

IIS Just in Time Popup

We had a classic ASP application that had to be migrated to a new Windows Server (Windows Server 2012 R2 Datacenter). IIS was already setup and we migrated the files configured the URL and DNS, as well as setting up the classic ASP components for IIS. The web application initially opens okay but the error below pops up on the server continually.
We checked the relevant site was configured to run 32bit and we ensured that in the sites "Debugging properties" the "Enable Server-side Debugging" was set to false. Also, all those testing the site we ensured in Internet Options >> Advanced the two values of "Disable script debugging" were checked. But this did not resolve the error. I believe we have all the necessary components setup in the server roles
I then followed this URL and deleted certain registry entries and restarted the server.
https://learn.microsoft.com/en-gb/visualstudio/debugger/just-in-time-debugging-in-visual-studio?view=vs-2015
This seemed to take away the above error but then the relevant application pool continually stops. I checked the application logs and at each time the application pool stops there is an error stating below
Since creating this ticket I installed DebugDiag 2 and set up a rule for IIS "Crashing". Ran the application until the relevant IIS Application Pool stopped and examined the Dump files created by the rule. All of them appear to have one error concerning "VCRUNTIME140.dll". See image below.
I found that this was a common issue and related to Visual C++ Redistributable 2015. I looked at installed programs and there was versions 2010, 2013 and 2017 installed. Microsoft state that after version 2013 subsequent versions incorporate the last. So I installed the latest version of Visual C++ Redistributable and restarted the server. This made no difference. So I uninstalled the latest version and installed version 2015 and restarted but again the application pool still stops after several actions on the web application.
Does anyone know how do I resolve this please?

How to increase open file limit in windows server 2012

We have an application deployed in the windows server 2012 and I am trying to test the application using JMeter. I get Socketexception while tried to increase the number of users.
I think the issue is open file limit.
I just read somewhere that on windows we can see the limit by entering "net config server" in CMD as the admin user. But couldn't find anything which can help me to edit the limit.
Thanks,
Dhruval

Applicationhost.config not showing changes

We have a webserver hosted in Microsoft Azure. It's a Windows Server 2008 R2 Datacenter edition, 64 bit.
For a website hosted on this machine, I need to make changes to the applicationhost.config file. However, changes I made to IIS recently are not shown in the config. I've added a new application pool and added this specific website to that application pool. I restarted the website, the 'Date Modified' of the file is updated, but the application pool is not present.
Right now I'm editing the file in C:\Windows\System32\inetsrv\config, but there's also one in C:\Windows\SysWOW64\inetsrv\Config, but the latter hasn't updated for months.
Am I looking at the wrong file? Are changes not saved right away? Do I need to restart IIS completely and not just the relevant website?
The real issue is that there are two inetsvr directories, one for 32 bits and another for 64 bits. The 32 bits 'version', probably dormant and not updated, is under SysWOW64 !!!
When you open a file on %SystemDrive%\Windows\System32\inetsrv using a 32bits application, Windows will redirect you, with no warning, to %SystemDrive%\Windows\SysWOW64\inetsrv possible a very obsolete file. Interesting no?
Using a 64bits editor like Notepad++ will open the 'right' active configuration file.
The following hack will make the (active) 64 bits location, accessible from 32 bits apps (for example, some Visual Studio versions).
cd /d "%SystemDrive%\Windows\SysWOW64\inetsrv"
move Config Config.OLD
mklink /d Config "%SystemDrive%\Windows\System32\inetsrv\Config"
The solution was to restart IIS as #RickStrahl mentioned, but even though it seems you can properly open and edit the applicationHost.config with Notepad++ or the Visual Studio installed on the server and configured to open .config files, it's not actually showing you the correct content!.
I installed Notepad2 x64 and then I could see the application pool I was looking for.
Bloody brilliant Microsoft... :[

Why this Help Desk System redirects me to the old server?

I am using the Liberum Help Desk as a Service Request System. It is host on a server that is running Windows Server 2008 R2 32-bit. I configured it with an Access database. It works well. Now, I am trying to shift it to another server running Windows Server 2008 R2 64-bit. At the beginning, I have an error with the JET driver, because there is no JET driver for the 64-bit machines. I fixed it by enabling 32-bit option in the advanced settings of the application pool. However, I am still facing a strange problem which is the following:
When I tried to browse the system that is on the new server (64-bit), it will redirect me to the system hosted on the old server (32-bit) and I don't know why. I checked the code to see if there is any link or something for redirecting me to the old server and I did find anything.
So how to fix this problem? what is the reason of it?
Finally, I found the solution. The problem was with the Access Database; there is a table called config and inside it there is a column for determining the link. I changed the link there and everything works fine.

Why does Crystal Reports throw a LoadSaveReportException in IIS7 but works in Cassini / desktop application?

I have a method that loads a Crystal Reports file, sets the appropriate login information, and then generates a PDF.
ReportDocument rep = new ReportDocument();
rep.Load(...);
// Set table LogOnInfo
rep.ExportToStream(ExportFormatType.PortableDocFormat);
// Save the PDF to disk or return it as web request
This exact code works in both
A stand-alone WPF desktop application
An ASP.NET MVC website running through Cassini launched from VS
but does not work when the same website is deployed to IIS7. It gives a rather unhelpful message and stacktrace.
An error has occurred while attempting to load the Crystal Reports runtime.
Either the Crystal Reports registry
key permissions are insufficient or
the Crystal Reports runtime is not
installed correctly.
Please install the appropriate Crystal
Reports redistributable
(CRRedist*.msi) that contains the
version of the Crystal Reports runtime
(x86, x64, or Itanium) that is
required. Please go to
http://www.businessobjects.com/support
for more information.
Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: An error has occurred while attempting to load the Crystal Reports runtime.
Note that I am using CR 2008 SP2 and the files haven't been named CRRedist... since 10.5 so someone has been forgetting to update the messages somewhere :) Here is a list of all the CR runtimes.
So why would running the same code referencing the same assemblies work in the two situations listed above but not in a deployed website?
I found this suggestion to give the IIS user write access to the temp folder, and it does appear that the Crystal runtime does some work there but I still get the same error even after giving IIS_IUSR or IIS AppPool\DefaultAppPool full access to %TEMP%.
I have also tried changing the app pool to use my account as the identity and still receive the same error message so I'm not convinced it's a permissions issue.
It turns out that for any newer versions of Crystal Reports after 10.5 (the one that is bundled with VS2008) there are no 64-bit runtimes.
The "simple" solution is to make the app pool 32-bit and then everything works ok.
There are more explanations found here (along with the expected angry responses)
You have to install CR version 13, download the msm and build an installer with VSS. Finalley execute the installer (you build) on your server.
Good luck!

Resources