How do I get an ASP.Net MVC application running on my host? - asp.net-mvc

Is there something special you usually have to do? I have a DailyRazor .Net Starter account, but it won't run my MVC app. Any ideas?
I have contacted support but they said it should work, but it's not... Thought maybe someone here could help me faster.

I've been through this with Gearhost.
Your host needs to install the following on your IIS server:
ASP.NET 3.5 SP1
ASP.NET MVC 1.0
They need to enable the following settings:
If it's running IIS 6 on Windows 2003:
Enable Wildcard Mappings: (1), (2)
If it's running IIS 7 on Windows 2008, then you don't need to do anything.
Edit:
Regarding your Linq error; that means they probably don't have the correct version of the .NET Framework installed. I'd open a ticket and ask them. If they seem unwilling to help or to upgrade your server, there are plenty of hosts that will, and I can make recommendations if you'd like.

It sounds like the host does not have the latest version of the .net framework installed (3.5) , or if they do, your web application is perhaps set up to use an older version of asp.net.
Also, if they happen to be running on IIS6, there are a few extra steps they may have to do:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

Try copying the MVC assemblies (System.Web. Abstractions, MVC, and Routing) to your Bin folder.

In reference to your error, you can try adding the System.Linq dll to your bin folder to see if that gets rid of that error. Does your host have .NET 3.5 installed?

You need to copy System.Core.dll to your Bin folder.
Alternatively, ask DailyRazor to install .Net 3.5. (They might not listen, though)

Related

.Net MVC Web Deployment

I have Visutal Studio 2012, MVC 4 & Razor. I am having trouble getting a website up and running with this technology.
The Web Server is a Windows Server 2008 server. I tried deploying using the Web Deploy method but am consistently getting something like 'set ACL" error.
I tried deploying using the File System. All files got deployed, but when I try and run the website, it fails because of missing ASP.NET MVC infrastruccture files.
Two things:
•If I use Web-Deploy, how do I solve the ACL error, because I assume with this method, everything needed will get deployed.
Note that the Web Deploy 3.0 service is on the server and started.
•If I use File System, where can I find the downloads needed to deploy on the server where MVC WILL work.
◦Note that I downloaded the 4.5 Framework and was successfully installed.
You need to be a bit more precise with what you need help with.
What's the exact error.
Often times you need to give the IIS users group access to at least read from the directory where you've deployed. Did you do this already?
Do you have .NET 4.5 and MVC4 installed on the server? If not, are you expecting those DLLs to be "packaged" with your deployment? They generally are not since they are "standard" assemblies. But if you want them to be included in your deployment you can do that by selecting the references in VS and saying "copy." This is not recommended because when you install patches to .NET and MVC on the server, those updates will not carry through to your app, since it'll use the local (old) copies of your assemblies.
This may be more of an IIS issue, but not sure based on the details in your question.
Check that the application pool that the site is running under is using .net 4.0.
Just a thought I would check.

ASP.NET MVC3 not working in Windows 8

is there anything special I need to do to get ASP.NET MVC3 enabled on my Windows 8 Release Preview install? Creating even a blank ASP.Net MVC3 Razor application in VS2010, deploying to the local IIS instance as a new application, and loading the page in the browser doesn't work. I'm met with the following error:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
So I've then gone in to the new VS2010 project, right click, select "Add Deployable Dependencies" and selected "ASP.NET MVC" along with "ASP.NET Web Page with Razor syntax"
Then I re-deploy the project to local IIS application. No change. Still "web server not configured to list contents of the directory".
It's worth noting the VS 2010 Development Web Server works fine.
Any ideas?
Found it. Turns out even though I'm using ASP.NET MVC3 and had the .Net 4.0 framework installed, the Windows 8 "feature" for ASP.NET 4.5 needed to be installed for all this to wire up. Seems a bit counter-intuitive, but changing that did it.
You may want to consider running the MVC3 installer on your host machine so that all dependencies for MVC3 projects are stored in the GAC. If you need the install package you can download it from:
http://www.microsoft.com/web/gallery/install.aspx?appid=MVC3
I can't verify that this works on the Windows 8 preview, but it would be my first instinct upon running into your problem.
Did you ensure that the worker process for the site is configured for .NET 4?
When you say you "Deployed", how did you do that? It sounds like the folder is not being set to an application.
For me .NET 3.5 was not installed for IIS 8 in Windows features. Although I'm pretty sure my app is .NET 4.0... Worth trying though.
I had problems installing MVC3 MS VS 2010. Windows 8 x64. The platform installer shows no errors.
Root cause : aspnetwebpages.msi breaks updating web.config files. I updated two web.config files which appeared to only contain blanks.
Here are my directions:
Ensure C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config is valid. Use web.config.default, copy then rename to web.config to correct if it looks wrong.
Ensure C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config is valid. Use web.config.default, copy then rename to web.config to correct if it looks wrong.
I don't know why the files were bad in the first place.

Hosting my ASP.NET MVC 3 Application

