tags:

views:

58

answers:

1

I've been spending the past several weeks working on my asp.net mvc site following along in Apress' Pro ASP.NET MVC Framework. All has been well and good and the app has been running just fine. I'm almost done with it. I was attempting to move it to the test server for QA, when the server admin wanted me to remove my extensionless system and add .mvc or .aspx to the end of my controllers.

When I added this to my Global.asax route table, my app no longer works, locally. I found this site which mentioned that I needed a root route if I'm using an extension. I did this and now the default home page now works. But, my navigator doesn't work. I'm using Html.ActionLink, so they rendered correctly, adding the extension appropriately. But when I click on them, I get an error:

Specified method is not supported.

This happens with every controller I have. Grrr...

And what's really bumming me out is what happens after I revert my changes to the Global.asax routes, removing that file extension after the controller:

from

"{controller}.mvc/{action}/{id}/{title}"

to

"{controller}/{action}/{id}/{title}"

I also commented out that extra root route I'd added before, so now, this is the only route I have in that file.

Now, when I launch the app in VS2008, I'm getting the error:

The resource cannot be found.

And my site doesn't work at all! :^( No front page, no controllers, not anything.

I just need to get this thing working, again. It was working just fine this morning and all last week.

The only other thing I changed was in the project properties panel. I changed the output directory and Start pages. But I then put these back to the defaults. I'm wondering if somehow my properties file or some assembly got corrupted. I've done a [Project Name] Clean several times, but no joy.

If anyone has any ideas, please offer them.

Thanks, Scott

A: 

Well, I don't know what happened, but I re-cloned the git repository from this morning and it now works fine. I can add the extension, or make it extensionless and it still works. Somehow, something got munged up.

Thanks, anyway. I just need to now port over all of today's work done to the new version.

Scott
Same thing kept happening to a friend of mine last week - every once in a while the entire site simply kept reporting 'Resource not found'. She also managed to fix it by simply doing a fresh checkout from source control. I later figured out that I can fix it by simply changing the port for the application in the project properties. Very odd. I think this might be a weird bug in the development web server.
Jaco Pretorius
Yeah, that's what I was thinking. I tried to hard-code the port to 8181, but no joy. But since I re-cloned the site into a different folder, I can just copy over my changes from yesterday into my views and css files. Thanks.
Scott
Scott you need to accept your answer so the question no longer shows up as unanswered =)
Neal