I'm struggling to get around the 404 errors from asp.net mvc beta when deploying on IIS 6. I had this working in one of the previews by mapping .mvc in IIS but this no longer works. I've read Omar's post and several others on the web and tried their solutions but no luck so far.
The home page opens without a problem on IIS 6 but others 404 and the site runs well on IIS 7.
Has anybody deployed asp.net mvc beta to IIS 6 with success? If so, what adjustments did you need to make to the code and/or IIS settings to get it to work?
I found a solution to my problem from Steve Sanderson's blog (Thanks Steve):
Use a wildcard mapping for aspnet_isapi.dll. This tells IIS 6 to process all requests using ASP.NET, so routing is always invoked, and there’s no problem. It’s dead easy to set up:
open IIS manager (run -> inetmgr -> OK)
right-click your app, go to Properties
then Home Directory tab, then click Configuration.
Under Wildcard application maps, click Insert (not Add, which is
confusingly just above)
then enter
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll for
“Executable”, and uncheck Verify that file exists.
I can't seem to write comments yet. So I'll write a new answer.
There are a few similar questions going around on stackoverflow.
I'm using MVC 3. I know the question was MVC 2 related. But since this is the first stackoverflow post I bumped in to, I think it's worth mentioning that:
when you use MVC 3, you need to add a new extension mapping with the executable of the .NET 4 framework (C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll)
<edit>I just found out that I even don't need to set up the extension mapping. </edit>
It still didn't work for me then :) I still had to 'Allow' ASP.NET v4.0.30319 in the Web Service Extensions section in IIS:
open IIS
click on the server node
open the Web Service Extensions section
select the ASP.NET v4.0....
right click --> Allow
Good to go!
Url rewriting can help you to solve the problem. I've implemented solution allowing to deploy MVC application at any IIS version even when virtual hosting is used.
http://www.codeproject.com/KB/aspnet/iis-aspnet-url-rewriting.aspx
Related
This is my first ASP.NET MVC project. It had been speedy development. However, when I deploy to the server, I just can't get the site to see the controller.
I did a test project. I just create an ASP.NET MVC project with no changes; published on to local IIS and it works. Same project on the server, didn't work. I have an index.html on the root to see if the site is up. Indeed, it's up. I can see index.html. When I go www.test.com/home/index (which is my test site), I get HTTP error 404.0 - not found. The resource you are looking for has been removed had it's name changed, or is temporarily unavailable.
bin folder does have project dll.
App_start/routeconfig.cs default url is point to home controller and the index action.
Project is straight out of the box. It should work.
Can someone point me in the right direction?
Sincerely appreciated.
In case someone is having the same issue.
There are so many reasons for error 404.
In my case, the network guy didn't install ASP.net framework. See there's a fine line between developer and network guy.
It's not exactly what I was searching for, but it solved my problem.
aspnet_regiis.exe -ir does not work on windows 8
i tried to look around but i did't find a solution.
I have a web space on aruba and i want to publish the default mvc 4 internet website (you know...home, about, contacts).
I tried to publish but it dont't work.
I read about putting .aspx (useless cause no aspx pages here) or .chstml (i tried) on the route config, but nothing happend. Always HTTP Error 403.14
Does anyone tried to publish an mcv 4 website on aruba? What changes do i have to do?
I'm using Windows 2008 Hosting with, with ASP.NET 4 and Classic Pipeline
If you referring to Aruba.it hosting solutions, they doesn't support mvc projects..
Look at there Windows hosting solution
It support asp.net not asp.net mvc...
If they were support it they would have wrote it
If ASP.NET works for you, you can bundle the MVC dll's with your project (so that theres a System.web.mvc.dll in your project's bin folder.
And it should just work.
Aruba supports Mvc4. You just have to remember to publish all the dll as told by Mvison (so mvc dll, sql ce dll, and so on) and also give the write permission to that folder, otherwise they won't allow them to run (think it's a safety policy)
I want to get away from developing in PHP but doing that is proving to be a massive headache.
I am trying to set up a website with MVC 4, ASP.NET 4.0, on Win7 Professional (64-bit). The website is just the basic site that is set up with Visual Web Developer 2010 Express selecting New Project > C# > Website > ASP.NET MVC 4 Application.
After setting up the application in IIS7.5 I am getting an HTTP Error 403.14 - Forbidden. I've done a ton of research and tried multiple different suggestions on how to solve the problem but NOTHING is working. Here are some things I tried:
Install/Register v4 of ASP.NET. This has been the most annoying
thing because everyone else's issue is fixed when they do this but
mine is not.
Changing the application pool settings:
Set to classic/integrated mode
Change the user/permissions used by the application pool
Made sure 32-bit applications were enabled
Added security permissions to folders related to the website (on multiple accounts)
I can get a regular html document to show up if I add it to the websites root directory. It seems that the MVC stack is not being called at all. The server wants to display the directory, which I can enable/disable, but the website is not being displayed.
Please can I have more potential fixes before I resort to my last desperate act? A baseball bat.
p.s. I'm more than willing to do a skype conversation or a share screen kind of thing if someone wants to dig in deep. I am beyond frustrated with this.
So it seems, in my indefinite well of stupidity, I was pointing the webserver to the incorrect folder. I needed to point the webserver to the folder with actual files of the application rather than the folder containing the .SLN file. Sorry to waste your time!
try running the aspnet_regiis
http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx
open the command line in %windir%\Microsoft.NET\Framework64\v4.0.30319 and run
aspnet_regiis -ir
other possible solutions:
quit skype, or any other similar applications
I'm building an N2-based ASP.NET MVC site, which is part of a larger Windows Azure solution. The problem I am stuck with is integrating in my project N2's own forum add-on, which is basically YAF (Yet Another Forum).
I've been wrestling with the forum for the last couple of days and after re-compiling the add-on to remove the dependency on N2.Templates.dll and following all of the steps in the Installation.txt file (part of the documentation of the add-on) I'm stuck with the forum not showing up. When I navigate to the forum I get a "403.14 - Forbidden" error.
From what I could find out it seems the problem is in the fact that the forum is based on WebForms and the containing application is MVC-based. The site is part of a Windows Azure solution and some of the things I read suggest the local IIS may not be correctly configured. However, right-clicking on the Forum.aspx page and selecting "View in browser" shows the page just fine, including navigating to subsequent pages from the YAF installation wizard. Running pure WebForms apps on the local IIS also goes without problems, so I think IIS is not the cause for YAF not showing up.
Please, if someone has any idea for solving this problem, or has done similar integration of YAF in an MVC site, let me know.
Thanks!
I was lead to believe that MVC apps were BIN-deployable, so could be deployed to any ASP.net 3.5 compatible server. I'm trying to deploy to a Windows Server 2003 x64 with 3.5 (no SP1) and am having trouble getting it working.
I get the following when hitting the homepage, which redirects to the /Account/LogOn view due to our app config.
The page cannot be found
I've got the three (plus Extensions, I can't remember why) MVC dll's set to Copy Local, so they end up in the bin-folder. I'm publishing and then copying over the app to the server:
System.Web.Abstractions.dll
System.Web.Mvc.dll
System.Web.Routing.dll
System.Web.Extensions.dll
Does anyone know what I'm doing wrong? The app works on another machine we have with 3.5 SP1, and on development machines, also SP1 and with MVC installed.
I've gone over everything I can think of, ensured the permissions are correct, etc.
IIS 6 does not handle .mvc extensions correctly. Among other things you have to map .mvc to the ASP.NET handler. Here is a walkthrough for you: http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
Have you set up wildcard mapping on the server that does not work? See "Deploying ASP.NET MVC to IIS 6" for an example. You basically need to map all requests to the ASP.NET ISAPI DLL and tell IIS not to try to verify that the file exists. Don't know if that's your issue, but it has bitten me a few times in deployments.
With IIS6, you can't do extensionless URLs like /Account/LogOn. You have to do something like /Account.aspx/LogOn The ".aspx" can really be almost any arbitrary extension, but you need that extension. Your routes need to take the extension into account as well.
Check to make sure the app pool your site is running under is configured to run ASP .Net 2.0, sometimes it defaults to 1.1 which causes issues similar to yours.