Deploying ASP.NET MVC to windows server 2003? - asp.net

Short Version
I am a beginner program and my experience with launching programs is essentially hitting f5 in visual studio. How do I deploy an ASP.NET MVC app on a windows 2k3 server? When deployed, how would I access/run the site?
Long Version:
I am attempting to launch a simple ASP.NET MVC application to my company's win 2k3 server. I have included the binaries (for the MVC architecture, System.Web.Mvc, etc.) in my project as I am unsure if sp1 for ASP.NET 3.5 is installed.
I have absolutely no experience with server deployment, outside of deploying a simple ASP classic site on my localhost, so far I've been coding with the development server.
What is the process? When I click publish from Visual Studio, I select disk path and place it on my desktop, and then I transfer that folder to the server directory I want. The directory currently works with classic ASP pages, so I am placing my mvc app in a folder in that directory.
How do I access my site? I've tried \server\directory\MyMVCAppFolder\Home and several variations. (I changed my routing in Global.asax to account for .aspx extension, which is a nessecary evil dealing with win 2k3's IIS6)
In summation, how do I deploy a ASP.NET MVC site just having access to the server directory I wish to publish it, and how do I access it as an end user?

Read through this:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

Related

Create a folder on client machine from asp.net web application

I have a very silly question, Can I create a Folder in Client machine from a web application. I have tried to do that.
But I am unable to do so. I have created an asp.net web application using visual studio IDE. And when I executed the web application using visual studio the folder is created.
After that I hosted the web application in IIS and the tried to access the web application. The web application was accessed successfully but the folder was not created on the client machine.
Could you please suggest me the ways of how to do it.
Thanks.
ASP.NET is a framework for creating web sites. The application using ASP.NET is deployed to a web server, for instance IIS. When ASP code behind of aspx/ascx files or C# code of external components is called it's executed on the web server (IIS).
I assume you have implemented the code for creating a folder with C# code. This code is, as I said, executed on server. On your development machine you have client (which is web browser) and server (whis is IIS) on the same machine. So the folder was created.
When you have deployed the application to a separate web server then you separated web server from client. I think your IIS hosted application has created a folder on the machine where IIS were installed. Not on your local machine.
If you want to create a folder on client side you shouldn't use C# ASP.NET code.
You should do some research how to achieve it in other technology. Here's some link for it - How to Create a New Folder for Downloading a File

Migrate a ASP.Net application from one server to another server

I have developed a ASP.Net MVC 4 application with Visual Web Developer Express 2010. It was successfully published/deployed to a remote server A (development server) using the Web Developer's built-in publishing tool and it works perfectly on it IIS 7.0 with the web deployment component.
Now I want to deploy it to another remote server B (production server). This one sits in an isolated environment and does not have Internet access! Even if server B is a replica of server A, its IIS 7.0 does not have the web deployment tool component installed. So the built-in publishing tool does not work for the web deployment option.
I then tried to publish it using the File System option. I copied the exported files to a new folder on IIS on server B. The folder was configured the same way as its counterpart on server A. I tried the URL on server B and it just gave me directory/files listing on the browser instead of the welcome page of the application.
Has anybody got the experience or tips to solve the issue? Thanks.
Cheers,
Alex
edit:
because it a MVC site, the default document doesn't apply. check the following steps:
IIS Extension Less URLs are enabled and allowed.
ASP.NET 4.0 is installed and registered. C:\Windows\Microsoft.NET\Framework\<version> and then aspnet_regiis -i (this will typically force IIS to use the MVC infrastructure instead of using the default document methodology)
Ensure App Pool is in 4.0 Integrated mode.
Ensue that the IIS Advanced Settings for the website are showing the right root folder path.

How to host an ASP.NET Web Applications site on IIS 7

I'm locally working on an ASP.NET Web Applications site. It's almost finished so i wanted to try and put it in an IIS server.
The IIS server is running on a different server. What do i need to do to run my ASP.NET web site in that remote IIS server?
I tried to following:
I copied my entire project directory (so including the .csproj file, the bin folder etc.) to the following location on the remote server, where IIS is running C:\MyProject.
In IIS manager i added a Virtual Directory under Default Web Site. Located my Web Site files in C:\MyProject and added that folder. Then in IIS manager i converted that Virtual Directory to an Application.
But when i browse to my Web Site i get an error:
HTTP Error 500.23 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
So this is probably not the way to do it. I don't think i can just do a Deploy, because i never set up any .axd(?) or anything.
So my question is, what do i have to do in order to run my Web Site on IIS..?
The error will be probably because of, you developed the site in .net version 2.0 and try to run under the Integrated pipeline apppool that runs under .net framework 4.0.
SoL:
Create a new apppool with classic mode and .net framework equals to your application developed framework.
attach the newly created apppool to your virtual directory.
Note: For deployment, you don need to copy .csproj or unwanted solution files to destination location.
If it is otherway around, (i.e,) application is .net 4.0 and apppool is 2.0 please follow the below steps.
Update .net framework in the server to 4.0 if you have only 2.0.
Then register .net 4.0 version in IIS by running the following command in command prompt.
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
Try changing Application pool to Classic. To do that open Advanced settings of your application in IIS manager and change Application Pool. There should be "ASP.NET v4.0 Classic" or something similar according to your framework version.
http://technet.microsoft.com/en-us/library/cc731755(v=ws.10).aspx

Compiling an ASP .NET website into an executable (with server)

I remember many years ago using a program that would allow Classic ASP websites to be compiled into an .EXE and run as if they were under IIS. I used this program to create an interactive CD-ROM. Things like Request.QueryString() etc all worked as expected.
Does anyone know of a similar program that will do this for ASP.NET?
Thanks
UltiDev Web Server Pro. Its a free redistributable web server but requires it to be installed in the client machine.
http://ultidev.com/Forums/yaf_postsm2832_UWS-Screenshots.aspx#post2832
Microsoft calls it Hosted Web Core Applications :
"Hosted Web Core is a new feature in IIS 7 that enables developers to create applications that load the core IIS functionality. Applications that load the Hosted Web Core use a separate configuration file from IIS, and this feature enables software developers to customize the functionality for their applications. For example, you can write an application that uses the Hosted Web Core functionality to serve Web pages and applications from a Web site that is separate from the Web sites that are hosted by IIS on the same server. When the World Wide Web Publishing Service (WWW service) for IIS is recycled, your application will continue to serve Web pages to Web clients."
Not exactly, but you can pre-compile your application and ship it with IIS Express. But this won't be a single executable.

Deploy ASP.NET website alongside ASP.NET MVC website

I am working on an upgrade for a company website. It currently in production using vanilla ASP.NET. For the upgrade I switched the framework to ASP.NET MVC.
I am ready to deploy a beta version of the website. I have tested it locally by creating another website in IIS and just copying the published files there; that works. I only have access to the production web server through FTP. I tried copying those same files into a subdirectory on the root path, but it won't load the website.
How would I go about deploying the ASP.NET MVC project alongside the existing vanilla ASP.NET so that I can get to the beta site with just www.mycompany.com/beta?
I believe you would have to make the beta folder into a virtual directory so that it gets its own Application.
This has to be done through the IIS manager, and can't be done through FTP. In IIS 7.5 there is a menu option for converting a directory to an application ("Convert to Application") when right clicking on a directory. That would work great in this case.
I would suggest that you ask for a subdomain instead, e.g. beta.mycompany.com, that way it will have its own application to run in.

Resources