Questions about routing within ASP.NET (including MVC).
3
votes
0answers
568 views
URL rewrite in ASP.NET 4.5 and Web API
We've got a long-running ASP.NET web-forms application that was born in the .NET 1.1/IIS6 days. We're now on .NET4.5/IIS7 but we've done nothing with MVC.
We provide a catalog to customers and give ...
3
votes
0answers
125 views
.NET MVC Dump Route Table
Is there an easy way to dump all routes for a .NET MVC application? I'm thinking something similiar to how rail's rake routes works.
...
2
votes
0answers
134 views
ASP.NET Catch all routing and escaping forward slashes
I'm using catch-all routing with MVC to provide a path to a resource in our application. It looks like such:
_routes.MapRoute(null, "Resource/{*resourcePath}", new {
controller = "Resource",
...
2
votes
0answers
549 views
MVC 4 Web Api Route 404 issue
I have a plain-vanilla MVC 4 Web Api project created using VS2012.
The (/api/Values) works out-of-the-box on the localhost but NOT when deployed on IIS (packages created using the standard ...
2
votes
0answers
87 views
Routing based on data in database
I'm using Asp.Net MVC 4, and am unsure of the best way to approach a routing problem. The site needs to support static urls which are mapped to controller/actions in the usual way:
/about
/contact
...
2
votes
0answers
157 views
IIS7.5 - Handling static files requests in MVC ASP.NET
I would like to handle all the web requests with MVC ASP.NET, but I can't handle any image request for example.
When I created the MVC project, Visual Studio add three ExtensionlessUrlHandler for ...
2
votes
0answers
192 views
How to prevent not found error when image doesn't exist in .NET MVC
I have an MVC application and my error handling is set up like this in web.config:
<customErrors mode="On" defaultRedirect="~/Error/" redirectMode="ResponseRedirect">
<error ...
2
votes
0answers
139 views
Rendering of @Ajax.ActionLink is messed up by adding a new route
I have an ActionLink:
<td>
@Ajax.ActionLink(item.HostedBy, "_DetailsMerged", "Marcher",
new { id = item.HostedById },
new AjaxOptions
{
...
2
votes
0answers
453 views
routing issue on nopCommerce 2.3
I'm having problems debugging what I think is a routing issue on nopCommerce 2.3.
Both the sitemap and search pages redirect to the homepage instead of their respective pages. This is the code in the ...
2
votes
0answers
155 views
Create route collection (or similar) for hierarchical page structure in ASP.NET MVC
Sorry if the question seems complicated but, in a typical CMS, the pages will have a hierarchical structure. In other words, you would create top level pages, and those pages would have children, ...
1
vote
0answers
9 views
MVC Custom Route. DataTokens[“Namespaces”] is ignored
I don't know why while creating a CustomRoute which inherits from Route, the field DataTokens["Namespaces"] is ignored.
And I get the error:
Multiple types were found that match the controller named ...
1
vote
0answers
18 views
asp.net mvc routing depending on session
I have an ASP.Net MVC site and I want that every request to images of my site
/images/image_name.png
are redirected to
/images/{skin}/image_name.png
where {skin} is session dependant.
and I ...
1
vote
0answers
47 views
Redirect to different URL in MVC4
How to pass value url value in RedirecttoAction with Controller and Action with parameters.
Condition
On Post of an action in site1 (https://www.xyz.com), redirect to site2 ...
1
vote
0answers
49 views
MVC Controller to get image with ChildActionOnly
I want to display an image for a shopping cart item that is stored in my database. I got 90% to what I wanted by following this SO post.
My view has an image like this:
<img alt="@item.Name" ...
1
vote
0answers
25 views
Inserting but ignoring hyphens in asp.net URL routing
Im trying to create the following URLS using .net routing but in a webforms project
http://www.ebuyer.com/173389-startech-external-hard-drive-enclosure-black
So in my routing table I have the ...