Uploading MVC site to server

旧城冷巷雨未停 提交于 2019-12-12 13:34:24

问题


I've built an .NET MVC4 website using C#, and now I want to upload it to the internet. I've never uploaded any website so I don't really know what steps I need to do. Does it matter what kind of server to use, because when I run the website through VS2012 I can see it runs with IIS express, but then I realized there are several kinds of servers, like apache. Do I need specific kind of server? And what about domain? what is the difference between domain and server.

Thanks.


回答1:


You will need IIS for running .NET applications. Apache is more suited for Java, PHP and other languages.

The server/hosting is the space where you upload your project files.

The domain or ip address is what in put in your browser bar to be able to access your application. (Ex: google.com is a domain which is pointing to some server where the google site is hosted).Unless you want to access your application by typing the ip address of the server in the browser you need to buy a domain. Take a look here for a more detailed explanation: http://support.hostgator.com/articles/hosting-guide/what-is-the-difference-between-domains-vs-hosting-vs-website

Many web hosting providers allow you to buy a domain when purchasing the hosting serivce but you can buy it separatly and then point it to the ip address of your server.

I dont know many about WIndows web hosting providers but you might start looking in the Microsoft Asp.net website: http://www.microsoft.com/web/hosting/home

In your case you need to choose a hosting provider which supports MVC4.

Then you need to upload your project to the server. Take a look here: http://msdn.microsoft.com/en-us/library/dd410407(v=vs.90).aspx

Your server should come with an FTP account configured. You can use it to upload your files.




回答2:


A domain is only a address in the internet which allows people to find certain places like an adress in a city. So in order to make people find your stuff on the internet you have to have it a domain name.

It's the www.mvc4.com <----domain name

The other thing is the type of Server you need apache is also a server but in most cases it is used with java applications. What you need to do is to find a server which supports C# code and type in .net hosting in google and you will find a lot hosters where you can register domain name for your C# code




回答3:


step 1: Buy domain from website like Godaddy, net4 india etc

Step 2: Buy windows hosting to host MVC Application from web hosting like Godaddy, net4 india etc. Please buy latest framework hosting

Step 3: Build application using MVC(any version)

Step 4: Upload the published files to FTP.

Run the application.



来源:https://stackoverflow.com/questions/17259480/uploading-mvc-site-to-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!