ASP.NET MVC 3 Routing Issue with Un-conventional folders - asp.net-mvc-3

In a website I am working on, I place all my images inside "images" folder such that "/images".
ASP.NET MVC 3 is throwing an exception saying it cannot find a controller for "images".
Any trick to do with the route table?
Thanks

You can try
routes.IgnoreRoute("images/");
This will prevent routing from trying to resolve a controller for requests containing this folder.

Related

Codeigniter - dots in a controller folder name

I'm using the latest version of Codeigniter and I try to achieve specific controller folders structure.
I'm would like to create a controller folder for each of my webapp version:
/controllers/1.0.0/login (where login is the name of the controller)
/controllers/2.0.0/login (where login is the name of the controller)
the problem: it seems Codeigniter working great with controller folders but not working with controller folders that contain dot :(
Like this working good (without dots):
/controllers/100/login (where login is the name of the controller)
/controllers/200/login (where login is the name of the controller)
Is there a way to make Codeigniter work with dots on controller folders?
Thanks
Shai
I also getting the same issue.
You can use like this in your route
config/route.php
$route['Controller/1.0.0/login'] = 'Controller/100/login';
$route['Controller/2.0.0/login'] = 'Controller/200/login';
This is working fine for me

How to separating frontend and backend using codeigniter

I am a new php developer. Am developing my website using codeigniter and got stuck when i tried to make the backend. Am using CMS backend that comes with its own folder with everything (.htaccess, its own MVC etc) so I put all my frontend folders into one folder called frontend withinn the application folder but now I cannt view my frontend pages. I get this: The configuration file does not exist. Please help me step by step.
check out this link to know the MVC pattern Codeigniter.
controller and model ----- Backend
Views --- Frontend

web API versioning using namespace

I am trying to implement ASP.net web API versioning using URL(namespace) techniques.
I have existing controller say Roles controller. I am able to access it via route .../ API/roles.
Now I have added one more controller with same name Roles but in different folder say V1.
I added route for this new controller and I am able to access it via .../API/V1/roles.
But now when I am trying to access my old route I.e. .../API/roles. I am getting error as multiple controller found. One controller in folder V1 and another in folder controllers.
Can anyone help me in figuring out this issue. How to fallback the existing routes.
If I add another folder v2 and try to access roles controller over there its working fine.
But for existing controller which is placed directly in Controllers folder its not working.
Any help is appreciated.
Thanks.

Deploying Two MVC 3 Apps in the same domain iis7?

I have a MVC 3 site that runs at the top level of a domain. I have just created a directory in this domain "Support" added another MVC 3 project to it and converted it to a application in IIS7.
The issue is that my parent MVC 3 application seems to be handling the routing still and when I hit the route http://mywebsite.com/Support/Account/etc I get a 404 as this route doesn't exist in the parent site I am assuming? Is their a way to stop the parent site attempting to handle the route http://mywebsite.com/Support/ "Support" being the route I have another application in???
Are you sure you made the folder an application? Are you making that folder the root of your app? ie, is there a web.config file there, global.asax, etc..?

Webform in MVC app does not show in IIS7.5

I have a webform (using the ReportViewer) that is in an MVC application. It is outside the Views folder in a root level folder called Reports. The webform page works correctly when using VS2010 and the web server (Development Server, WebDev.WebServer, Cassini). When using IIS7.5 with an integrated Application Pool (also tried Classic and set the ISAPI restrictions to allow), it does not work. I have the modules..handlers item (Reserved-ReportViewerWebControl-axd) in web.config.
I am getting this page result: "The resource cannot be found." / Description: HTTP 404. The resource you are looking for ...
I hope someone has a fix for this.
Thanks in advance.
Try putting the file(s) under the content folder. That should remove any route problems.

Resources