How to resolve a System.Security.Principal.IdentityNotMappedException?

The System.Security.Principal.IdenityNotMappedException seems to come up time to time and I thought I would write about what this exception means and how to resolve the issue. The first thing to understand is that in Windows, User Accounts and Groups have a unique and immutable identifier known as a Security Identifier (SID).  (You can find more…

0

Getting Linger to RST a connection in .NET

Jeff here again from the Windows SDK Team. Recently, I had a case where the customer required use of the TCP Linger option to reset a connection when it was closed. I was able to get it to work in native Winsock with no problem, but getting the reset to be sent in .NET was…

0

RunAs Verb (Process.Start) doesn’t work from a LocalSystem .NET Service

The Process.Start method in System.Diagnostics is equivalent to CreateProcess() in Win32. If you want to  launch a process as a different user, in Win32 you either need to call CreateProcessAsUser,  CreateProcessWithLogonW or CreateProcessWithTokenW. In .NET using Process.Start, you can use the  “runas” verb to the same thing. If you have a .NET Service configured with the LocalSystem…

0

Poor Network Performance with the CPU Stuck in WfpAleFastUdplnspection()

 Jeff here again. Today’s post is about the Windows Firewall and a potential performance problem. When Windows 7, 8, 8.1, 2008 R2, 2012 or 2012 R2 are under very heavy load (20,000+ incoming UDP connections) Windowsperformance may suffer. Symptoms include very high CPU usage, and very slow network throughput. This is caused by the Windows…

0

GetShortPathName() doesn’t return short path name

Another amazing write up from Nitin Dhawan, Senior Support Engineer, Windows SDK team, EMEA/INDIA Background of the issue ====================== This Issue was reported as, GetShortPathName() returned C:\veryverylongpath as short path for a given path C:\veryverylongpath, while expectation was that it should return something like C:\veryve~1 as the short path name. Due to this reason, the business…

0

UDP – Closesocket() takes upto 5 seconds to return in disconnect/remote host down scenario due to pending data to send

The following write up from the support lines comes to us by one of the senior and key resources in Windows SDK EMEA/INDIA team, Nitin Dhawan Socket(DATAGRAM…); Sendto(….); Closesocket();  The above works just fine, except the scenario when remote host is down, or just that the cable is unplugged. The socket() and sendto() calls would…

0

Windows Firewall interfaces, INetFwProducts, and InetFwProduct.

  Jeff here again. Today I have samples of the Windows Firewall interfaces, INetFwProducts, and InetFwProduct. #include “stdafx.h”#include <windows.h>#include <stdio.h>#include <netfw.h>  #pragma comment( lib, “ole32.lib” )  // Forward declarations HRESULT    FWProductsCOMInitialize(INetFwProducts** ppFwProducts);  int _tmain(int argc, _TCHAR* argv[]){    HRESULT hrComInit = S_OK;    HRESULT hr = S_OK;    long cnt = 0;    INetFwProduct *pFwProduct = NULL;    INetFwProducts *pFwProducts =…

0

Why am I receiving the Error Code 740 – “The requested operation requires elevation” when launching/starting an Application

Sometimes CreateProcess(), CreateProcessAsUser(), CreateProcessWithTokenW() or CreateProcessWithLogonW() may fail with the error code 740 or “The requested operation requires elevation”.  What does this mean and how do you resolve the issue?  On Windows VISTA, we introduced User Access Control (UAC), the idea is to force users to NOT run as an Administrator.  If an application required…

0

Get a kernel dump of a 2012 R2 Hyper-V server with Powershell

Jeff here, There is a new Powershell command that you can use to get a kernel dump of a VM in Server 2012 R2. The cmdlet injects a non-maskableinterrupt into the VM. (This is an old method of getting a kernel dump, paper clip jammed in the ISA bus, anyone?) Since the NMI is sent…

1