Pylons resource not found - pylons

This is a beginner's question.
I created a project called fileupload using pylons. I paster controller form'ed a controller called form. Inside it, I render a template called form.html. Could someone tell me what url I need to type to actually see form.html?
After paster serve --reload development.ini I type in localhost:5000/fileupload/form and get a 404 error.
Thanks in advance!

I found the answer through trial and error immediately after posting the question, but I'll answer it for others to see.
localhost:5000/form/index is the url I was looking for.

Related

MVC searching for view in wrong location

Base URL to run the my MVC app is:
http://localhost/RealSuiteApps/RealHelp/-1/Inbox/
And... I get this exception:
I know what it means :) But I dont understand why I get it, I have everything in place and the exact same code was working perfectly yesterday. What could go wrong?
Here is the code, you see I have InboxController, Index action in it, and of course the view under Views/Inbox/Index view
Most likely, this is a routing issue. Based on the error message, the Index action that's being loaded is actually in HomeController. MVC is searching /Views/Home/ for the view, so that means the controller is HomeController. You should probably post your RouteConfig.cs file for a more thorough answer, but generally, I can tell you that you need to look at your routes and figure out why the URL is not going where it should.

Create a plugin based controller in Umbraco

How to create a plugin based controller in Umbraco? I have followed the guide on https://github.com/Shandem/Umbraco4Docs/blob/4.8.0/Documentation/Reference/Mvc/surface-controllers.md.
But when browsing to ~/umbraco/areaname/controllername I get a 404. The only way not getting this is removing the plugin attribute. But I want to use the plugin architecture. So what else needs to be done besides the instruction mentioned in the guide.
The documentation is really awful if you want to get started with Umbraco and MVC.
By the way I am using Umbraco 6.
you're area needs to be under the App_Plugins folder.
Sorry misunderstood the question, but it seems you figured it out as you explain in the post linked bellow.
http://our.umbraco.org/forum/developers/extending-umbraco/39704-Create-a-plugin-based-controller-in-Umbraco

MVC.Net site is throwing a 404 error for a resource/page that isn't being called

Ok, this one is killing me. It makes no sense at all... I've setup a simple MVC.Net project. Everything appears to work fine. I get the typical 404 errors, and wanted to change that so I started looking into that... That got me poking around in the Application_Error method in the global.asax. It all appears to work as I would expect.
Here's the problem. I put the following line of code (just this line) in the Application_Error method and made a breakpoint to see what the error traffic was like so I could test things, etc.
Exception ex = Server.GetLastError();
I'm running the project in debug, and it comes back with an HttpException with an error code 404
The controller for path
'/Content/jquery-ui-1.8.7.custom.min.js'
was not found or does not implement
IController.
So far nothing too strange, right? So, I did a search for this offending call. I used the Visual Studio Find function and searched Entire Solution for /Content/jquery-ui-1.8.7.custom.min.js. There were no calls to this file. I searched for jquery-ui-1.8.7.custom.min.js and found all the expected calls to that file which look for it in the /Scripts/ directory.
In the /Content/ directory I have my .css files, and some images in the Images subdirectory...
I'm hoping there is just something strange that I don't know about with MVC.Net that you guys have already figured out that causes this quirkiness. It just makes no sense... I could see getting the 404 if there was a call to that file, but there isn't...
Any guidance on even some troubleshooting ideas would be helpful at this point. I'm stumped...
Thanks guys!
Just a suggestion to help you debug: Download Fiddler and check the actually HTTP requests being made. Note: When debugging using localhost, make a new hosts entry and point 127.0.0.1 to some other name, otherwise Fiddler won't track the requests.

ASP.Net MVC 2 Areas: The partial view '...' was not found

We recently upgraded a project to MVC 2 and we'd like to use Areas but there is an issue.
We have created a new area, setup a controller, configured a route, and created a view in the correct location. When we run the code it successfully finds the route and hits the controller but when it goes to render the view there is an exception.
The web forms view engine doesn't seem to be looking in the Areas section for views. The error we're seeing is:
~/Views/<ControllerName>/<ViewName>.aspx
~/Views/<ControllerName>/<ViewName>.ascx
~/Views/Shared/<ViewName>.aspx
~/Views/Shared/<ViewName>.ascx
When it should be:
~/<AreaName>/Views/<ControllerName>/<ViewName>.aspx
~/<AreaName>/Views/<ControllerName>/<ViewName>.ascx
~/<AreaName>/Views/Shared/<ViewName>.aspx
~/<AreaName>/Views/Shared/<ViewName>.ascx
~/Views/<ControllerName>/<ViewName>.aspx
~/Views/<ControllerName>/<ViewName>.ascx
~/Views/Shared/<ViewName>.aspx
~/Views/Shared/<ViewName>.ascx
This would indicate that it's still somehow using the MVC 1 dll but we've looked carefully and can find only references to the V2 of MVC (there was a V1 reference in xVal, a third party DLL, but fixing that didn't make a difference).
I can only imagine that we missed something when we did the upgrade or that we've got some unusual edge case because there doesn't seem to be anything on the web that matches the problem we're experiencing.
What things could we look at that might help us resolve this issue?
Thanks in advance for any help provided.
Cheers,
Zac
What things could we look at that might help us resolve this issue?
Make sure Area Routes are Registered AreaRegistration.RegisterAllAreas(); are registered first. Area routes need to be registered as well.
Make sure generated URL links have the area name included as one of the arguments when using ActionLink and other related URL helpers
Sometimes just delete and re-add the Area from scratch. Sounds silly, but it works.
The related SO question on the left hand side of this page may help. I have linked one I think may be of value

Getting started with Elmah?

I've read http://www.hanselman.com/blog/ELMAHErrorLoggingModulesAndHandlersForASPNETAndMVCToo.aspx and would like to use it in my mvc application; I'm running the MVC 2 preview.
My problem is, that when I follow instructions in article (providing dll and modifying web.config), I encounter an error when accessing http://localhost:62864/elmah.axd (ressource not found).
Any suggestions?
Any references to a good "get started" article on elmah?
Thanks,
Anders
Sounds like you might find the answer in this question.
The project page on Google code has some links to some discussion groups (fifth box down on the right-side of the page. You might get more help there.
Andy

Resources