Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MVC routes
Message
 
To
30/09/2015 07:18:22
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
VB 9.0
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01625238
Message ID:
01625352
Views:
62
Yup.

You can also use Attribute routes and a route prefix if you have different versions of actual source code you're running (as you probably should). You can then just use a route prefix in your file to specify how this is handled. I prefer this because then version lives in the actual source file that also holds the actual versioned code.

Ultimately though - I'm not sure how this is supposed to work for you. Are you running all of these versions out of a single app? In that case how do you keep your code isolated? The easier solution might just be to create IIS virtuals for each version and then use the same root routes for the actual apps (routes are always virtual relative so the base app path shouldn't matter whether its root or virtual).

+++ Rick ---

>We have a situation where we have a virtual directory in IIS pointing to c:\websites\sysadminweb. We want to place version directories below this folder like:
>
>sysadminweb
> v2.4.0
> v2.4.1
> v2.5.0
>
>The trouble we're having is that if we place the deployed files in the version folder, the routing tables in MVC can't find the Home\index and nothing happens. If we deploy the files to the root directory, all works well.
>
>What kind of routing map do we set up so that we can pass the version and have the mvc routing find it?
>
>
>Thanks in advance, but figure it out: url: "v2.4.0/{controller}/{action}/{id}" does the trick.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform