I want to split web.config and make these settings in an external file.
<customErrors mode="Off" defaultRedirect="~/Home/ErrorPage">
<error statusCode="403" redirect="~/Home/ErrorPage"/>
<error statusCode="404" redirect="~/Home/ErrorPage"/>
</customErrors>
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="noreplay@company.no">
<network host="smtp.company.com" port="25" password="" userName=""/>
</smtp>
</mailSettings>
</system.net>
I use
<appSettings file="my.config"/>
to have MY settings outside.
But what about the default settings?
source
share