Uploading MVC site to server - asp.net-mvc

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.

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.

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

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.

Related

Big picture of domain, mobile app website and server

I am new to backend world, currently I am very confused with these concept relationships and really need some help here.
So currently I already have an iOS app and backend server(using python, hosting at AWS) ready. Now I need to register a new domain name and build a basic website to explain and promote my app.
Let's assume I am using goDaddy to register a domain name as "hello.com", now I have my basic website ready as well, I guess I need to upload html files to goDaddy hosting server then the website should be able to run, but then how can I link it to our python server?
For example, in the iOS code when I am sending a http request, I will need to send it to "https://hello.com/api/xxx", correct? Please correct me if I am wrong.
You should use subdomains for the different servers:
www.hello.com = your static website hosted on Godaddy or wherever
api.hello.com = your Python api server
etc...
To make this work you would just edit your DNS zone on Godaddy (or wherever you have your domain hosted) and create a record for "www" that points to your website server and a record for "api" that points to your API server.

How to publish and host a MVC4 application in your domain?

I have a webdomain www.MyDomain.com and a MVC4 web application MyMVCWebApp.
First I publish the application to a local destination.
For instance: C:\TempLocation
And then I host it to my domain with a FTP-tool (FileZilla??)
The files will be hosted but I can't find the webpage.
Which url do I have to write?
http://www.MyDomain.com/MyMVCWebApp/Home/Index.chtml or something?!
Do I have change the settings in my web.config?
What do I have to do?
You can't host an application on a domain.
An application is hosted on a web server. A domain name is only a way to translate an easy to remember address like "www.google.com" to the web server ip address which looks like 173.194.66.104
It is possible to purchase a domain without a web server.
So before going further:
Check if you actually bought a domain only, or a domain with a server
Your domain should redirect to your server ip address, you can see if he is correctly configured by opening a command prompt and doing
C:\> ping www.yourdomain.com
If this is not the case you will need to update the A record of your domain, and wait for the update to be replicated on DNS server worldwird.
If you have a managed server, you should check your hosting provider website. They usually provide in depth documentation, and they all have a different way to do things. Most of the time indeed you will be able to upload your files using a FTP software such as Filezilla.
However, in order to host a MVC 4 application you need a server with
the IIS web server, which means that you need a Windows server. So if
you have a Linux server, you should contact your hosting provider
support and tell them you made a mistake during your order. (It is
possible to host a MVC 4 application on Linux, but I don't think it
is often provided on managed servers)
If you have a dedicated server you are on your own.
The URL you will have to write to access your application will depends on what you have configured in the RegisterRoutes method of the RouteConfigs.cs file.
I recommend you to watch the last video on this page to have a better overview of the possibilities.

Can I store a clients website within my website

I'm working on a clients pre-existing web site. I would like to take the solution they sent me and host it within my web site so that I can make changes to it and the client can see them without modifying their current live version without their approval.
It would be nice to store on a sub domain. How do I contain the web site within a folder so that it doesn't conflict with my web.config and other files?
All you are talking about is taking their files and hosting them on a domain of your choice ... this is generally deemed a Dev Site. Nothing fancy here, just create a IIS directory or application for the client's version of software on your server machine and map your domain to it via DNS settings.
Here is an article on creating sub domains
http://forums.asp.net/t/874598.aspx

Exporting ASP.NET MVC 3 Project to a potential employer

I made a pretty cool ASP.NET MVC 3 application, and I want to send it as an attachment to a web firm. I tried playing around in visual web developer but could not get anything :( Should I just zip the project folder up and send it that way? Is there somewhere I can host it for free (doubtful). ANy suggestions on this? Thanks for any replies...
I would suggest to use WebMatrix. It's free and it'll install IIS Express which will let your web firm run it locally.
You can host it for free on your home pc and connection.
Set up IIS on your local machine and host the project, forward port 80 on your router to your pc and use a service like dyndns to get a friendly external address.
Its not as nice a solution as your own pay for external hosting and you shouldn't leave the port forwarding in place for a long time as its a potential security risk. That said it demonstrates a few extra skills that most employers would be happy to have.
Failing that or if you want to show them your code as well you can either zip the project or publish to a directory and zip that. Bear in mind that if its over 10 MB a lot of email servers will reject it so you might want to upload to a separate file host like megaupload.

Is it possible to deploy Sharepoint.dll to a server not running MOSS 2007

I have a web service app - that I need to connect to a MOSS server.
for example:
using (SPSite site = new SPSite(this.SiteAddress ))
{
using (SPWeb web = site.OpenWeb())
MOSS is not running on the same server as this web service app. Should this be a problem trying to use the object model. Or do I really have to go the web service route?
As far as I know you need SharePoint installed to use the object model (you may be able to fudge it, but I wouldn't fancy your chances :-)). You options are to either use the built in SharePoint webservices, expose your own "friendly" service and consume it from your other server or move your webservice to the Sharepoint box.
At the very minimum you will need to deploy Microsoft.SharePoint.dll to the machine hosting the web service. If it does require MOSS classes (the one's you've listed only require WSS) then you will also need to deploy the MOSS assembly (I believe it's Microsoft.Office.Server.dll). After that, it's going to become a deploy and pray situation in my experience :)

Resources