Windows Server 2008 past system crashes? - windows-server-2008-r2

Just wondering does anybody know the default location for .mdmp/.hdmp files on Windows Server 2008, or a quick way of checking what applications on the system have crashed in the past?

The .mdmp/.hdmp files seem to be located here on Windows Server 2008: C:\ProgramData\Microsoft\Windows\WER\ReportQueue
You may be able to find out about what applications have crashed on your system by exporting the system event log as a .txt file and searching this for the word "terminated".

Related

Windows Server 2016 IIS hosted website failed to load dll on a remote file share on AlibabaCloud

I hit an issue on IIS and it bothers me for many days. After I searched all over the web, I still cannot find the right answer so it is time to post on StackOverflow to seek help.
I created a Windows Server 2016 VM on Alibaba Cloud and an SMB file share on Alibaba Cloud. Then I followed this instruction (https://github.com/AlibabaCloudDocs/nas/blob/master/intl.en-US/Best%20Practices/Use%20Windows%20IIS%20and%20NAS%20to%20provide%20Web%20and%20FTP%20services.md) to put my website on the file share and load it to IIS. The problem is this setting works on Windows Server 2012 R2 or lower versions, however, it shows dll load failure on Windows Server 2016. Error looks like this:
Dll load failure: 0x8007003a
I have tried a bunch of settings
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
and searched online but none of the tricks work. I have also tried to use Process Monitor to check the details of w3wp.exe and got this difference between 2012 and 2016:
Windows Server 2012's w3wp.exe gives CreateFile: Success
Windows Server 2016's w3wp.exe gives CreateFile: Invalid Network Response
Comparison between the stacks of 2012 (Left) and 2016 (Right):
Left: 2012, Success; Right: 2016, Invalid Network Response
Another interesting thing is Windows Server 2016 doesn't really send out any SMB packet for this dll open request.
My concern is this is a bug of Windows Server 2016 Kernel.
After writing all the words above, the question is pretty clear: Does anyone know what really happened and is there a solution to load remote dll on Windows Server 2016 for IIS?
Check the root permissions in the IIS server
Reduce the security level permissions

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... :[

Conversion to x64 platform in visual studio failing

So I built a huge website for my company using the AnyCpu option. I didn't think it would matter - I have a 64bit machine with x64 windows, it's getting deployed to a x64 server, and there's no attached dll's, so it should just all be in 64, right?
Well, in the process of trying to implement some security, the company's support told us the application MUST be strictly x64. I figured it was, but to humor them, I went into the configuration manager, and changed all the target cpu, platform etc settings to x64.
Unfortunately now, it breaks when I hit f5 to run it. I've run into this before, I think, and I vaguely remember needing to delete some temp internet files somewhere, but I tried closing VS, deleting the bin folder, deleting the root folder from /framework/tempASPfiles... but I still get the BadImageFormatException - "an attempt was made to load the program with an incorrect format."
What's the best and fastest way to convert an app to x64? and am I right in thinking I need to delete some files somewhere?

Visual Studio 2012 Remote Debugging: Invalid access to memory location

I followed the instructions in this link: http://msdn.microsoft.com/en-us/library/bt727f1t.aspx to install the remote debugger (2012) on my server where the application is running in hope to debug it remotely from my dev machine running visual studio 2012.
I cannot even get as far as viewing the list of processes to attach to on the remote machine. I keep getting "Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named [name]. Invalid access to memory location".
I have managed to successfully connect a few times but then the attach fails immediately then I cannot connect again.
This is causing huge issues for me as I cannot remote debug anything. I must be missing something glaring. Please someone give me a solution.
I've found the only way to correct this is by restarting Visual Studio.
Worked for me. I found it at this blog post about invalid access and remote debugging.
It turns out the one thing I missed was to tell Visual Studio where to find the .pdb symbols relating to the remote process. To do this go to Tools -> Options -> Debugging then in the Symbol (.pdb) locations add the remote location to the pdb files.
To clarify, I was attaching fine but could not break into code. Now I can. Be aware though that there are other hurdles before you get to my stage where I was attaching to the process successfully but could not catch a breakpoint.
I recently had someone else report this and debugged the issue on their machine. The "Invalid access to memory location" errors are due to an issue in Windows, it can be addressed with this hotfix.
I have had this problem in VS 2012, 2013, 2015 and 2017. Based on other answers it is likely that the problem is related to running a 32 bit version of Visual Studio on a 64 bit PC. Sometimes, as others have recommended, restarting Visual Studio fixes the problem but the best solution I've found so far is to start Visual Studio without a solution, open Debug -> Attach to Process, change the Connection Target to the remove server and wait for the process list to load. Then Cancel, do not attach yet. Load your desired solution and then come back to Attach to Process and the remote process list will still be loaded. Connect to your desired process and everything should work properly from then on.

How can I debug a SharePoint EventReceiver with Remote Debugger?

I have written an SharePoint EventReceiver (Windows SharePoint Services 3.0) and want to debug it with Visual Studio 2008 SP1, which runs on a different computer. I have tried the following steps:
Installing the event receiver (I know that this works because a log file proves that the code is executed).
Registering my event receiver class library in the GAC of the SharePoint server (built in Debug mode).
Starting Visual Studio Remote Debugging Monitor on SharePoint server.
Attaching to process w3wp.exe on SharePoint server from local machine.
Unfortunately Visual Studio tells me that the breakpoint I set will not be hit. I guess that when installing the assembly to the GAC the debug symbols (or whatever is needed for debugging) are lost.
What can I do to debug my event receiver? As far as I know the only way to extend SharePoint by custom assemblies is to deploy them to GAC - am I missing here something?
Best Regards
Oliver Hanappi
you could try manually copying your assembly's debug (.pdb) file to the c:\windows\assembly\MSIL\ASSEMBLYNAME\VERSION folder on the target machine and restart IIS.
I just ran into this issue this morning. I was getting the same error about breakpoints not being hit. In my case, it was because I attached to the wrong w3wp.exe process. If you have multiple w3wp.exe processes running on the server - make sure you're attaching to the correct process for debugging.
As an aside - you don't mention running iisreset anywhere in your steps. After you copy your custom event received assembly to the GAC - make sure you run an iisreset so that the web server is picking up your changes.
Hope that helps!!
This question is very old but I just want to share the following command that will assist in picking the right w3wp.exe process.
Assuming you have deployed and enabled your event receiver.
Execute this command on the commandline
%windir%\system32\inetsrv\appcmd.exe list wp
This will print the PID and an indication of which site it is for eg.
C:\Windows\system32>%windir%\system32\inetsrv\appcmd.exe list wp
WP "11632" (applicationPool:4a8cbf60637942ff9a2486d0e682ac54)
WP "16800" (applicationPool:SharePoint Central Administration v4)
WP "23648" (applicationPool:teams)
Now you can attach you Visual Studio debugger to the right process easily.
For example for the SP site teams I will attach to PID 23648

Resources