• Products

    Microsoft .NET

    Microsoft .NET components, libraries & tools

    • EmailVerify for .NET
      Email validation library, featuring full IETF-compliant syntax validation, DNS checking, mailbox existence test and tools for advanced batch processing.
    • ProxyClient for .NET
      Powerful proxy client library with support for SOCKS 4, SOCKS 4a, SOCKS 5 and HTTP proxy servers, allowing to establish and accept remotely proxied connections.
    • MVC Extensions
      Powerful routing engine extensions for ASP.NET: allows to declare routes by way of attributes applied to MVC actions and generates URLs using compiler-safe lambda expressions.

    Microsoft Silverlight

    Microsoft Silverlight components, libraries & tools

    • EmailVerify for Silverlight
      Email validation library with Data Annotations support, featuring advanced syntax verification, ISP-specific syntax checks and disposable email address handling.

    Microsoft Visual Studio extensions

    Development tools, integrated into your favorite IDE

    • Routing Assistant
      FREE

      A cool and free Visual Studio extension which allows to easily browse, define, match and filter ASP.NET MVC routes within ASP.NET applications and web sites.

  • Purchase

    Products

    • EmailVerify for .NET
      • Licensing / editions
      • Volume discounts
      • Upgrades
      Purchase
    • ProxyClient for .NET
      • Licensing
      • Volume discounts
      • Upgrades
      Purchase
    • MVC Extensions
      • Licensing
      • Volume discounts
      • Upgrades
      Purchase

    Request a quote

    • Contact us
      Send a request to our sales staff.

  • Support

    Knowledge base

    • Browse the knowledge base
      Support documents for our products and services.

    Request support

    • Contact us
      Send a request to our customer support staff.

  • About us

    About Cobisi

    About our company, our team, our mission

    • Our company
      Cobisi company information.
    • Our mission
      About what we aim to achieve.
    • Follow us
      Follow us on Twitter.

    Contact us

    • Contact us
      Send a request to our customer support staff.

  • Company blog

    Latest posts from our blog

    Shared thoughts about our technologies, products and services

    • Routing Assistant reached version 1.7
      Published on Thursday, March 21, 2013

    • Verifalia: a new, complete hosted email validation service
      Published on Thursday, December 6, 2012

    • Routing Assistant v1.4 released
      Published on Friday, October 12, 2012

MVC Extensions

An awesome routing engine for ASP.NET MVC 3 and 4

  • Overview
  • Tutorial
  • Release notes
  • Free edition
  • Licensing
  • Purchase

🤖
MVC Extensions has been discontinued, sorry
We have discontinued this product because newer ASP.NET versions already include a similar attribute-based routing mechanism.

Parameters validation

While it handles the SEO routes of your web application, Cobisi SEO Extensions automatically (more details available below) checks the types of your MVC actions parameters and refuses to process routes whose parameters do not match with the aforementioned action parameters types.
Unlike the standard ASP.NET MVC routes handling, SEO Extensions refrains to execute actions with the wrong parameter types and, instead, tries to match the routes with lower priorities, if available, or returns an HTTP 404 error (meaning the requested page was not found).
With the following standard ASP.NET MVC action and route setup, for example, the system would execute the
Foo()
action even in the event of a wrong parameter type, as with a non-numeric parameter like in the url
~/foo/abc
:

Excerpt from the controller class:
            public class MyController : Controller
            {
                public ActionResult Foo(int bar)
                {
                    return Content("Baz!");
                }
            }
        

Excerpt from the application class (global.asax.cs):
        public static void RegisterRoutes(RouteCollection routes)
        {
            // ...

            routes.MapRoute("MyDangerousRoute",
                "{action}/{bar}",
                new {
                        controller = "MyController",
                    });

            // ...
        }
        

SEO Extensions works in a different way and allows to easily define your routes while also ensuring their parameters are of the right types. To take advantage of this behavior, the previous example could then be refactored to the following (please note that the SEO route does not require an explicit registration within the application class, as before):

            public class MyController : Controller
            {
                [Route.Action("~/foo")]
                public ActionResult Foo([Route.Param] int bar)
                {
                    return Content("Baz!");
                }
            }
        

In addition to that, SEO Extensions allows to explicitly set constraints for your parameters and support both traditional regular expressions and IRouteConstraint implementations (for more advanced use). To do that, you have just to set the
Constraint
property of the aforementioned
Route.Param
attribute to the desired constraint value.
Here is, for example, how to limit the
item
parameter with a simple regular expression, so that it can only accept values starting with the
part-
prefix followed by exactly three digits, as with urls like
~/cart/add/part-123
:

            [Route.Action("~/cart/add")]
            public ActionResult AddItemToCart(
                [Route.Param(Constraint = @"part-\d{3}")]
                string item
            )
            {
                return Content("Thanks for your order, baby!");
            }
        

Content


  • Introduction
  • Installation
  • Your first SEO (declarative) route
    • Application (Global.asax) setup
    • Visual feedback in the IDE
  • Handling parameters
    • Visual feedback in the IDE
    • Validation
    • Built-in constraints
    • Enumerated values
      • Handling unmodifiable enums
  • Getting URLs from routes
    • Redirecting to SEO (declarative) routes
  • Views
    • Root namespace prefix


Not what you are looking for?


Please don't hesitate to contact us with your questions and comments; technical support is always free of charge, and requests made by registered clients will have higher priority.
Products
  • EmailVerify for .NET
    • Features
    • Online demo
    • Download
    • Licensing / editions
    • Release notes
    • Purchase
  • ProxyClient for .NET
    • Download
    • Licensing / editions
    • Release notes
    • Purchase
  • MVC Extensions
    • Tutorial
    • Free edition download
    • Licensing
    • Release notes
    • Purchase
Support
  • Knowledge base
  • Request support

About Cobisi
  • The company
  • Mission
  • Follow us
  • Contact us
Copyright © 2005-2022 Cobisi Research. All rights reserved.
Cobisi Research - Via Della Costituzione, 31 - 35010, Vigonza - Italy (European Union)
VAT ID: IT04391160282