-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Here are some tips for deploying the .NET application to IIS on a Windows Server. Hopefully this could help saving some time and effort for developers working on this project in the future.
We use LinqToExcel to read the xlsx file. You may encounter problem suggested in this thread, these two Microsoft Access Database Engines need to be installed.
https://www.microsoft.com/en-us/download/details.aspx?id=13255 (64 bit version on Windows Server)
https://www.microsoft.com/en-us/download/details.aspx?id=23734
Also, be sure to enable IIS to run 32 bits app.
http://stackoverflow.com/questions/25228259/could-not-load-file-or-assembly-linqtoexcel-version
Don't forget to check the security rules of your firewall when configuring the VM. The security rules for database server also need to be configured.
Configure the security rule for database server as well.
Generally when configuring a new VM, you need to install a bunch of windows features. Look at these links for your reference.
http://www.asp.net/mvc/overview/deployment/visual-studio-web-deployment/deploying-to-iis
When deploy from VS to remote server, be sure to enter the correct ip address & port number, make sure that port is open on the remote server.
Don't forget to install Web Management Service from Web deploy. Be sure to check Enable remote connections.
If you get a 404 error when VS trying to connect to remote server, be sure to enable IIS Deployment Handler.
http://stackoverflow.com/questions/13870561/getting-a-404-from-wmsvc-via-msdeploy-exe
Create a folder App_Data in PATH_TO_IIS_ROOT such as C:\inetpub\wwwroot (root path for IIS). This folder is used to hold the uploaded spreadsheet temporarily. However you need to grand read and write permissions for your application.
Right click on the App_Data, go to Properties -> Security where you can grand different control permissions for different groups and users.
Google & Stack overflow are your friends!
To seed the database for the first time, you can just upload the entire ECE inventory excel spreadsheet from the web management portal. Make sure that the table name is Item, which is what the backend code expects.