user-accounts

Detect if running as Administrator with or without elevated privileges?

与世无争的帅哥 提交于 2019-11-26 01:15:31
问题 I have an application that needs to detect whether or not it is running with elevated privileges or not. I currently have code set up like this: static bool IsAdministrator() { WindowsIdentity identity = WindowsIdentity.GetCurrent(); WindowsPrincipal principal = new WindowsPrincipal(identity); return principal.IsInRole (WindowsBuiltInRole.Administrator); } This works to detect if a user is an administrator or not, but doesn\'t work if running as an administrator without elevation. (For

What are all the user accounts for IIS/ASP.NET and how do they differ?

陌路散爱 提交于 2019-11-26 01:09:39
问题 Under Windows Server 2008 with ASP.NET 4.0 installed there is a whole slew of related user accounts, and I can\'t understand which one is which, how to they differ, and which one is REALLY the one that my app runs under. Here\'s a list: IIS_IUSRS IUSR DefaultAppPool ASP.NET v4.0 NETWORK_SERVICE LOCAL SERVICE. What is what? 回答1: This is a very good question and sadly many developers don't ask enough questions about IIS/ASP.NET security in the context of being a web developer and setting up IIS

Creating and managing a Facebook app from a Business Account [closed]

爷,独闯天下 提交于 2019-11-26 00:38:07
问题 Can I create or manage a Facebook app via a \'business\' account? When I try to access https://developers.facebook.com/apps when logged in as a business account it redirects me back to my homepage and won\'t let me create an app. Context: A business / advertising account (sometimes called a \'gray account\') is a special, now-deprecated type of account Facebook provided to advertisers to manage their Ads and Pages before Business Manager launched - the primary reason people want to use a