How to publish MVC3 razor with WCF service on IIS 7.5 - asp.net-mvc-3

I have created a service-oriented MVC3 application in Visual Studio 2010. I have used layered architecture for my application. It has a separate project for WCF Services,and separate projects for BLL and DAL, and also one for Entities. Now I want to publish my MVC application on IIS 7.5. I have Windows 7 Home Premium, and I use SQL Server 2008 R2 for my database. How can I publish it in IIS 7.5?
Note: I have created library projects for Entities, BLL, and DAL and use MVC3 for web project and WCF Service Application for WCF services.
I already tried to publish it by using this tutorial, but when I run the application in a browser, it does not load my Javascript, jquery and CSS files, and it give Network error 404 file not found.

Use, #Url.Content("~/blah/blah") to convert the relative path to an application absolute path.

Related

Deploying MVC & WCF on Windows Azure Websites

I have a solution consist of 2 projects:
- MVC
- WCF
I'm using the visual studio online "I used a TFS on separated VM too but same problem".
Issue: I successfully deployed only the MVC but the wcf not working!!
Request: I hope to find an answer for how to deploy this solution on windows azure website with remotely Database!!
I believe that the continuous delivery to azure template will only deploy a single application. You would need to create a custom ContiniousDeliveryToAzure.xaml to deploy more than one site in a single build.
Or you can put each project into its own build.
If you have a shared component then you should publish it with Nuget and consume it with both other projects.

How to set up Windows Web Server 2008 R2 for MVC Applications

What I am looking for and seem unable to find, it's late and I'm tired, is a step by step guide on how to set up windows 2008 server to run asp.net mvc applications.
I am a web applications developer, amongst other things, and can do that bit fine. Normally I let someone else, like the hosting company, worry about the setup and just publish using 1-Click with web deploy or ftp.
However, for this projects I have a local Windows Web Server 2008 R2 installed but I don't know how to set it up to run the application. the deploy works, all the files arrive in the correct folder on the server, but can I get it to work?
No.
Hence the question.
For your information the app is built using Sharp Architecture, MVC3 and Razor and targeted at .NET 4 which is installed on both my development PC and the server.
Any suggestions?
Thanks.
Best thing would be to download Windows Web Platform installer and select the options you want, for example, .NET 4, MVC3 etc etc ...
Then, remember to enable ASP.NET in your IIS (under Roles or something...).

How to Deploy and Configure an MVC3 application using IIS6

I have created an application installer for my MVC3 project and have followed the BIN Deployment suggestions found online.
My site has been installed but I don't get any pages displayed.
This is how the VS2010 installer project looks
and this is how I have IIS setup
How do you get the Home Index page to be the default page as it is when I run the application through Visual studio?
IIS 6.0 doesn't support extensionless urls out of the box. This means that if you try to navigate to /Home/Index, IIS 6.0 doesn't know that this is an ASP.NET application and nothing happens. Extensionless urls are supported out of the box starting from IIS 7.0 when running the application in managed pipeline mode.
You will need to associate the unmanaged aspnet_isapi.dll filter with ASP.NET if you want to achieve that. Phil Haack covered how this topic in his blog post (ASP.NET 4.0) and this post (for CLR 2.0, which is not your case since you are using ASP.NET MVC 3).

Visual Studio 2010 published web site returns "Could not load assembly App_Web_xxxxxx.dll"

I am working on client's application in which we have two servers - development server and testing server. We first develop applications on development server and then publish it and host it on test server for client testing.
Testing server has Microsoft .NET framework 3.5 SP1. On development we have Visual Studio 2010.
We publish the website on development server using VS 2010 and then copy that folder to testing server and host it on its IIS.
Whenever we try access any aspx page of site hosted on testing server, we get error:
Could not load assembly App_Web_xxxxxx.dll". Make sure it is compiled before accessing the page
What can I do to resolve this?
This could be due to a lot of reasons.
I would start by trying one of the following things..
Make sure your IIS Site has the correct .net version specified - same as your application
Make sure you have all the required .net components installed in windows features (control panetl)
Look at event viewer for more errors and post it here
OK guys here is the solution.
Since my testing server is having Microsoft .NET framework 3.5 so on the development server while publishing from VS 2010, I have to choose target framework as 3.5.
Do this:
Right click web site -> Property Page -> Build -> Change the target framework.
After doing this setting, publish the web site again.

Azure Full IIS deployment issue - TypeLoadException

I have an application using the Azure 1.4 SDK (previously 1.3 with same problem). If I try and deploy the application as Full IIS I get the following error in Intellitrace logs.
System.TypeLoadException: Unable to load the role entry point due to the following exceptions: System.IO.FileLoadException: Could not load the file or assembly 'System.Web.Mvc, Version=2.0.0.0..blah..The located assemblies manifest does not match the assembly reference.
The web site is using ASP.NET MVC 3, not version 2. It seems the Full IIS is looking for the wrong versions of the dll's. I have set the MVC dll's in the project to Copy Local so they should be deployed in the bin directory.
If I deploy the site as a legacy hosted web core by commenting out the sections in the ServiceDefinition.csdef it all deploys and works fine.
This seems like it was an application that may have been created as an MVC2 application, and then later you migrated it to MVC3, correct? The reason it is failing is that you have both MVC2 and MVC3 installed on your machine, and when you're running it locally, your application is loading MVC2 out of the GAC. When you deploy it to Azure it can't find MVC 2, since MVC is not installed on the base Azure images that you get when you create a new Deployment.
I would check through my config files and look very closely for any references to MVC 2.0. Take a look at a reference like this and make sure you haven't overlooked any steps. You may have neglected to change the project type guid, or missed one of the config files.

Resources