0

I have a set of executable files that are used from ASP.NET process (by using Process.Start).

It seems that MSDeploy doesn't support subfolders from _bin_deployableAssemblies. When I use _bin_deployableAssemblies/mystuff it doesn't get det deployed to bin/mystuff. It is just ignored.

Where should the project native executable files go so that the project can be deployed without additional config.

The simplest thing would be to put it under App_Data/mystuff, but that is just too dirty.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Dmytrii Nagirniak
  • 23,696
  • 13
  • 75
  • 130
  • [Embedding an external executable inside a C# program][1] [1]: http://stackoverflow.com/questions/798655/embedding-an-external-executable-inside-a-c-program – rick schott Aug 29 '11 at 03:17
  • @rick schott, that is ridiculous idea. Why would I have to **extract the file** from resource, **save** it locally and **run** instead of **just running** it? In any case, I still need to save the embedded resource but now at runtime, which gives even more hassle, including permissions etc. – Dmytrii Nagirniak Aug 29 '11 at 03:25
  • not to mention its a pain in the butt to manage versions as any external exe update requires an entire application redeployment. silly : ) – Adam Tuliper Aug 29 '11 at 03:43
  • Dude, you asked for a way and you don't want to use the simple solutions provided by ASP.NET. To your point, I don't know why you would want to do start exes from your web app in the first place[not a question]. – rick schott Aug 29 '11 at 04:26
  • @rick, What is the simple solution provided by ASP.NET? – Dmytrii Nagirniak Aug 29 '11 at 04:31

1 Answers1

0

Any reason not to just create a folder (ex. Utilties) off of the root and set it's type as "Content"?

Adam Tuliper
  • 29,982
  • 4
  • 53
  • 71
  • I don't want that folder to be publicly available. Instead of configuring to make it protected I prefer to use some standard way of doing it. `bin` is already protected same as `App_Data` and other. So no reason to reinvent the wheel. – Dmytrii Nagirniak Aug 29 '11 at 03:22
  • BTW, is it an answer or a question? :) – Dmytrii Nagirniak Aug 29 '11 at 03:22
  • Its an answer unless you feel it wont help you in that case its a question : ) If you want it to be protected then use what is built into the framework. Bin isn't for 'your' external processes its for the applications specific binaries so that's not a standard way. App_Data is of course, not for this either, so really - a separate defined folder is the way to go with aspnet auth rules set in web.config to prevent access to this folder which will work fine since Process.Start uses ACLs and not web.config security. – Adam Tuliper Aug 29 '11 at 03:42
  • I just can't believe that there is no a separate folder (or some standard way) in ASP.NET for such purposes. – Dmytrii Nagirniak Aug 29 '11 at 03:54
  • 1
    Very few ASP.NET applications launch external exes! – John Saunders Aug 29 '11 at 04:09
  • @John Saunders, I know. But that's beside the point in this context. And no, there isn't a way of doing the same nativly from .NET. – Dmytrii Nagirniak Aug 29 '11 at 04:28
  • @Dmytrii Since it isn't standard, there isn't a standard way to do it : ) There is a way using the provided features to do it as I said above. As to John's point though- this is rare (but I have seen it done), hence to do it, stick to what is already provided for file access IE a folder, and secure it. Most 'external' items are components now as opposed to exe's since the web model doesn't lend itself nicely to running exes - for instance a very restricted Network Service account hence there's no driving reason for them to provide something special here for something that isnt typical. – Adam Tuliper Aug 29 '11 at 06:01