Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Accessing/storing arbitrary configuration _files_ outside of wwwroot

$
0
0

Hi.

I'm getting started with ASP.Net 5 and plan to migrate a small site as a first evaluation project. Unfortunately I'm stuck right at the beginning:

This site uses a third party component, using WCF proxies to talk to a webservice. The third party component requires quite a bit of WCF configuration and therefor relies on the app.config/web.config file to provide something like

<system.serviceModel>
    <bindings configSource="Path\To\BindingSection.config"></bindings>
    <client configSource="Path\To\ClientSection.config"></client>
    <behaviors configSource="Path\To\BehaviorSection.config"></behaviors>
  </system.serviceModel>

Now..

1) I see no way to add these configuration files to my project, keeping them editable. I need a way to tell VS/the toolchain that I have these three files, probably in a folder of their own, and they belong to my application. I'd expect them to reside ~next~ to the wwwroot folder in the end. Say 'Bin\', 'MyConfigFileFolder', 'wwwroot' - how can I do that?

2) I also see no way to get a handle to any path but the wwwroot (where these don't belong). Assuming I can make 1) work somehow I guess I could traverse up from wwwroot, but .. surely that's a bad idea? Right now everything (default clr configuration classes, AppDomain.CurrentDomain.BasePath etc.) points to my user directory, to the dnx runtime path ($HOME\.dnx\runtimes\runtimeHere\bin) and .. well - that's not really helpful and (correctly) contains none of my project's binaries.

I hope I didn't completely miss to RTFM - my searches so far have come back empty.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>