views:

686

answers:

4

I created a "Hello World" application, in the same vein as http://giantflyingsaucer.com/blog/?p=409. It works perfectly on my development computer, using the built-in web server.

I followed Phil Haack's advice for doing a Bin Deployment at http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx. I used the Publish feature to get an output directory, and copied all of the files to the correct places on the ISP (Network Solutions).

When I go to the site, I get the welcome page, but when I do http://mydomain/hello, I get a 404 error.

What could be the problem?


Here is the fix. Apparently Network Solutions is running IIS6 after all. I got what I needed from http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/. The new routing is

{controller}.aspx/{action}/{id}

Notice the addition of the .aspx after the controller placeholder. IIS6 needs this because it always thinks it is talking to an actual web page instead of a controller.

I'm not keen on the extra characters in the url, but I may have to live with it.

+3  A: 

Are you sure you deployed it to an IIS7 server? If the server runs IIS6 check this and this post.

çağdaş
I'm inclined to go with [what's his name] on this one Robert. I've only ever seen this when deploying to IIS6. Or, and I'm assuming p=409 stands for page=409 from a db, that your connection to the database is not working for whatever reason.
griegs
BLAM! SORTED!...
Robert Harvey
What was it and should i create an answer? :)
griegs
So, the ISP was actually running IIS6?
Ben Griswold
Apparently...Could be my fault. I may have assumed IIS7 since they have the bleeding edge .NET framework. Bad assumption on my part.
Robert Harvey
A: 

This is a long shot but this very honestly happened to me today. Are you sure you have IIS configured completely? Under the Web Service Extensions node, enable/allow ASP.NET. If this isn't allowed, you'll get a 404 error.

Ben Griswold
It's the ISP's web server. I have zero control, but good guess, thanks for trying.
Robert Harvey
+1  A: 

Another long shot: Do you know if your host has ASP.NET MVC installed in the server? If he doesn't, you need to copy the three MVC DLLs to your BIN folder as well.

Badaro
Got that covered, but it's good advice.
Robert Harvey
And no, they don't have it installed, but that's another story :)
Robert Harvey
A: 

I had troubling 404 errors until I copied over 'PrecompiledApp.config'

JoshRivers