What do I need to do to my Windows 2008 / IIS 7.5 server to allow me to host my new MVC3 applications. It already has .NET 4.0 Framework installed...
I dont want to use the /Bin deployment that I read of on the Internet.
Thanks Paul
You just need to run the MVC3 installer!
All of the DLLs required by your app that are not part of the framework itself SHOULD be deployed into your applications ~/bin folder. Putting DLLs in the GAC is evil.
Benefits of ~/bin deployment:
Your application is guaranteed to have the correct (which is not always the same as the latest) version of each assembly that it requires
Redploying your application keeps those dependencies in sync with your app's requirements.
If you remove the app from the server, you don't leave shrapnel from the installation laying around that is no longer required.
~/bin installation is much, much cleaner than any alternative. I'd like to hear your reasons for avoiding it.
Requirements for MVC3:
Download and install MVC3.
Update your web application project to reference the MVC3 assemblies. (You might create a new, empty MVC3 app and compare the assembly references it includes)
Rebuild and run your unit tests. (You do have a test project, don't you?)
Have a serious look at Razor - it rocks.
It's refers to MVC2 but should work all the same
http://weblogs.asp.net/jgalloway/archive/2010/07/13/server-installation-options-for-asp-net-mvc-2.aspx
If you have access to RDP into your server perhaps the Web Platform installer is the "easiest"
http://www.asp.net/downloads

I want to use ASP.Net MVC. My server is Win 2003 and it uses IIS 6, will all this work together?

ASP.Net MVC is finally available as version 1. I have been waiting for an official release before I try to start using it. At the moment I have a dedicated web server which I have complete access to via remote desktop. It is running Win 2003 Server with IIS6 (I think it is IIS6, they don't print the version in the Help -> About but a bit of research says that IIS6 is the standard on Win 2003 Server) and .Net 2.0.
Obviously I will need to upgrade the framework to .Net 3.0. But after that, should everything else work? I thought I saw somewhere that .Net 3.0 insists on IIS7. If that is true is IIS7 compatible with Windows 2003 Server?
Also any literature you can point me to or any tips on making the upgrade/transition?
EDIT:
Sorry too excited guys. Yes I meant .Net 3.5. :D
EDIT: LAST QUESTION:
Someone mentioned a routing problem. I remember reading that somewhere but can't quite remember. My project relies heavily on a good Google Ranking and I don't want to sacrifice page rank because of a routing problem. Will I still be able to get around it with IIS6? Thanks again. :D
You'll need .NET Framework 3.5, not 3.0. Better be SP1. There'll be no problems with that setup. Make sure your read http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
By the way, IIS7 cannot be installed on Windows Server 2003. ASP.NET MVC and .NET Framework 3.5 SP1 do not rely on any IIS7 specific features.
As per the link mentioned by Andrew (above), you have two choices with IIS6:
Add the mvc prefix to the routes (eg. {controller}.mvc/{action}/{id} )
Use the wildcard mapping (only IIS6/Win2k3 and not win XP/iis 5.1)
The drawback of number 2 is that it can cause performance problems if you have a lot of traffic. However, there is workaround to this that involves creating a separate subdirectory for static files like gifs/jpegs/scripts etc. See Steve Sanderson’s blog post for details
Yes, it's possible to run an ASP.Net MVC site on Windows 2003 server running IIS 6.0, though there's a little more configuration to do in IIS 6.0 because of the routing. Oh, and you'll need .Net Framework 3.5 SP1.
The documentation and steps you'll need to take are on the ASP.Net MVC deployment page :o)
On Windows 2003/XP, we use IIS7 Express to host our ASP.NET 4 MVC 3 web applications.

"the project type is not supported by this installation" error

I have installed VS 2008 SP1 on W2k3 OS. After I installed ASP.NET MVC beta and tried creating ASP.NET MVC type project I get the following error.
"the project type is not supported by this installation"
Let me know if you have fixed this issue.
I tried some of the solutions posted here but still no joy. Finally I replaced the ProjectTypeGuids to this one below in the project file and it loaded fine
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
I came across something while having issues of my own.
In short, try:
Run the Visual Studio Command Prompt as Admin.
Execute:
devenv /setup
It then whirs away for a bit (VS2008 will not open), once the prompt returns fire up VS and all (may) be back to normal.
I came across this when my MVC projects got messed up when trying to get the Entity Framework up and running :)
The problem is that MVC 2 is not completely backward compatible. Visual Studio cannot open MVC 1 apps without MVC 1 installed. So if you just install MVC 1, which can install together with MVC 2 you should be just fine.
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b
I had the same problem with MVC v1. Turns out that I hadn't installed the "Visual Web Developer" feature.
This SO user had the same issue.
My situation was slightly different: I was trying to open an existing MVC 3 project. Turns out I didn't have MVC 3, installing it from here fixed the problem for me.
i installed visual web developer from the Visual studio 2008 installation dvd and that fixed the problem
Tried to install ASP.NET MVC 1.0. It works to me.
ewalshe - same thing worked for me. I know this is an old post, just wanted to put this out there for anybody else. I had an existing solution in source control (Vault), and wanted to set up my home computer for development. I installed Visual Studio 2008 at home without the following options:
C++
Visual Basic
Visual Web Developer
When I pulled down the solution from source control, all projects loaded EXCEPT my web project - VS simply did not recognize it. A fresh installation using the default options and a restart fixed my problem. I do not have the time nor the desire to really figure out which of the above is necessary for Web Application projects to work... maybe somebody will chime in.
~ryan
I was getting the same error and found this question in a Google search for the answer. Most answers unearthed in the search suggested that old project types were being moved onto a machine with a different version of Visual Studio installed. None of which applied to me.
I've got VS2008 installed on a machine (running 64bit Vista) at work and recently installed the ASP.NET MVC beta, without any problems.
I wanted to replicate my work environment on my Mac, so I installed VS2008 with the ASP.NET MVC beta into a WinXp installation running within a Parallels VM. When I went to create a project with the ASP.NET MVC Web Application template I got the "the project type is not supported by this installation" error.
I finally got things working by yet another reinstall of VS2008 (a clean install, not a repair). This time I choose the default installation options, rather than customising things as I usually do. I normally deselect VB, the mobile device, office and other non C# development stuff - I don't have much free space on my Mac.
After the clean install of VS2008 I did a windows update, installed VS2008 SP1 and finally installed the ASP.NET MVC beta.
It seems that when I customised the VS2008 install, I deselected something essential for the correct operation of the MVC beta. I don't have clue what that something is, I'm just happy that after three days I can play the the MVC stuff at home.
Its been a month since you posted the question. Have you made any progress since?
This is sometimes caused by running a version of Visual Studio which doesn't support MSTest.
This might be obvious, but it fixed it for me. I had installed ASP.NET MVC prior to installing Visual Studio 2008. Once I removed MVC and reinstalled, I no longer had the problem.
install ASP.NET MVC 1.0. It works to me.
In Windows 7 if you are not running as the local "Administrator" and have UAC turned on the install will silently fail. The solution is to disable UAC, reboot, and the install should succeed.
I kept running into this problem. Running devenv /setup and devenv /resetskippkgs did not work for me. Nor did removing project guids. I installed MVC 1.0 and it still didnt work. Then I installed MVC 2.0 and that seemed to do it.
I had MVC 2 installed on my machine and I was still getting this error message. I installed MVC 1, no GO. i installed web Developer No GO. I finally uninstalled MVC1 and MVC2 and then reinstalled MVC2: http://www.microsoft.com/Downloads/en/details.aspx?familyid=C9BA1FE1-3BA8-439A-9E21-DEF90A8615A9&displaylang=en
The re installation of MVC 2 solved the problem for me. Hope this helps someone else.
Thanks
If you are trying to run an MVC application, try running AspNetMVC1.msi. It worked for me, so hopefully it will resolve your problem.
VS2008; ASP.NET MVC 2 on 64-bit machine receiving the issue:
"the project type is not supported by this installation"
Solution: Thanks to Bert Huijben from above. Under the VS install in the start menu, in the VS Tool folder, ran VS2008 x64 Cmd Prompt. Executed commands:
devenv /setup
...still project errored and didn't open, then ran
devenv.exe /resetskippkgs
... and then success!
I had to rebuild my development VM to solve this one. Clean install FTW.
Tried #ryan and #Rob Cooper answers with no joy. Running this in a vhd on Win7.
Zoned in on Mvc and that's where problem lies. Not 100% but think issue is that I was trying to open a project that didn't have latest Mvc release, which new build had.
Temporary solution is to rollback to previous version of Mvc. Then when that's happy, upgrade project to latest Mvc and then machine.
Ran into this problem when I had VS2008 running by accident when I started the ASP.NET MVC install. Closed VS, uninstalled ASP.NET MVC, then reinstalled it and everything worked fine.
Vivek Ayer's solution also worked for MbUnit projects. Additionally, simply deleting the first GUID (rather than replacing it with "{349c5851-65df-11da-9384-00065b846f21}") worked.
If you are running Visual Studio 2010 and want to open/create MVC 3 solutions you have to have the Visual Web Developer component of Visual Studio installed.
If you have done a default installation without customization then this component is installed.
If you do a customized installation and say thought you only wanted C# stuff installed you may have unchecked the Visual Web Developer component thinking you didn't need it. You need it for any MVC development. Simply re-run your VS setup and make sure this component is selected.
The MVC 3 download and installation will work properly even without this component installed. However, you will not be able to open or create a MVC 3 solution.
The trick to getting around this problem is the ProjectTypeGUID, but the GUIDS listed elsewhere in this and other posts didn't work for me.
In the end (and this is my suggestion), I created a new MVC project, then open the *.vbProj file and copy out the ProjectTypeGUIDs I found there. When I transposed those into the vbproj file of the project I was having trouble with, everything started working.
In my case (for an existing VS10 VB project), the right GUIDs were:
<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>

Resources