« Previous Next »

Thread: Problem with ARR when the content server's return 302

Last post 10-30-2009 2:44 PM by anilr. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 10-23-2009, 8:10 AM

    Problem with ARR when the content server's return 302

    I am using the ARR Extension. I am currently facing a big issue.... could you be able to help..

    My problem is i am are having a windows server 2008 machine with ARR2 installed and i am trying to expose some of the applications running in different servers under one roof using rewrite rules..

    say my windows 2008 machine is running a website like www.repository.com

    and i want to expose all the applications as www.repository.com/test/projects/*

    where * is my application name running across different servers

    i have created a server farm for each applications and written a rule each one of them in my Projects virtual directory.

    Everything seems to be working fine... Except one small issue

     Consider my Application name as sample1

     And i am requesting it as www.repository.com/test/projects/sample1

    I am getting the 302 response as sample1/

    this response is getting routed as www.repository.com/test/sample1/

    instead of www.repository.com/test/projects/sample1/

    and returning 404 error...

    but if i give www.repository.com/test/projects/sample1/ it is working..

    Am i missing somthing... Please Help..

    Shiva
  • 10-23-2009, 9:23 AM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Problem with ARR when the content server's return 302

    What is the exact url-rewrite rule you are using?  Can you collect failed request trace for all the request doing the redirect and the one hitting the issue.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 10-26-2009, 4:52 AM In reply to

    Re: Problem with ARR when the content server's return 302

    Hi Anil,

    I checked the IIS Failed Request Tracing.

    Request URI Is http:\\10.237.214.238\apps\test\search

    I have written a rewrite rule in apps virtual directory as

    <rule name="AppsRedirect" patternSyntax="ECMAScript">
                        <match url="(Test)/([-a-z,0-9,.,/,_]*|[-]*)$" negate="false" />
                        <conditions />
                        <serverVariables />
                        <action type="Rewrite" url="http://Flight/{R:2}" />
    </rule>

    Flight is a Webfarm Name...

    Please find the Failed request Trace log below

    No. EventName Details Time
    1. i GENERAL_REQUEST_START SiteId="1", AppPoolId="DefaultAppPool", ConnId="1610627446", RawConnId="0", RequestURL="http://10.237.214.238:80/apps/test/search", RequestVerb="GET" 21:48:26.816
    2. — PRE_BEGIN_REQUEST_START ModuleName="RequestMonitorModule" 21:48:26.816
    3. — PRE_BEGIN_REQUEST_END ModuleName="RequestMonitorModule", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    4. — PRE_BEGIN_REQUEST_START ModuleName="IsapiFilterModule" 21:48:26.816
    5. i FILTER_START FilterName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" 21:48:26.816
    6. i FILTER_PREPROC_HEADERS_START 21:48:26.816
    7. — GENERAL_SET_REQUEST_HEADER HeaderName="AspFilterSessionId", HeaderValue="", Replace="true" 21:48:26.816
    8. i FILTER_SET_REQ_HEADER HeaderName="AspFilterSessionId:", HeaderValue="" 21:48:26.816
    9. i FILTER_PREPROC_HEADERS_END 21:48:26.816
    10. i FILTER_END 21:48:26.816
    11. — PRE_BEGIN_REQUEST_END ModuleName="IsapiFilterModule", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    12. — PRE_BEGIN_REQUEST_START ModuleName="RewriteModule" 21:48:26.816
    13. — PRE_BEGIN_REQUEST_END ModuleName="RewriteModule", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    14. — PRE_BEGIN_REQUEST_START ModuleName="FailedRequestsTracingModule" 21:48:26.816
    15. — PRE_BEGIN_REQUEST_END ModuleName="FailedRequestsTracingModule", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    16. i GENERAL_REQUEST_HEADERS Headers="Connection: Keep-AliveAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-shockwave-flash, */*Accept-Encoding: gzip, deflateAccept-Language: en-usHost: 10.237.214.238User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; MS-RTC LM 8; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)UA-CPU: x86" 21:48:26.816
    17. i URL_CACHE_ACCESS_START RequestURL="/apps/test/search" 21:48:26.816
    18. i URL_CACHE_ACCESS_END PhysicalPath="", URLInfoFromCache="false", URLInfoAddedToCache="true", ErrorCode="The operation completed successfully. (0x0)" 21:48:26.816
    19. i GENERAL_GET_URL_METADATA PhysicalPath="C:\Apps\test\search", AccessPerms="513" 21:48:26.816
    20. — NOTIFY_MODULE_START ModuleName="IsapiFilterModule", Notification="MAP_PATH", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    21. — NOTIFY_MODULE_END ModuleName="IsapiFilterModule", Notification="MAP_PATH", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    22. — NOTIFY_MODULE_START ModuleName="HttpCacheModule", Notification="BEGIN_REQUEST", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    23. — NOTIFY_MODULE_END ModuleName="HttpCacheModule", Notification="BEGIN_REQUEST", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    24. — NOTIFY_MODULE_START ModuleName="RequestFilteringModule", Notification="BEGIN_REQUEST", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    25. — NOTIFY_MODULE_END ModuleName="RequestFilteringModule", Notification="BEGIN_REQUEST", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    26. — NOTIFY_MODULE_START ModuleName="ConfigurationValidationModule", Notification="BEGIN_REQUEST", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    27. — NOTIFY_MODULE_END ModuleName="ConfigurationValidationModule", Notification="BEGIN_REQUEST", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    28. — NOTIFY_MODULE_START ModuleName="RewriteModule", Notification="BEGIN_REQUEST", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    29. — GENERAL_SET_REQUEST_HEADER HeaderName="X-Original-URL", HeaderValue="/apps/test/search", Replace="true" 21:48:26.816
    30. i URL_CHANGED OldUrl="/apps/test/search", NewUrl="" 21:48:26.816
    31. — NOTIFY_MODULE_END ModuleName="RewriteModule", Notification="BEGIN_REQUEST", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    32. — NOTIFY_MODULE_START ModuleName="FailedRequestsTracingModule", Notification="BEGIN_REQUEST", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    33. — NOTIFY_MODULE_END ModuleName="FailedRequestsTracingModule", Notification="BEGIN_REQUEST", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    34. — NOTIFY_MODULE_START ModuleName="IsapiFilterModule", Notification="AUTHENTICATE_REQUEST", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    35. — NOTIFY_MODULE_END ModuleName="IsapiFilterModule", Notification="AUTHENTICATE_REQUEST", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    36. — NOTIFY_MODULE_START ModuleName="BasicAuthenticationModule", Notification="AUTHENTICATE_REQUEST", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    37. i AUTH_START AuthTypeSupported="Basic" 21:48:26.816
    38. i AUTH_END 21:48:26.816
    39. — NOTIFY_MODULE_END ModuleName="BasicAuthenticationModule", Notification="AUTHENTICATE_REQUEST", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    40. — NOTIFY_MODULE_START ModuleName="WindowsAuthenticationModule", Notification="AUTHENTICATE_REQUEST", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    41. i AUTH_START AuthTypeSupported="NT" 21:48:26.816
    42. i AUTH_END 21:48:26.816
    43. — NOTIFY_MODULE_END ModuleName="WindowsAuthenticationModule", Notification="AUTHENTICATE_REQUEST", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    44. — NOTIFY_MODULE_START ModuleName="AnonymousAuthenticationModule", Notification="AUTHENTICATE_REQUEST", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    45. i AUTH_START AuthTypeSupported="Anonymous" 21:48:26.816
    46. i AUTH_REQUEST_AUTH_TYPE RequestAuthType="Anonymous" 21:48:26.816
    47. i AUTH_SUCCEEDED AuthType="Anonymous", NTLMUsed="false", RemoteUserName="", AuthUserName="", TokenImpersonationLevel="ImpersonationImpersonate" 21:48:26.816
    48. i USER_SET AuthType="", UserName="", SupportsIsInRole="true" 21:48:26.816
    49. i AUTH_END 21:48:26.816
    50. — NOTIFY_MODULE_END ModuleName="AnonymousAuthenticationModule", Notification="AUTHENTICATE_REQUEST", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    51. — NOTIFY_MODULE_START ModuleName="IsapiFilterModule", Notification="AUTHENTICATE_REQUEST", fIsPostNotification="true", fIsCompletion="false" 21:48:26.816
    52. — NOTIFY_MODULE_END ModuleName="IsapiFilterModule", Notification="AUTHENTICATE_REQUEST", fIsPostNotificationEvent="true", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    53. — NOTIFY_MODULE_START ModuleName="HttpCacheModule", Notification="RESOLVE_REQUEST_CACHE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    54. i OUTPUT_CACHE_LOOKUP_START 21:48:26.816
    55. i OUTPUT_CACHE_LOOKUP_END Result="NOT_FOUND" 21:48:26.816
    56. — NOTIFY_MODULE_END ModuleName="HttpCacheModule", Notification="RESOLVE_REQUEST_CACHE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    57. — NOTIFY_MODULE_START ModuleName="ApplicationRequestRouting", Notification="MAP_REQUEST_HANDLER", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    58. i HANDLER_CHANGED OldHandlerName="StaticFile", NewHandlerName="ApplicationRequestRoutingHandler", NewHandlerModules="ApplicationRequestRouting", NewHandlerScriptProcessor="", NewHandlerType="" 21:48:26.816
    59. — GENERAL_SET_REQUEST_HEADER HeaderName="Max-Forwards", HeaderValue="10", Replace="true" 21:48:26.816
    60. — GENERAL_SET_REQUEST_HEADER HeaderName="X-Forwarded-For", HeaderValue="10.237.234.207:2024", Replace="true" 21:48:26.816
    61. — GENERAL_SET_REQUEST_HEADER HeaderName="X-ARR-SSL", HeaderValue="", Replace="true" 21:48:26.816
    62. — GENERAL_SET_REQUEST_HEADER HeaderName="X-ARR-ClientCert", HeaderValue="", Replace="true" 21:48:26.816
    63. — GENERAL_SET_REQUEST_HEADER HeaderName="X-ARR-LOG-ID", HeaderValue="8e87e821-003e-40c3-8e19-d643f021147e", Replace="true" 21:48:26.816
    64. — GENERAL_SET_REQUEST_HEADER HeaderName="Connection", HeaderValue="", Replace="true" 21:48:26.816
    65. i URL_CHANGED OldUrl="http://Flight/search", NewUrl="/apps/test/search" 21:48:26.816
    66. — NOTIFY_MODULE_END ModuleName="ApplicationRequestRouting", Notification="MAP_REQUEST_HANDLER", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    67. — NOTIFY_MODULE_START ModuleName="StaticCompressionModule", Notification="MAP_REQUEST_HANDLER", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    68. — NOTIFY_MODULE_END ModuleName="StaticCompressionModule", Notification="MAP_REQUEST_HANDLER", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    69. — NOTIFY_MODULE_START ModuleName="HttpRedirectionModule", Notification="MAP_REQUEST_HANDLER", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    70. — NOTIFY_MODULE_END ModuleName="HttpRedirectionModule", Notification="MAP_REQUEST_HANDLER", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.816
    71. — NOTIFY_MODULE_START ModuleName="ApplicationRequestRouting", Notification="EXECUTE_REQUEST_HANDLER", fIsPostNotification="false", fIsCompletion="false" 21:48:26.816
    72. i MODULE_SET_RESPONSE_SUCCESS_STATUS ModuleName="ApplicationRequestRouting", Notification="EXECUTE_REQUEST_HANDLER", HttpStatus="302", HttpReason="Moved Temporarily" 21:48:26.832
    73. — NOTIFY_MODULE_START ModuleName="ApplicationRequestRouting", Notification="EXECUTE_REQUEST_HANDLER", fIsPostNotification="false", fIsCompletion="true" 21:48:26.832
    74. — NOTIFY_MODULE_START ModuleName="ApplicationRequestRouting", Notification="EXECUTE_REQUEST_HANDLER", fIsPostNotification="false", fIsCompletion="true" 21:48:26.832
    75. — NOTIFY_MODULE_END ModuleName="ApplicationRequestRouting", Notification="EXECUTE_REQUEST_HANDLER", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    76. — NOTIFY_MODULE_START ModuleName="RewriteModule", Notification="RELEASE_REQUEST_STATE", fIsPostNotification="true", fIsCompletion="false" 21:48:26.832
    77. — NOTIFY_MODULE_END ModuleName="RewriteModule", Notification="RELEASE_REQUEST_STATE", fIsPostNotificationEvent="true", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    78. — NOTIFY_MODULE_START ModuleName="HttpCacheModule", Notification="UPDATE_REQUEST_CACHE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.832
    79. i OUTPUT_CACHE_UPDATE_START CachePolicy="NO_CACHE", TimeToLive="0" 21:48:26.832
    80. i OUTPUT_CACHE_UPDATE_END Result="NOT_FREQUENTLY_HIT" 21:48:26.832
    81. — NOTIFY_MODULE_END ModuleName="HttpCacheModule", Notification="UPDATE_REQUEST_CACHE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    82. — NOTIFY_MODULE_START ModuleName="RewriteModule", Notification="SEND_RESPONSE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.832
    83. — NOTIFY_MODULE_END ModuleName="RewriteModule", Notification="SEND_RESPONSE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    84. — NOTIFY_MODULE_START ModuleName="HttpLoggingModule", Notification="SEND_RESPONSE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.832
    85. — NOTIFY_MODULE_END ModuleName="HttpLoggingModule", Notification="SEND_RESPONSE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    86. — NOTIFY_MODULE_START ModuleName="IsapiModule", Notification="SEND_RESPONSE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.832
    87. — NOTIFY_MODULE_END ModuleName="IsapiModule", Notification="SEND_RESPONSE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    88. — NOTIFY_MODULE_START ModuleName="WindowsAuthenticationModule", Notification="SEND_RESPONSE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.832
    89. — NOTIFY_MODULE_END ModuleName="WindowsAuthenticationModule", Notification="SEND_RESPONSE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    90. — NOTIFY_MODULE_START ModuleName="BasicAuthenticationModule", Notification="SEND_RESPONSE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.832
    91. — NOTIFY_MODULE_END ModuleName="BasicAuthenticationModule", Notification="SEND_RESPONSE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    92. — NOTIFY_MODULE_START ModuleName="ProtocolSupportModule", Notification="SEND_RESPONSE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.832
    93. — NOTIFY_MODULE_END ModuleName="ProtocolSupportModule", Notification="SEND_RESPONSE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    94. — NOTIFY_MODULE_START ModuleName="IsapiFilterModule", Notification="SEND_RESPONSE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.832
    95. — NOTIFY_MODULE_END ModuleName="IsapiFilterModule", Notification="SEND_RESPONSE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    96. — NOTIFY_MODULE_START ModuleName="HttpCacheModule", Notification="SEND_RESPONSE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.832
    97. — NOTIFY_MODULE_END ModuleName="HttpCacheModule", Notification="SEND_RESPONSE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    98. — NOTIFY_MODULE_START ModuleName="CustomErrorModule", Notification="SEND_RESPONSE", fIsPostNotification="false", fIsCompletion="false" 21:48:26.832
    99. — GENERAL_NOT_SEND_CUSTOM_ERROR Reason="SETSTATUS_SUCCESS" 21:48:26.832
    100. — NOTIFY_MODULE_END ModuleName="CustomErrorModule", Notification="SEND_RESPONSE", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE" 21:48:26.832
    101. i HTTPSYS_CACHEABLE HttpsysCacheable="false", Reason="HANDLER_HTTPSYS_UNFRIENDLY", CachePolicy="NO_CACHE", TimeToLive="0" 21:48:26.832
    102. i GENERAL_FLUSH_RESPONSE_START 21:48:26.832
    103. i GENERAL_RESPONSE_HEADERS Headers="Location: http://10.237.214.238/search/?Server: Microsoft-IIS/7.0X-Powered-By: ASP.NET" 21:48:26.832
    104. i GENERAL_FLUSH_RESPONSE_END BytesSent="188", ErrorCode="The operation completed successfully. (0x0)" 21:48:26.832
    105. i GENERAL_REQUEST_END BytesSent="188", BytesReceived="589", HttpStatus="302", HttpSubStatus="0" 21:48:26.832

    Every thing Works fine if i sent request as

    http://10.237.214.238/apps/test/search/

     

    Shiva
  • 10-26-2009, 5:43 AM In reply to

    Re: Problem with ARR when the content server's return 302

    If I request

    http://10.237.214.238/apps/test/search/

    My content servers are not returning 302 so it works fine....

    but i if i request

    http://10.237.214.238/apps/test/search 

    My content server returns a 302 message as /search/?

    and my browser is reponding to 302 as http://10.237.214.238/search/? and returns a 404 error...

    The request should have gone as http://10.237.214.238/apps/test/search/?

     

     

    Shiva
  • 10-30-2009, 2:44 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Problem with ARR when the content server's return 302

    URL Rewrite v2 RC2 (coming out soon) will allow you to use outbound rules to edit response headers for exactly the scenario below.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (5 items)
Microsoft Communities