During a post for a new model, I am checking for authentication via Authlogic. There is a before_filter on the create request. It is calling require_user. After the user session has been successfully created, the redirect_back_or_default(default) method is called. The problem is, The request needs to be posted to the stored uri. I ha...
I am developing a website(web forms , not MVC) in VS 2008(with SP1 ).I am trying to incorporate the ASP.NET Routing.I am following the MSDN tutorial to do it.
http://msdn.microsoft.com/en-us/library/cc668201.aspx
I have added the below items to my glbal.asax.cs file as per the tutorial
protected void Application_Start(object sender, Ev...
I've just upgraded my old wildcard mapping based URL system to use System.Web.Routing. Before, I was able to request the URL /Service/GetItems<My.Full.Item.Type>, which was parsed on the other side and returned exactly what you'd expect. That was neat.
Now with Routing on, any request with a < or > in it returns me the contents of '/'...
I need the correct Global.asax settings in order for my Dynamic Data site to run under an ASP.NET MVC project. The routing currently appears to be my issue.
Here is my global.asax:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
MetaModel model = new MetaModel();
...
I am writing an MVC app that has two branches to travel along right from the beginning. On path authorizes with a PIN and I am using forms authentication to limit access to this section of the code. However, the other path will accept an AD log in and I need stop people from move between the branches using URLs. Should I be using a cu...
I'm trying to learn MVC and having a rough start.
routes.MapRoute(
"Test",
"Test/{stringInput}",
new { controller = "Test", action = "TestMethod", stringInput = "" }
);
doesn't pass stringInput to the method TestMethod in the controller. It comes over null.
Not sure what I'm missing, it seems very simple and str...
I'd like to occasionally map new routes to the RouteCollection during program execution long after the Global.asax RegisterRoutes() method had first executed.
How can I do this?
...
Here is the route:
map.resources :networks do |network|
network.resources :channels, :name_prefix => nil
end
Here is what I have in my for my form.
<% form_for ([@network, @channel]) do |f| %>
...
<% end %>
I get an undefined method error since form_for is trying to call "network_channel_path". This error occurs because I h...
I want to connect to a system which is behind a router. I know the public address of the router as well as the private ip (fixed always) of the system. How do i establish socket connection with the private ip?
...
What are all the available routing key words?
I've seen examples using resource, pathInfo, url, controller, action, etc, but I have no clue what is available for me to use.
I know if you just put an arbitrary word like "{blah}" in there, you are defining a parameter that will be used, but I'm guessing you won't be able to use "{resourc...
I have two routes:
map.all_devices '/all_devices', :controller => 'all_devices', :action => 'initialize_devices'
map.show_user_date_select '/all_devices', :controller => 'all_devices', :action => 'show_user_date_select'
I want a user to click on a button, do the show_user_date_select action then be redirect back to mysite.com/all_devi...
I am making a ASP.Net Dynamic Data website where I have one table, Orders, and another table, OrderLines. The Orderlines table has an FK-relationship back to Orders. This means that one Order may contain zero or more OrderLines.
The default workflow offered by Dynamic Data will let me do this:
Go to the list of Orders, click "add ne...
Here's what I'd like to do. I have content that I am writing out to a view. This content has image references that are document relative. So for example, if I'm looking at the following URL:
http://localhost/article/8AB98/
The content might have an image in the following form:
<img src="myimage.png" />
This would obviously cause...
I'm having a weird issue where ViewContext.RouteData.Values["action"] is null on my staging server, but works fine on my dev machine (asp.net development server).
The code is simple:
public string CheckActiveClass(string actionName)
{
string text = "";
if (ViewContext.RouteData.Values["action"].ToString() == actionN...
Hi all, lets say i have the following relationship:
class Event < ActiveRecord::Base
has_many :tickets
end
class Ticket < ActiveRecord::Base
belongs_to :event
end
And I have a route like this:
map.resources :events, :has_many => :tickets
map.resources :tickets
And i have a before filter like this on tickets_controller:
be...
What I want to do is have a page at /Products/Details/{id} which routes to the action details on ProductsController, and then an edit version of the page at /Products/Details/Edit/{id}. I tried to do this using [ActionName("Details/Edit")] on the Action but that doesnt work.
...
Is there a way in the Ruby On Rails Routing framework to make a decision about which controller or action to call based on some logic all within a single route?
For example, let's say have a url zip/354 and I want to call the foo action if the integer is even and the bar action if the integer is odd. To use pseudo-ruby:
map.connect 'z...
I'm setting up a CakePHP project, and would like all requests passed in to be redirected to one specific controller.
Currently my routing rule is set up like this:
Router::connect('/:action/*', array('controller' => 'files'));
However, this is obviously not the correct way to achieve this, as it is producing several E_NOTICE errors.
...
I am developing an ecommerce website with CI that has product categories and products. I want to route the URL so that it will go to the products controller, then run the getCategoryByName function for the first segment, then run the getProductByName for the second segment. Here is what I have:
URL:
products/docupen/rc805
routes.php...
Some of my routes don't work because the deCarta DDS doesn't find any arc near OLL and/or DLL and the server answers:
RMAN|%S=Cannot find path origin%N=0||
How to make the server search a nearby arc (SNAP) and do the route (RMAN) in a single request?
...