Whats your routing? You obviously use routing with that sort of url.

What happens if you use RedirectUsingRoute instead?



Martin Nilsson wrote:
> I'm in
> http://localhost/shop/admin/template/new
> and posting to
> http://localhost/shop/admin/template/create
>
> In "create" action in my controller I have
>
> RedirectToAction("list");
>
> By using Live HTTP I can see that in the first header
> (admin/template/create) location is:
>
> Location: /shop/
>
> and I'm redirected to "http://localhost/shop"; instead of
> "http://localhost/shop/admin/template/list";
>
> If I change "RedirectToAction("list");" to "RedirectToReferrer();"
> then I end up in "/shop/admin/template/new" but I want to go to
> "/shop/admin/template/list"
>
> Any suggestions?
>
>
> On Mon, Nov 3, 2008 at 2:53 PM, Jimmy Shimizu <[EMAIL PROTECTED]> wrote:
>   
>> Which action do you post your form to?
>>
>> Have you checked using Live HTTP header or fiddler if that actions sends
>> a Location: header? I believe a Redirect will do that.
>>
>> Martin Nilsson wrote:
>>     
>>> Hi,
>>>
>>> I can't get my application to work in IIS7. When I use VS Dev Server
>>> then it work but when I deploy it to IIS it doesn't. It's my redirects
>>> that I have a problem with.
>>>
>>> 1. I navigate to http://localhost/shop/admin/template/new where shop
>>> is my app name
>>> 2. Fill in the form and submit it
>>> 3. In my create controller action I have "RedirectToAction("new") but
>>> I end up in http://localhost/shop instead.
>>>
>>> Anyone that has an idea why it's different in IIS from VS Dev Server?
>>>
>>> Here is my config. Note that my static handler didn't work for
>>> path="*.*" so I have explicit added the extension for now until I have
>>> a solution
>>>
>>> <system.webServer>
>>>     <modules>
>>>       <add name="routingEx"
>>> type="Castle.MonoRail.Framework.Routing.RoutingModuleEx,Castle.MonoRail.Framework"
>>> preCondition="managedHandler" />
>>>       <add name="PerRequestLifestyle"
>>> type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule,Castle.MicroKernel"
>>> preCondition="managedHandler" />
>>>     </modules>
>>>     <handlers accessPolicy="Script, Execute, Read">
>>>       <clear />
>>>       <add name="js" path="*.js" verb="GET,HEAD"
>>> modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule"
>>> resourceType="File" requireAccess="Read" />
>>>       <add name="css" path="*.css" verb="GET,HEAD"
>>> modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule"
>>> resourceType="File" requireAccess="Read" />
>>>       <add name="png" path="*.png" verb="GET,HEAD"
>>> modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule"
>>> resourceType="File" requireAccess="Read" />
>>>       <add name="ASPX" path="*.aspx" verb="*"
>>> type="System.Web.UI.PageHandlerFactory" resourceType="Unspecified"
>>> preCondition="integratedMode" />
>>>       <add name="Block-Boo" path="*.boo" verb="*"
>>> type="System.Web.HttpForbiddenHandler, System.Web"
>>> modules="ManagedPipelineHandler" scriptProcessor=""
>>> resourceType="Unspecified" requireAccess="Script"
>>> preCondition="integratedMode,runtimeVersionv2.0" />
>>>       <add name="Block-Brail-JS" path="*.brailjs" verb="*"
>>> type="System.Web.HttpForbiddenHandler, System.Web"
>>> modules="ManagedPipelineHandler" scriptProcessor=""
>>> resourceType="Unspecified" requireAccess="Script"
>>> preCondition="integratedMode,runtimeVersionv2.0" />
>>>       <add name="Block-Brail" path="*.brail" verb="*"
>>> type="System.Web.HttpForbiddenHandler, System.Web"
>>> modules="ManagedPipelineHandler" scriptProcessor=""
>>> resourceType="Unspecified" requireAccess="Script"
>>> preCondition="integratedMode,runtimeVersionv2.0" />
>>>       <add name="Monorail-All" path="*" verb="*"
>>> type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory,
>>> Castle.MonoRail.Framework" modules="ManagedPipelineHandler"
>>> scriptProcessor="" resourceType="Unspecified" requireAccess="Script"
>>> preCondition="" />
>>>     </handlers>
>>>     <validation validateIntegratedModeConfiguration="false" />
>>>   </system.webServer>
>>>
>>>       
>>     
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to castle-project-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to