c# - Starting PowerPoint via Process.Start() in an ASP.NET web application results in PowerPoint starting in the background -


i'm going have asp.net mvc application run on many clients, of have own local version of iis running. i'm trying open powerpoint file process.start(). powerpoint opening (i can see in task manager) running in background , open in foreground.

in order start application i'm using following code:

string powerpointpath = @"c:\program files (x86)\microsoft office\root\office16\powerpnt.exe"; string powerpointfilepath = "\"" + filepath;  process powerpoint = new process(); powerpoint.startinfo.filename = powerpointpath; powerpoint.startinfo.arguments = " /s " + filepath; powerpoint.start(); 

since i'm using local instance of iis, made sure grant read permissions powerpoint executable iis apppool\defaultapppool user. there way ensure powerpoint runs in foreground?

edit: i'm able run code without issue when using iis express in visual studio (in case application using myname\myname user permissions) not seem work equivalently when using local iis (i.e. when application using iis apppool\defaultapppool user).

problem iis runs under service account, , need powerpoint process start logged on interactive user-- whoever is.

maybe try this answer see if works iis process well? (but instead of createprocessasuser maybe use this approach).

another approach write separate run under current user's system tray, , have "listen" signal sent web application, e.g. open named pipe or poll directory file. example, web app copy powerpoint file agreed folder, , tray application monitor (using filesystemwatcher) , automatically open sees in folder. tray app runs interactive user there no cross-user boundary overcome.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -