Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can deploy to folder different than BIN?
Message
 
 
General information
Forum:
ASP.NET
Category:
MVC
Miscellaneous
Thread ID:
01644106
Message ID:
01644132
Views:
33
>>Hi,
>>
>>When you deploy a Web API project, can you put .DLLs in a folder other than .BIN? Is there a setting in Web.config that will make this work? (e.g. if I create a physical folder named MY_BIN)
>>
>>TIA
>
>Haven't tried it but you can set the Output path on the Project properties / Build tab (or hack the relevant entries in the .cproj file)
>Another alternative would be to leave that alone and copy the bin contents to your own folder in the Post-build event (Build Events tab)
>Why do you want to do this ?

I would prefer not to change any Project properties since it will affect other deployments. To answer you questions as to Why.
I want to install/deploy this Web API to my public site (on DiscountASP.NET). And I would prefer to separate it from other files already on the site. This way, I am not going to be confused (when maintaining this Web API) the purpose of this or that .DLL. And I want this Web API Web.config to be in a sub-folder, again, so that it does not conflict with already existing Web.config.
I was hoping that there is a setting in Web.config that could be "pointing" to the "new/different" name of the BIN folder.
Thank you.

UPDATE. The following thread seem to show how to have DLLs in different sub-folder BIN. So I will create a sub-folder "mywebapi" and then a subfolder "mywebapi/bin" and place all DLLs to the sub-folder "bin". I will just need to figure out what URL will start in the "mywebapi" folder and will use the web.config in this folder. If you can suggest, please let me know.

https://stackoverflow.com/questions/12057526/how-to-have-multiple-bin-folders-in-an-asp-net-application

UPDATE 2. The above thread works. I added the line they suggested to the web.config and it works. Note that the entry in the web.config has to reference the physical folder name (the way it is stored on the web server) which I got from the error message.

Thank you for listening. I am sure I will have more questions :)
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform