asp.net - How to get the file path using key from webconfig file -
i have json file stored in d drive. have mentioned same in web config file. please refer below code
<appsettings> <add key="inputfilepath" value="d:\products.json"/> </appsettings>
when try file path using below code, getting null value.
string filepath = configurationmanager.appsettings["inputfilepath"];
please can 1 me on this
you need call this
string filepath = configurationmanager.appsettings["inputfilepath"].tostring();
Comments
Post a Comment