I'm very new to servers & ASP.NET in general.
I have finished an mvc application using visual studio 2013, tested it locally & it's working fully. I have a .mdf database in my app_data too.
I purchased a domain (asp.net hosting), but now I'm totally stuck and don't know how to do from now on.
My purchased server has a folder named "wwwroot" that I'm supposed to put my files in.
I used filezilla to copy the files manually, yet I get a runtime error when opening my site.
Please, I know that this is basic, but would you give me detailed steps to how to deploy it to my domain ? where to put the files and what's the logic.
Thank you so much.
You can do it without ftp
An ASP.NET MVC application can be published to a remote server by using the Publish commands in WebMatrix ,Visual Web Developer, or Visual Studio.
This function copies all your application files, controllers, models, images, and all the required DLL files for MVC, Web Pages, Razor, Helpers, and SQL Server Compact (if a database is used).
Create the publish profile
In the New Profile dialog box, enter "Test", and then click OK.
The wizard automatically advances to the Connection tab.
In the Service URL box, enter localhost.
In the Site/application box, enter Default Web Site/ContosoUniversity
In the Destination URL box, enter http://localhost/ContosoUniversity
The Destination URL setting isn't required. When Visual Studio finishes deploying the application, it automatically opens your default browser to this URL. If you don't want the browser to open automatically after deployment, leave this box blank.
Click Validate Connection to verify that the settings are correct and you can connect to IIS on the local computer.
Click Next to advance to the Settings tab.
The Configuration drop-down box specifies the build configuration to deploy. Leave it set to the default value of Release. You won't be deploying Debug builds in this tutorial.
Expand File Publish Options, and then select Exclude files from the App_Data folder.
In the test environment the application will access the databases that you created in the local SQL Server Express instance, not the .mdf files in the App_Data folder.
Leave the Precompile during publishing and Remove additional files at destination check boxes cleared.
Finally click the publish button.
More details, you can learn from this visual-studio-web-deployment/deploying-to-iis link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With