I'm glad you were able to work it out and that the routing wasn't completely broken.
On Tue, Jul 21, 2009 at 6:54 AM, JakeS <[email protected]> wrote: > > And I finally got it. There was a sneaky filter applied to all > controllers (through some inheritance, not directly) that would > redirect users from http://mysite/whatever to https://mysite/whatever, > causing the parameters to be dropped. > > I'm sorry for cluttering the list with my mess. And thank you again > for the troubleshooting tips. > > On Jul 20, 1:52 pm, JakeS <[email protected]> wrote: > > I spoke too soon. Now it's passing an empty string to the action on > > the controller on production (while it works fine under debug on the > > dev machine). > > > > Here's the latest route: > > RoutingModuleEx.Engine.Add( > > new PatternRoute("/Coupon/[couponCode]") > > .DefaultForController().Is("CouponRedemtion") > > .DefaultForAction().Is("Redeem")); > > > > And the controller: > > > > public class CouponRedemtionController : ControllerBase > > { > > private readonly CouponManager couponManager; > > > > public CouponRedemtionController(CouponManager couponManager) > > { > > this.couponManager = couponManager; > > } > > > > public void Redeem(string couponCode) > > { > > Logger.Fatal("coupon used: " + couponCode); > > if (couponManager.IsValidCouponCode(couponCode)) > > UserSession.SignUp.CouponCode = couponCode; > > RedirectToSiteRoot(); > > } > > } > > > > On the production box, the log shows the "coupon used: " with no > > text. This is killing me. > > > > On Jul 20, 1:23 pm, JakeS <[email protected]> wrote: > > > > > I'm not sure why it ever worked on my dev box, but I found the > > > problem. Of course, it was behaving exactly as it should :) > > > > > With that routing pattern, the following would occur: > > > > > # user requestshttp://mysite.com/coupon/1234 > > > # reroute tohttp://mysite.com/coupon/Redeem.html?couponID=1234 > > > # then THAT would reroute tohttp://mysite.com/coupon/Redeem. > > > > > I fixed this up by renaming my controller to something other than > > > "coupon". > > > > > Thanks for all the troubleshooting suggestions. > > > > > On Jul 20, 10:48 am, James Curran <[email protected]> wrote: > > > > > > On Sun, Jul 19, 2009 at 6:15 PM, JakeS<[email protected]> > wrote: > > > > > The global.asax has the following defined: > > > > > > > RoutingModuleEx.Engine.Add( > > > > > new PatternRoute("/coupon/<couponCode>") > > > > > .DefaultForController().Is("coupon") > > > > > .DefaultForAction().Is("Redeem")); > > > > > > This sounds a bit like a problem I had a few months ago. The full > > > > thread on that is here > > > > ( > http://groups.google.com/group/castle-project-users/browse_thread/thr...), > > > > but the quick thing to try is change the line to: > > > > > > new PatternRoute("/coupon/[couponCode]") > > > > > > -- > > > > Truth, > > > > James > > > -- Jono --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
