.Net MVC Web Application for tracking plant breeding.
The majority of this project was developed using Windows 10 and Visual Studio Enterprise 2017. This development environment is not required to run or contribute to the application.
This project uses .NET Framework 4.8. If you do not have this framework installed, Visual Studio will be unable to open some projects in the application. Select the option to install the framework when prompted, and reopen the solution file in Visual Studio after following the steps.
By default, this application is configured to use a local SQL database named PlantBreeding
. The Usda.PlantBreeding.Data
project contains a publish profile which will create this database, along with the default values necessary for the program to run.
The following steps should be taken to create the database:
- Double click on the
Usda.PlantBreeding.Database.publish.xml
file within theUsda.PlantBreeding.Database
project. - Click the
Load Values
button on the lower left of the menu that appears.- If you do not wish to include the default values, switch the value of the
defaultValues
variable from a 1 to a 0. - NOTE: failing to include default values will cause portions of the application to crash. If you do not include the default values, those values must be provided manually.
- If you do not wish to include the default values, switch the value of the
- Click the
Publish
button on the lower right. - Open Microsoft SQL Management Studio, and ensure that the
PlantBreeding
database was created on your local SQL server.
This application requires that machine key values be set. The following steps should be taken to set these values:
- Open the
Web.config
file located within theUsda.PlantBreeding.Site
project. - Locate the
machineKey
section within the file. This section is located around one third of the way into the file. - Set both the
decryptionKey
andvalidationKey
values, instructions for obtaining these values can be found here.
By default, this application should have the Usda.PlantBreeding.Site
project configured as the startup project.
To run the application, click the green button on the top of the Visual Studio interface, or press f5.
If an error occurs that reads A project with Output Type of...
, right click on the Usda.PlantBreeding.Site
project and select the Set as Startup Project
option.
Then, try running the application again.
This application makes use of reports to display information. To use the reports in this application, the follow steps should be taken:
- Ensure that a report server is setup and avaliable for the application to use.
- Locate the
Usda.PlantBreeding.Reports
project in Visual Studio. - Right click on the project, and select
properties
at the bottom of the menu. - Note the value located under the
Configuration
section in the top left of the menu. Compare this to the value specified in the top left of the Visual Studio user interface. Changes made to the configuration will only be applied when the value in the top left of Visual Studio matches theConfiguration
value. - Within the configuration menu, fill in the values for the
TargetDataset
,TargetDataSourceFolder
,TargetReportFolder
, andTargetServerUrl
with values from your report server. - Exit the menu, and again right click on the project.
- Select the
Deploy
option, and confirm that you wish to deploy the reports to your server. - Locate the
Usda.PlantBreeding.Site
project, and open theWeb.config
file. Locate theReportUrl
andReportPath
application settings. These setting are located near the bottom of the file. - Fill in the
ReportUrl
setting with your report server url, and fill in theReportPath
setting with the path to your report files (this value should be the same as the value for theTargetReportFolder
). - Run the application.
This application includes built in user authentication, based on security groups. By default, this feature is disabled. To enable this feature, the following steps should be taken:
- Locate the
Usda.PlantBreeding.Data
project. - Within this project, open the
Models
folder, and locate theUserRole.cs
file. - Within the file, specify the groups that you wish to have access to the application by filling in the
Admin
andEmployee
values.- NOTE: Currently, the application does not provide different privledges to employee and admin users.
This application includes files which will transform the Web.config
values based on the configuration specified in Visual Studio. To edit these files,
locate the Usda.PlantBreeding.Site
project. Next, find the Web.config
file and expand it. The Web.[ConfigurationName].config
files can be used to replace values in the default Web.config
.
When using these files, consider specifying different connection strings and report server variable values for your configurations. These files can also be used when publishing the application, allowing for
easier configuration management.
- SSRS
- SSIS
- .Net
- TypeScript
- React
- MVVM
- Entity Framework
- Database
Currently, this project is not accepting contributions. However, if you are intested in this application, please email us at [email protected].