Search Results

Search found 6523 results on 261 pages for 'route planning'.

Page 33/261 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • MVC routing - why does my request not match the route?

    - by Anders Juul
    Hi all, I'm making a request that I thought would be caught by my route, but there is no match. What am I doing wrong? Any comments appreciated, Anders, Denmark -- Url : EventReponse/ComingAdmin/386/01e71c45-cb67-4711-a51f-df5fcb54bb8b Expected match: routes.MapRoute( "Editing event responses for other user", // Route name "EventResponse/{action}/{eventId}/userId", // URL with parameters new {controller = "EventResponse", action = "ComingAdmin"} // Parameter defaults ); Desired controller (but I guess this does not come into play): public class EventResponseController : ControllerBase { (...) public ActionResult ComingAdmin(int eventId, Guid userId) { return RegisterEventResponse(eventId, AttendanceStatus.Coming, userId); } }

    Read the article

  • SpineJS and RequireJS

    - by ot3m3m
    I am using require.js 2.0. I have the following code that is called initially by require: app.js requirejs.config({ paths: { app: '..', spine: 'spine_src/spine', cs: "cs", }, shim: { 'spine_src/route': { deps: ['spine'] } } }); // Start the main app logic. requirejs(['cs!app/StartApp_Admin', 'spine','spine_src/route'], function (StartApp_Admin, Spine, Route) { { new StartApp_Admin(); } }); And the following controller: StartApp_Admin define () -> class StartApp_Admin extends Spine.Controller constructor: -> @routes "/twitter/:id": (params) -> console.log("/users/", params.id) Spine.Route.setup() When I execute the application I get the following error in my spine route library file (route.js). The application breaks when I call Spine.Route.setup() Uncaught TypeError: Object function (element) {return element;} has no method 'extend' Any help would be greatly appreciated

    Read the article

  • How to add :format options to a named route in Rails?

    - by Alfred Nerstu
    I've got a named route called profile and I would like to be able to access it as json. But when I look at my rake routes output I see that the (.:format) is missing. How do I add it to a named route? user GET /users/:id(.:format) {:action=>"show", :controller=>"users"} profile /:username {:action=>"show", :controller=>"users"} Thanks in advance!

    Read the article

  • Camel | Need for Scheduling console

    - by user1692063
    I am using camel 2.9.0 in my project. We have a number of routes divided into different camel contexts. Each camel context is bundled separately and deployed in Apache Karaf. Now the problem is divied into 2 parts: 1.) Each route is a scheduled route. Although using Quartz component, we are able to define a cron expressio in each route, we want a console where in we can trigger,stop any route and also put a cron expression to any route.(Scheduling a route through a web console is our main objective). 2.) Also we tried to configure the cron expression for each route through quartz.property. But if someone wants to change the cron expression at runtime in Apache Karaf, then we have to stop the bundle deployed and start in again. What can be done to change the value of cron expression at runtime. Any replies and help would be appreciable. Piyush

    Read the article

  • Is it possible to have a .NET route that maps to the same place as a directory?

    - by Austin
    I'm building a CMS using WebForms on .NET 4.0 and have the following route that allows URLs like www.mysite.com/about to be mapped to the Page.aspx page, which looks up the dynamic content. routes.MapPageRoute("page", "{name}", "~/Page.aspx"); The problem is that I have a couple of folders in my project that are interfering with possible URLs. For example, I have a folder called "blog" where I store pages related to handling blog functionality, but if someone creates a page for their site called "blog" then navigating to www.mysite.com/blog gets the following error: 403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. Other similar URLs route correctly, but I think because .NET is identifying /blog as a physical location on the server it is denying directory access. Is there a way to tell IIS / .NET to only look for physical files instead of files and folders?

    Read the article

  • Kohana 3 - How do I make the Default Route pass arguments to the Controller's Action?

    - by John Himmelman
    My controller action requires a parameter, but I can't get KO3's router to pass this parameter in the Default route. This sort of thing works with other routes. Here is an example to clarify... In bootstrap.php... Route::set('default', '(<controller>(/<action>(/<the_required_param>)))') ->defaults(array( 'controller' => 'DefaultController', 'action' => 'index', 'the_required_param' => 'some_default_value', )); In controller file... class DefaultController extends Controller { public function index($the_required_param) { echo 'value: ' . $the_required_param; } }

    Read the article

  • Routing Issue in ASP.NET MVC 3 RC 2

    - by imran_ku07
         Introduction:             Two weeks ago, ASP.NET MVC team shipped the ASP.NET MVC 3 RC 2 release. This release includes some new features and some performance optimization. This release also fixes most of the bugs but still some minor issues are present in this release. Some of these issues are already discussed by Scott Guthrie at Update on ASP.NET MVC 3 RC2 (and a workaround for a bug in it). In addition to these issues, I have found another issue in this release regarding routing. In this article, I will show you the issue regarding routing and a simple workaround for this issue.       Description:             The easiest way to understand an issue is to reproduce it in the application. So create a MVC 2 application and a MVC 3 RC 2 application. Then in both applications, just open global.asax file and update the default route as below,     routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id1}/{id2}", // URL with parameters new { controller = "Home", action = "Index", id1 = UrlParameter.Optional, id2 = UrlParameter.Optional } // Parameter defaults );              Then just open Index View and add the following lines,    <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Home Page </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <% Html.RenderAction("About"); %> </asp:Content>             The above view will issue a child request to About action method. Now run both applications. ASP.NET MVC 2 application will run just fine. But ASP.NET MVC 3 RC 2 application will throw an exception as shown below,                  You may think that this is a routing issue but this is not the case here as both ASP.NET MVC 2 and ASP.NET MVC  3 RC 2 applications(created above) are built with .NET Framework 4.0 and both will use the same routing defined in System.Web. Something is wrong in ASP.NET MVC 3 RC 2. So after digging into ASP.NET MVC source code, I have found that the UrlParameter class in ASP.NET MVC 3 RC 2 overrides the ToString method which simply return an empty string.     public sealed class UrlParameter { public static readonly UrlParameter Optional = new UrlParameter(); private UrlParameter() { } public override string ToString() { return string.Empty; } }             In MVC 2 the ToString method was not overridden. So to quickly fix the above problem just replace UrlParameter.Optional default value with a different value other than null or empty(for example, a single white space) or replace UrlParameter.Optional default value with a new class object containing the same code as UrlParameter class have except the ToString method is not overridden (or with a overridden ToString method that return a string value other than null or empty). But by doing this you will loose the benefit of ASP.NET MVC 2 Optional URL Parameters. There may be many different ways to fix the above problem and not loose the benefit of optional parameters. Here I will create a new class MyUrlParameter with the same code as UrlParameter class have except the ToString method is not overridden. Then I will create a base controller class which contains a constructor to remove all MyUrlParameter route data parameters, same like ASP.NET MVC doing with UrlParameter route data parameters early in the request.     public class BaseController : Controller { public BaseController() { if (System.Web.HttpContext.Current.CurrentHandler is MvcHandler) { RouteValueDictionary rvd = ((MvcHandler)System.Web.HttpContext.Current.CurrentHandler).RequestContext.RouteData.Values; string[] matchingKeys = (from entry in rvd where entry.Value == MyUrlParameter.Optional select entry.Key).ToArray(); foreach (string key in matchingKeys) { rvd.Remove(key); } } } } public class HomeController : BaseController { public ActionResult Index(string id1) { ViewBag.Message = "Welcome to ASP.NET MVC!"; return View(); } public ActionResult About() { return Content("Child Request Contents"); } }     public sealed class MyUrlParameter { public static readonly MyUrlParameter Optional = new MyUrlParameter(); private MyUrlParameter() { } }     routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id1}/{id2}", // URL with parameters new { controller = "Home", action = "Index", id1 = MyUrlParameter.Optional, id2 = MyUrlParameter.Optional } // Parameter defaults );             MyUrlParameter class is a copy of UrlParameter class except that MyUrlParameter class not overrides the ToString method. Note that the default route is modified to use MyUrlParameter.Optional instead of UrlParameter.Optional. Also note that BaseController class constructor is removing MyUrlParameter parameters from the current request route data so that the model binder will not bind these parameters with action method parameters. Now just run the ASP.NET MVC 3 RC 2 application again, you will find that it runs just fine.             In case if you are curious to know that why ASP.NET MVC 3 RC 2 application throws an exception if UrlParameter class contains a ToString method which returns an empty string, then you need to know something about a feature of routing for url generation. During url generation, routing will call the ParsedRoute.Bind method internally. This method includes a logic to match the route and build the url. During building the url, ParsedRoute.Bind method will call the ToString method of the route values(in our case this will call the UrlParameter.ToString method) and then append the returned value into url. This method includes a logic after appending the returned value into url that if two continuous returned values are empty then don't match the current route otherwise an incorrect url will be generated. Here is the snippet from ParsedRoute.Bind method which will prove this statement.       if ((builder2.Length > 0) && (builder2[builder2.Length - 1] == '/')) { return null; } builder2.Append("/"); ........................................................... ........................................................... ........................................................... ........................................................... if (RoutePartsEqual(obj3, obj4)) { builder2.Append(UrlEncode(Convert.ToString(obj3, CultureInfo.InvariantCulture))); continue; }             In the above example, both id1 and id2 parameters default values are set to UrlParameter object and UrlParameter class include a ToString method that returns an empty string. That's why this route will not matched.            Summary:             In this article I showed you the issue regarding routing and also showed you how to workaround this problem. I explained this issue with an example by creating a ASP.NET MVC 2 and a ASP.NET MVC 3 RC 2 application. Finally I also explained the reason for this issue. Hopefully you will enjoy this article too.   SyntaxHighlighter.all()

    Read the article

  • How to Reap Anticipated ROI in Large-Scale Capital Projects

    - by Sylvie MacKenzie, PMP
    Only a small fraction of companies in asset-intensive industries reliably achieve expected ROI for major capital projects 90 percent of the time, according to a new industry study. In addition, 12 percent of companies see expected ROIs in less than half of their capital projects. The problem: no matter how sophisticated and far-reaching the planning processes are, many organizations struggle to manage risks or reap the expected value from major capital investments. The data is part of the larger survey of companies in oil and gas, mining and metals, chemicals, and utilities industries. The results appear in Prepare for the Unexpected: Investment Planning in Asset-Intensive Industries, a comprehensive new report sponsored by Oracle and developed by the Economist Intelligence Unit. Analysts say the shortcomings in large-scale, long-duration capital-investments projects often stem from immature capital-planning processes. The poor decisions that result can lead to significant financial losses and disappointing project benefits, which are particularly harmful to organizations during economic downturns. The report highlights three other important findings. Teaming the right data and people doesn’t guarantee that ROI goals will be achieved. Despite involving cross-functional teams and looking at all the pertinent data, executives are still failing to identify risks and deliver bottom-line results on capital projects. Effective processes are the missing link. Project-planning processes are weakest when it comes to risk management and predicting costs and ROI. Organizations participating in the study said they fail to achieve expected ROI because they regularly experience unexpected events that derail schedules and inflate budgets. But executives believe that using more-robust risk management and project planning strategies will help avoid delays, improve ROI, and more accurately predict the long-term cost of initiatives. Planning for unexpected events is a key to success. External factors, such as changing market conditions and evolving government policies are difficult to forecast precisely, so organizations need to build flexibility into project plans to make it easier to adapt to the changes. The report outlines a series of steps executives can take to address these shortcomings and improve their capital-planning processes. Read the full report or take the benchmarking survey and find out how your organization compares.

    Read the article

  • When and why are you planning to upgrade to Python 3.0?

    - by Tomislav Mutak
    Python 3.0 (aka Python 3000, Py3k, etc) is now available. When and why are you planning on porting your project or code to the new Python? edit: I'm particularly interested in any features that don't exist in 2.6 that make porting worth it. Right now seems like a lot of negatives (x hasn't been ported yet), but I don't know what people see as the positives. Regarding "when", I'm interested in people's thoughts that the first step to porting is to have "excellent test coverage" which seems a bit optimistic for some projects.

    Read the article

  • How to allow local LAN access while connected to Cisco VPN?

    - by Ian Boyd
    How can I maintain local LAN access while connected to Cisco VPN? When connecting using Cisco VPN, the server has to ability to instruct the client to prevent local LAN access. Assuming this server-side option cannot be turned off, how can allow local LAN access while connected with a Cisco VPN client? I used to think it was simply a matter of routes being added that capture LAN traffic with a higher metric, for example: Network Destination Netmask Gateway Interface Metric 10.0.0.0 255.255.0.0 10.0.0.3 10.0.0.3 20 <--Local LAN 10.0.0.0 255.255.0.0 192.168.199.1 192.168.199.12 1 <--VPN Link And trying to delete the 10.0.x.x -> 192.168.199.12 route don't have any effect: >route delete 10.0.0.0 >route delete 10.0.0.0 mask 255.255.0.0 >route delete 10.0.0.0 mask 255.255.0.0 192.168.199.1 >route delete 10.0.0.0 mask 255.255.0.0 192.168.199.1 if 192.168.199.12 >route delete 10.0.0.0 mask 255.255.0.0 192.168.199.1 if 0x3 And while it still might simply be a routing issue, attempts to add or delete routes fail. At what level is Cisco VPN client driver doing what in the networking stack that takes overrides a local administrator's ability to administer their machine? The Cisco VPN client cannot be employing magic. It's still software running on my computer. What mechanism is it using to interfere with my machine's network? What happens when an IP/ICMP packet arrives on the network? Where in the networking stack is the packet getting eaten? See also No internet connection with Cisco VPN Cisco VPN Client interrupts connectivity to my LDAP server Cisco VPN stops Windows 7 Browsing How can I prohibit the creation of a route in Windows XP upon connection to Cisco VPN? Rerouting local LAN and Internet traffic when in VPN VPN Client "Allow local LAN Access" Allow Local LAN Access for VPN Clients on the VPN 3000 Concentrator Configuration Example LAN access gone when I connect to VPN Windows XP Documentation: Route Edit: Things I've not yet tried: >route delete 10.0.* Update: Since Cisco has abandoned their old client, in favor of AnyConnect (HTTP SSL based VPN), this question, unsolved, can be left as a relic of history. Going forward, we can try to solve the same problem with their new client.

    Read the article

  • what kind of RAID should I choose when planning to host a vedio stream application? [duplicate]

    - by facebook-100005613813158
    This question already has an answer here: What are the different widely used RAID levels and when should I consider them? 2 answers Which RAID level should you recommend for a company that plans to hosts a video streaming application?we get 4 candidate ,RAID1 , RAID3,RAID5 AND RAID6. Which one is the best? In my opinion ,a video streaming application doesn't have a very strict demand for data correctness, so , just RAID1 is ok?But on the other hand , RAID1 seems very capacty-consuming?

    Read the article

  • How to route traffic from a subnet 10.0.0.x to a network 200.208.88.17

    - by Guilherme Longo
    I have the following configuration Router : IP: 200.208.88.17 (Internet) MASK: 255.255.255.40 Server 2003 : IP: 10.0.0.1 (with dhcp server ativated) dhcp scope: 10.0.0.11 - 10.0.0.254 MASK: 255.255.255.0 clients : IP: 10.0.0.11 - 10.0.0.254 MASK: 255.255.255.0 At this point I have all computer set-up in one switch. All clients are receiving ip´s from the dhcp server. I need to enable the internet in every client. I am not sure how to route the traffic from the clients to the router that is providing internet access. Could you please point me to the right direction?

    Read the article

  • how do i automatically add a new route to the routing table?

    - by Robbie Mckennie
    I'm looking at linking two networks with a long range Ethernet bridge. I know I can connect my two networks with a router, but my problem is how will my computers know where to send packets if I don't add the route manually? I COULD add them manually, but it seems like a hassle. I have very very limited knowledge of RIP (I know it has something to do with routing), but I don't know how to use it. edit: My vision for the network would be the 2 networks (which are currently independent home networks), connected by a microwave Ethernet link. I assumed i'd need a router on one end of the bridge, to handle communication between the 2 networks.

    Read the article

  • How to make routes on a windows 7 laptop persistent?

    - by askvictor
    I have a number of (windows 7) laptops that normally connect via wireless. We also have a wired network for special purposes. When one of these laptops plugs in to the wired network, at the moment, it makes the wired network the default route. Instead, I would like it to keep the wireless network the default, and route only 10...* through the wired. I can achieve this with: route delete 0.0.0.0 IF 22 route add 10.0.0.0 ... IF 22 (where IF 22 is the wired network interface). But how can I get this to stick? Currently, if the wired network is unplugged then re-plugged, it grabs the default route again. So I want a way of making the wireless network not get the default route, and to make the 10...* network persistent. Is there a hook to run commands after a network connection is established in windows? In linux I would use post-up hooks.

    Read the article

  • How to route packets from Wi-Fi to Ethernet on OSX?

    - by Alexander Artemenko
    I have a trouble, configuring a home network. Here is how my devices are connected together: Internet     ? Wi-Fi Router ? MacBook     ? iMac ?ethernet cable? Synology NAS I have no ability to plugin NAS right into the Wi-Fi router. The problem is that MacBook does not see NAS, because they are in different networks — I configured Wi-Fi Router to serve 192.168.10.0/24 addresses, and configured iMac's ethernet connection to use 192.168.20/24 network. Is there a way to setup route from MacBook to the NAS?

    Read the article

  • How can one domain route to an always-changing pool of servers?

    - by ryeguy
    I'm sure this is an easy solution, I'm just not too familiar with how DNS works or if that's even related to this problem. If I'm running a web service on amazon ec2, distributed across many instances, how can I make it so a single domain name can be used to access the entire pool of servers, which will be changing from time to time? Since the instances may be present one second but gone the next (and vice versa), I need a way to randomly pick an active member of the cluster to route to. The updates would have to be instantaneous. Is this even possible, with dns caching and all?

    Read the article

  • Is there a navigation app for iPad which re-calculate the route?

    - by earlyadopter
    iPad 3G successfully shows me current location, but google maps are not re-calculating the route if I did not follow exactly initially suggested by it. Normal auto navigators re-calculate on the fly. CoPilot Live HD app I see in the app store has very bad feedback. Do you know any other that are better, please? I need it with maps for the continental U.S., and being able to re-calculate depending on my real current location. I'd be OK even if it won't do that automatically, — I'd tap some button.

    Read the article

  • Just released: a new SEO extension for the ASP.NET MVC routing engine

    - by efran.cobisi
    Dear users,after several months of hard work, we are proud to announce to the world that Cobisi's new SEO routing engine for ASP.NET MVC has been officially released! We even provide a free edition which comes at no cost, so this is something you can't really miss if you are a serious ASP.NET developer. ;)SEO routes for ASP.NET MVCCobisi SEO Extensions - this is the name of the product - is an advanced tool for software developers that allows to optimize ASP.NET MVC web applications and sites for search engines. It comes with a powerful routing engine, which extends the standard ASP.NET routing module to provide a much more flexible way to define search optimized routes, and a complete set of classes that make customizing the entire routing infrastructure very easy and cool.In its simplest form, defining a route for an MVC action is just a matter of decorating the method with the [Route("...")] attribute and specifying the desired URL. The library will take care of the rest and set up the route accordingly; while coding routes this way, Cobisi SEO Extensions also shows how the final routes will be, without leaving the Visual Studio IDE!Manage MVC routes with easeIn fact, Cobisi SEO Extensions integrates with the Visual Studio IDE to offer a large set of time-saving improvements targeted at ASP.NET developers. A new tool window, for example, allows to easily browse among the routes exposed by your applications, being them standard ASP.NET routes, MVC specific routes or SEO routes. The routes can be easily filtered on the fly, to ease finding the ones you are interested in. Double clicking a SEO route will even open the related ASP.NET MVC controller, at the beginning of the specified action method.In addition to that, Cobisi SEO Extensions allows to easily understand how each SEO route is composed by showing the routing model details directly in the IDE, beneath each MVC action route.Furthermore, Cobisi SEO Extensions helps developers to easily recognize which class is an MVC controller and which methods is an MVC action by drawing a special dashed underline mark under each items of these categories.Developers, developers, developers, ...We are really eager to receive your feedback and suggestions - please feel free to ping us with your comments! Thank you! Cheers! -- Efran Cobisi Cobisi lead developer Microsoft MVP, MCSD, MCAD, MCTS: SQL Server 2005, MCP

    Read the article

  • Routing tables don't show ppp0 after 12.04 kernel upgrade to 3.5.0: Haier CE682 modem configuration

    - by ubunsteve
    I'm trying to get my Haier CE682 EVDO modem, model number 201e:1022 to work in ubuntu 12.04 kernel 3.5.0-030500-generic #201207211835 . I had it working in a previous 12.04 kernel, using compat-wireless and these instructions http://zulkhamsyahmh.blogspot.com/2012/05/install-smartfren-haier-ce682-on-ubuntu.html, and to get it working had to edit the routing tables so that there was a ppp0 showing up, as suggested at http://www.linuxquestions.org/questions/slackware-14/wvdial-is-connecting-but-im-unable-to-do-anything-714861/ Network manager doesn't work with this modem, so I use either wvdial or gpppon to connect to it, both which work (after I run the command sudo modprobe usbserial vendor=0x201e product=0x1022 ) This is the output of when I connect with gpppon to the modem: Using interface ppp0 Connect: ppp0 <-- /dev/ttyUSB0 sent [LCP ConfReq id=0x1 ] rcvd [LCP ConfAck id=0x1 ] rcvd [LCP ConfReq id=0x2 ] sent [LCP ConfAck id=0x2 ] sent [LCP EchoReq id=0x0 magic=0x819c86db] rcvd [CHAP Challenge id=0x1 <1ac8f12799e953967a3cc222c9254690, name = ""] sent [CHAP Response id=0x1 <6f12a903dc40915ca2761c17b87f8fbd, name = "smart"] rcvd [LCP EchoRep id=0x0 magic=0x0] rcvd [CHAP Success id=0x1 ""] CHAP authentication succeeded CHAP authentication succeeded sent [CCP ConfReq id=0x1 ] sent [IPCP ConfReq id=0x1 ] rcvd [IPCP ConfReq id=0x1 ] sent [IPCP ConfAck id=0x1 ] rcvd [CCP ConfReq id=0x1] sent [CCP ConfAck id=0x1] rcvd [CCP ConfRej id=0x1 ] sent [CCP ConfReq id=0x2] rcvd [IPCP ConfRej id=0x1 ] sent [IPCP ConfReq id=0x2 ] rcvd [CCP ConfAck id=0x2] rcvd [IPCP ConfNak id=0x2 ] sent [IPCP ConfReq id=0x3 ] rcvd [IPCP ConfAck id=0x3 ] not replacing existing default route via 192.168.3.1 local IP address 10.191.248.154 remote IP address 10.17.95.25 primary DNS address 10.17.3.244 secondary DNS address 10.17.3.245 as you can see there is a problem with "not replacing existing default route via 192.168.3.1" This it the out put of route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.3.1 0.0.0.0 UG 0 0 0 wlan0 link-local * 255.255.0.0 U 1000 0 0 wlan0 192.168.3.0 * 255.255.255.0 U 2 0 0 wlan0 I had tried these commands, which had previously worked in the earlier kernel: route del default route add default ppp0 but that broke my wireless internet connection. I then added the default routing as shown above with sudo route add default gw 192.168.3.1 wlan0 So it seems I need to add or change the routing to show a ppp0 connection, but I don't know how to do that.

    Read the article

  • MVC SiteMap - when different nodes point to same action SiteMap.CurrentNode does not map to the correct route

    - by awrigley
    Setup: I am using ASP.NET MVC 4, with mvcSiteMapProvider to manage my menus. I have a custom menu builder that evaluates whether a node is on the current branch (ie, if the SiteMap.CurrentNode is either the CurrentNode or the CurrentNode is nested under it). The code is included below, but essentially checks the url of each node and compares it with the url of the currentnode, up through the currentnodes "family tree". The CurrentBranch is used by my custom menu builder to add a class that highlights menu items on the CurrentBranch. The Problem: My custom menu works fine, but I have found that the mvcSiteMapProvider does not seem to evaluate the url of the CurrentNode in a consistent manner: When two nodes point to the same action and are distinguished only by a parameter of the action, SiteMap.CurrentNode does not seem to use the correct route (it ignores the distinguishing parameter and defaults to the first route that that maps to the action defined in the node). Example of the Problem: In an app I have Members. A Member has a MemberStatus field that can be "Unprocessed", "Active" or "Inactive". To change the MemberStatus, I have a ProcessMemberController in an Area called Admin. The processing is done using the Process action on the ProcessMemberController. My mvcSiteMap has two nodes that BOTH map to the Process action. The only difference between them is the alternate parameter (such are my client's domain semantics), that in one case has a value of "Processed" and in the other "Unprocessed": Nodes: <mvcSiteMapNode title="Process" area="Admin" controller="ProcessMembers" action="Process" alternate="Unprocessed" /> <mvcSiteMapNode title="Change Status" area="Admin" controller="ProcessMembers" action="Process" alternate="Processed" /> Routes: The corresponding routes to these two nodes are (again, the only thing that distinguishes them is the value of the alternate parameter): context.MapRoute( "Process_New_Members", "Admin/Unprocessed/Process/{MemberId}", new { controller = "ProcessMembers", action = "Process", alternate="Unprocessed", MemberId = UrlParameter.Optional } ); context.MapRoute( "Change_Status_Old_Members", "Admin/Members/Status/Change/{MemberId}", new { controller = "ProcessMembers", action = "Process", alternate="Processed", MemberId = UrlParameter.Optional } ); What works: The Html.ActionLink helper uses the routes and produces the urls I expect: @Html.ActionLink("Process", MVC.Admin.ProcessMembers.Process(item.MemberId, "Unprocessed") // Output (alternate="Unprocessed" and item.MemberId = 12): Admin/Unprocessed/Process/12 @Html.ActionLink("Status", MVC.Admin.ProcessMembers.Process(item.MemberId, "Processed") // Output (alternate="Processed" and item.MemberId = 23): Admin/Members/Status/Change/23 In both cases the output is correct and as I expect. What doesn't work: Let's say my request involves the second option, ie, /Admin/Members/Status/Change/47, corresponding to alternate = "Processed" and a MemberId of 47. Debugging my static CurrentBranch property (see below), I find that SiteMap.CurrentNode shows: PreviousSibling: null Provider: {MvcSiteMapProvider.DefaultSiteMapProvider} ReadOnly: false ResourceKey: "" Roles: Count = 0 RootNode: {Home} Title: "Process" Url: "/Admin/Unprocessed/Process/47" Ie, for a request url of /Admin/Members/Status/Change/47, SiteMap.CurrentNode.Url evaluates to /Admin/Unprocessed/Process/47. Ie, it is ignorning the alternate parameter and using the wrong route. CurrentBranch Static Property: /// <summary> /// ReadOnly. Gets the Branch of the Site Map that holds the SiteMap.CurrentNode /// </summary> public static List<SiteMapNode> CurrentBranch { get { List<SiteMapNode> currentBranch = null; if (currentBranch == null) { SiteMapNode cn = SiteMap.CurrentNode; SiteMapNode n = cn; List<SiteMapNode> ln = new List<SiteMapNode>(); if (cn != null) { while (n != null && n.Url != SiteMap.RootNode.Url) { // I don't need to check for n.ParentNode == null // because cn != null && n != SiteMap.RootNode ln.Add(n); n = n.ParentNode; } // the while loop excludes the root node, so add it here // I could add n, that should now be equal to SiteMap.RootNode, but this is clearer ln.Add(SiteMap.RootNode); // The nodes were added in reverse order, from the CurrentNode up, so reverse them. ln.Reverse(); } currentBranch = ln; } return currentBranch; } } The Question: What am I doing wrong? The routes are interpreted by Html.ActionLlink as I expect, but are not evaluated by SiteMap.CurrentNode as I expect. In other words, in evaluating my routes, SiteMap.CurrentNode ignores the distinguishing alternate parameter.

    Read the article

  • How to pass parameters dynamically in PHP?

    - by user198729
    I need to pass the $route to its inner function,but failed: function compilePath( $route ) { preg_replace( '$:([a-z]+)$i', 'pathOption' , $route['path'] ); function pathOption($matches) { global $route;//fail to get the $route } } I'm using php5.3,is there some feature that can help?

    Read the article

  • Using "route add" to tell my computer to use a direct ethernet connexion instead of wifi ?

    - by TheSamFrom1984
    2 PCs are involved. Both are connected to the internet via Wifi on the same router. I can ping to/from each other and share folders flawlessly, but I'd like to be able to set a direct Ethernet link between them to speed up file transfers AND keep the Wifi connections (no gateway). So I plugged my RJ45 cable, and set up the connection. It works, but the PCs are only using this connection if one of them if disconnected from the Wifi. PC1 local address is 192.168.0.7 on its ethernet interface, and 192.168.1.21 on the wifi one. PC2 local address is 192.168.0.6 on its ethernet interface, and 192.168.1.22 on the wifi one. My question is : I'd like to using the route add command to tell PC1 to use the Ethernet interface when it needs to connect with PC2, by specifying "IF 2" at the end of the route add command. How can I do this ? I don't know what to put in the "gateway" parameter of the command, and everything I tried returns "the parameter is incorrect" (i don't know which one). ipconfig /all on PC1 : Windows IP Configuration Host Name . . . . . . . . . . . . : Sam-PC Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No Wireless LAN adapter Wireless Network Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : NETGEAR WG111v3 54Mbps Wireless USB 2.0 Adapter Physical Address. . . . . . . . . : 00-22-3F-DA-51-56 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::1d33:60b:476c:d396%12(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.1.21(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained. . . . . . . . . . : vendredi 27 novembre 2009 15:38:48 Lease Expires . . . . . . . . . . : dimanche 29 novembre 2009 07:33:04 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DHCPv6 IAID . . . . . . . . . . . : 301998655 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-12-7E-58-EA-00-1A-4D-59-B2-71 DNS Servers . . . . . . . . . . . : 192.168.1.1 NetBIOS over Tcpip. . . . . . . . : Enabled Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller Physical Address. . . . . . . . . : 00-1A-4D-59-B2-71 DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::f598:c3a0:df8d:706e%11(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.0.7(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : DHCPv6 IAID . . . . . . . . . . . : 234887757 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-12-7E-58-EA-00-1A-4D-59-B2-71 DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 fec0:0:0:ffff::2%1 fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Enabled

    Read the article

  • IP Phone over VPN - one way calls unless default route?

    - by dannymcc
    I have come across a strange problem with our VPN and BCM 50 (Nortel/Avaya) phone system. As you can tell by my other questions I have been doing some work on setting a VPN up from one location to another and it's all working well. With one exception. We have an IP phone that is connected at the remote location, straight to a router which has a VPN tunnel to our main practice. The phone works mostly, but every few calls it turns into a one way call. As in, the caller (from the remote phone) can't hear the receiver- but the receiver can hear the caller. This is fixed by setting the VPN tunnel to be the default route for all traffic. The problem with fixing it that way is that all traffic then goes through the tunnel which slows internet access etc. down considerably. The router is set to send the following over the VPN: 192.168.1.0/24 192.168.2.0/24 192.168.4.0/24 The IP of the remote location is: 192.168.3.0/24 The remote router (where the phone is) is a Draytek 2830n, and the local router (at the main practice) is a Draytek 2820. We are using an IPSec tunnel with AES encryption <- as a result of a previous answer pointing to the incompatibility in the hardware encryption. Any advice would be appreciated!

    Read the article

  • How is route automatic metric calculated on Windows 7?

    - by e-t172
    KB299540 explains how Windows XP automatically assign metrics to IP routes: The following table outlines the criteria that is used to assign metrics for routes that are bound to network interfaces of various speeds. Greater than 200 Mb: 10 Greater than 20 Mb, and less than or equal to 200 Mb: 20 Greater than 4 Mb, and less than or equal to 20 Mb: 30 Greater than 500 kilobits (Kb), and less than or equal to 4 Mb: 40 Less than or equal to 500 Kb: 50 However, they seem to have changed their algorithm in Windows 7, as my routing table looks like this: IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.3 10 0.0.0.0 0.0.0.0 10.202.254.254 10.202.1.2 286 10.202.0.0 255.255.0.0 On-link 10.202.1.2 286 10.202.1.2 255.255.255.255 On-link 10.202.1.2 286 10.202.255.255 255.255.255.255 On-link 10.202.1.2 286 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 192.168.0.0 255.255.255.0 On-link 192.168.0.3 266 192.168.0.3 255.255.255.255 On-link 192.168.0.3 266 192.168.0.255 255.255.255.255 On-link 192.168.0.3 266 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306 224.0.0.0 240.0.0.0 On-link 192.168.0.3 266 224.0.0.0 240.0.0.0 On-link 10.202.1.2 286 255.255.255.255 255.255.255.255 On-link 10.202.1.2 40 =========================================================================== The only "correct" metric is the first one (Gigabit connection = 10). However, other routes using the Gigabit connection have metric = 266, my VPN has metric = 286, and loopback is 306 (?!). Any idea what's going on?

    Read the article

  • How can the route between two private IPs go via public IPs?

    - by Gilles
    I'm trying to understand what this output from traceroute means. I changed the IP addresses for privacy but retained the public/private IP range distinction. traceroute.db -e -n 10.1.1.9 traceroute to (10.1.1.9), 30 hops max, 60 byte packets 1 10.0.0.1 0.596 ms 0.588 ms 0.577 ms 2 10.0.0.2 1.032 ms 1.029 ms 1.084 ms 3 10.0.0.3 3.360 ms 3.355 ms 3.338 ms 4 23.0.0.4 3.974 ms 4.592 ms 4.584 ms 5 23.0.0.5 13.442 ms 13.445 ms 13.434 ms 6 45.0.0.6 13.195 ms 12.924 ms 12.913 ms 7 67.0.0.7 52.088 ms 51.683 ms 52.040 ms 8 10.1.1.8 46.878 ms 44.575 ms 44.815 ms 9 10.1.1.9 45.932 ms 45.603 ms 45.593 ms The first 10.0.* range is inside my organisation. The last 10.1.* range is another site of my organisation. The intermediate addresses belong to various ISPs. I expect that there is some kind of VPN between the two sites, but I don't know much about our network topology. What I don't understand is how the route can go from a private address through public addresses back into private addresses. Searching led me to Public IPs on MPLS Traceroute, which gives a possible explanation: MPLS. Is MPLS the only possible or most likely explanation? Otherwise what does this tell me about our network infrastructure? Bonus question for my edification: in this scenario, who is generating the ICMP TTL exceeded packets and if relevant mangling their source and destination addresses?

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >