How do I require my Visual Studio published application to run as administrator? -


is there option in application properties ? cannot find tells visual studio application need run in elevated state.

if you're trying on development machine, could:

log in administrator , run visual studio -or- right-click visual studio shortcut , click "run as" , supply administrator account credentials.

if application developing live on server server cannot left logged in administrator while application runs, should either:

  • build in impersonation code of application, run whatever account want run under
  • give account administrator privileges (if allowed) or choose account has desired privileges windowsimpersonationcontext.

info on impersonation:

without information app, i.e. if web app or standard exe or sharepoint web page, it's hard give more specific info. .net web apps, ensure use windows authentication , set app pool run under account admin privileges. note may still need add impersonation code app need higher privileges, if running under account.

for sp pages, need spsecurity.runwithelevatedprivileges(function(){ ... });


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -