This Gist file is dedicated for the Ask me anything session. The next session will be on the June 7th - 12:00 AM Tunis localtime.
Just ask your question here π
See you soon ! π
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using Serilog; | |
using Serilog.Configuration; | |
using Serilog.Core; | |
using Serilog.Events; | |
namespace ConsoleApp24 |
using Owin; | |
namespace WindowsAuthAppToAADDemo | |
{ | |
public partial class Startup | |
{ | |
public void Configuration(IAppBuilder app) | |
{ | |
ConfigureAuth(app); | |
} |
This Gist file is dedicated for the Ask me anything session. The next session will be on the June 7th - 12:00 AM Tunis localtime.
Just ask your question here π
See you soon ! π
public static void RunAsDesktopUser(string fileName) | |
{ | |
if (string.IsNullOrWhiteSpace(fileName)) | |
throw new ArgumentException("Value cannot be null or whitespace.", nameof(fileName)); | |
// To start process as shell user you will need to carry out these steps: | |
// 1. Enable the SeIncreaseQuotaPrivilege in your current token | |
// 2. Get an HWND representing the desktop shell (GetShellWindow) | |
// 3. Get the Process ID(PID) of the process associated with that window(GetWindowThreadProcessId) | |
// 4. Open that process(OpenProcess) |
Here are all the demos shown in our session with full repos, azd templates, and a few notes. Enjoy, and let us know what you think! -- Scott and Paul