Last post Nov 23, 2017 05:12 AM by Edward Z
Nov 21, 2017 01:45 PM|jeffcarter|LINK
I am creating a new asp.net core web project (File > New > Project > ASP.NET Core Web Application (.NET Core))
how can i add a installation screen page that allow users to enter database credentials for the installation?
can anyone help with the code please as i am new learning this.
Nov 22, 2017 02:09 AM|Edward Z|LINK
>> how can i add a installation screen page that allow users to enter database credentials for the installation?
Could you share us more information about installation screen? How did you achieve this in original Asp.Net MVC web project?
In general, we store database connection string with user credential in appsettings.json. Could you share us the reason you need to enter database credential by end users?
In addition, I found you have posted multiple threads, but few of them has been closed. I would recommend to mark the helpful reply as answer if your issue has been resolved, if the issue has not, please feel free to keep following.
Nov 22, 2017 05:09 PM|jeffcarter|LINK
I understand that appsettings.json is the place where we add connection string but if I am delivering app so some users, to make it user friendly, i want to add a web page that can be used to accept connection string values
like server name. database name, user credentials etc just like for example when we install site like wordpress, it asks information to setup the site.
I want to make the web app user friendly and can't expect end users modifying the code. So I want a web page that sets the connection string values and appsettings.json is written by those values.
On a webpage, I want user to enter:
On SUBMIT button, i want appsettings.json to get values from this webpage and then run a install.sql file to install database on the empty database name that was provided from the webpage by the user.
Nov 23, 2017 05:12 AM|Edward Z|LINK
>>i want appsettings.json to get values from this webpage and then run a install.sql file to install database on the empty database name that was provided from the webpage by the user.
For this requirement, I think we could split it into many parts, and then achieve them one by one like:
1. Read and Write value from appsettings.json
2. Get value from webpage
3. create database by value from appsettings.json.
For “Read and Write value from appsettings.json”, I suggest you refer link below:
# How to update values into appsetting.json?
If you have any issue with this step, please feel free to let us know.