I have an ASP.NET Web role that runs an audio effects utility on sound files generated when a particular Controller method is called. I understand completely how to use the Process object to execute a process, set the working directory, wait for exit, and check the exit code.
Here are my specific questions:
If I have the EXE file along with its dependencies in a folder in my ASP.NET project, what do I need to do so that they are put in a non-public directory when the Web Role is published to Azure? Or are they copied to the web site as part of the published package? If so, how do I get the EXE files final location? I assume I just can't reference the EXE via an unadorned "//.exe" path. In other words, I need to know what to do with the EXE file and dependencies (if anything) so it run's correctly and also I need to know where I will find it in the published directory structure so I can pass that info to the Process object's StartInfo property.
Are there any web.config file changes I need to make or directory permission settings I need to change to make this work?
NOTE: I am aware of the caveats of running a process from an ASP.NET thread due to scalability and time-out issues:
Launching new process from ASP.NET
However, most of the time the utility will not need to be run because most of the sound files returned by the Controller method have already been generated and are being pulled from a BLOB field in a database. Also, I've timed the conversion and it takes about 200 to 500 milliseconds to run at worst using a single core.
one way of doing this is:
<location path="MyFolder">
<system.web>
<authorization>
<deny users="*"/>
</authorization>
</system.web>
</location>
there may be other ways of preventing access to this folder via:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.