routing

Routing and Membership

I have a page that uses routing and it works fine under Visual web developer. But when I deployed to IIS 7. The page that uses routing doesn't seem to recognize the user is logged in. I think I read about this but had not seen it until now. Hope there is a fix! Environment deployed too is ASP.NET 3.5 SP1, SQL SERVER 2008, and IIS 7 int...

Using Routing helpers in a Rake task

I have a rake task that sends out the next 'x' invitations to join a beta it uses this code: desc "This will send out the next batch of invites for the beta" task :send_invites => :environment do limit = ENV['limit'] c = 0 invitation = Invitation.all(:conditions => { :sent_at => nil, :sender_id => nil }, :limit => limit).each do |...

Underscore as a segment_separators in routing.yml

In symfony project, I would like to use an underscore as a separator for the parameter in routing.yml. Url example: /article/lorem-1111_45.html In routing.yml rule_sample: url: /article/:info-:datePublished_:id.html param: { module: cms, action: test } options: segment_separators: ['-', '/', '.', '_'] requirements: i...

Help with ASP.NET 4.0 routing and subfolders

If I use routing with 2 query parameters, like this: System.Web.Routing.RouteTable.Routes.MapPageRoute("HomeRoute", "home/{f1}/{f2}", "~/Home.aspx"); My image does not appear on my Home.aspx page: <img src="~/img/img.jpg" /> or <img src="img/img.jpg" /> But it does appear when I access the http://localhost:3760/Website/Home.aspx UR...

How to implement reassigning a task functionality to WSS 3.0?

Hi to all, I am trying to create a work flow where it should collect data's from a user. Also, in this work flow, users should be able to change tasks 'Assigned To' field value(Reassign task). I can't get it done in SharePoint Designer with these workflows: 1) A main work flow which waits second workflow to set a spesific field when i...

Best way to format a query string in an asp.net mvc url?

I've noticed that if you sent a query string routevalue through asp.net mvc you end up with all whitespaces urlencoded into "%20". What is the best way of overriding this formatting as I would like whitespace to be converted into the "+" sign? I was thinking of perhaps using a custom Route object or a class that derives from IRouteHandl...

How can I store a useful value in my ASP.NET MVC site's URL and make it propagate?

Let's say I have a simple ASP.NET MVC site with two views. The views use the following routes: /Foo and /Foo/Bar. Now let's say I want to use the URL to specify (just for the sake of example) the background color of the site. I want my routes to be, for instance, /Blue/Foo or /Green/Foo/Bar. Also, if I call Html.ActionLink from a view,...

Multiple Default Routes in ASP.NET MVC to different Default Actions

I have multiple controllers with different actions (no "Index" actions). The actions I consider "default" actions, are named differently. I want to create default routes for their names and have the first available action (from my list of default actions) executed if only the controller name is provided in the route. So, for example, I ...

RoR Beginner Routing error

I've created a DB and a table within that DB called genre. Now when I try to connect to this using the URL, I get the following error message: Routing Error No route matches "/genre" with {:method=>:get} Thanks for your help in advance. ...

Why would my rails routes suddenly work differently?

I have a VPS with a hosting provider, and recently they decided to upgrade their server hardware and change virtualization software. Since that happened, I've suddenly had a problem with one of my routes in my Rails application. Nothing in my code should have changed (and didn't, as far as I can tell), and all the gems I use (including R...

Sitemap and webform routing

Hello I'm using .net 4 I have integrated webform routing in my site, everything works fine, i want to use the sitemap , is there any article to describe this, or could anyone help me to figure out how to do it. I know how to use the sitemap without routing, but things with routing seems to be difficult. thanks in advance ...

Routing fails when only category is supplied

My website uses categories and sub-categories. I'd like the follow mapping: /Category/Fruit /Category/Fruit/Apples But if I use the below: routes.MapRoute( "Category", // Route name "Category/{category}/{subcategory}", // URL with parameters new { controller = "Entity", action = "Category" } /...

Extremely Difficult Problem with ASP.Net 4.0 WebForms app using Routing

I have a completed app running in a QA environment. Everything works fine under most circumstances. If you hit a plain URL (no identifying information in the URL), you see an intro page with a button (generated by an asp LinkButton control) that posts back and directs you to another page. The markup looks the same when it fails and wh...

How do I pass objects through a _url based on a routing in rails?

I want to pass the attributes associated with two objects into a path created from a route. In this case, the _url is skip_contact_letter_url. contact_letter and letter are passed through a render partial. The clip below resides in the partial. <%= link_to_remote "Skip Letter Remote #{contact_letter}", :url => skip_contact_le...

Rails redirections with new users and logins

So I'm trying to get the user to return to the page they were looking at before they click "log in" This is what I got in my user application controller: def redirect_back_or_default(default) redirect_to(session[:return_to] || default) session[:return_to] = nil end And this is what I have in my sessions controller: def new ...

How to specify custom Sass directory with sinatra

Instead of serving my Sass files from the default 'views' directory I'd like to change this to /assets/sass The following attempts are in my main ruby root file in the app: Attempt 1 set :sass, Proc.new { File.join(root, "assets/sass") } get '/stylesheet.css' do sass :core end With this I get the following error: myapp.rb:17 ...

ASP.NET MVC: Routing

Let's say I have this Controller: public class GlobalizationController : Controller { public JavaScriptResult GlobalizedLabels(string virtualPath) { return new JavaScriptResult(); } } I want the controller to handle (i.e. invoke from) any of the relative URLs below: /globalization/~Enlargement/Controls/Container....

Advanced Rails Routing of short URLs and usernames off of root url

I want to have username URLs and Base 58 short URLs to resources both off of the root url like this: http://mydomain.com/username #=> goes to given user http://mydomain.com/a3x9 #=> goes to given story I am aware of the possibilities of a user names conflicting with short urls, and I have a workaround, but what I can't figure out is ...

Can I constrain a route parameter to a certain type in ASP.net MVC?

I have the following route: routes.MapRoute( "Search", // Route name "Search/{affiliateId}", // URL with parameters new { controller = "Syndication", action = "Search" } // Parameter defaults ); Is there a way I can ensure "affiliateId" is a va...

ASP.NET MVC Routing, "bin" as a route parameter value

Hi everybody, We are developing an English-Turkish dictionary website. "Bin" means "Thousand" in Turkish. So when a user asks for http://tureng.com/search/bin we should show her the meaning of "Bin" in English. However, since /bin is a special directory, she got a 404. Any ideas to solve it? Thanks. ...