CustomErrorsSection.RedirectMode 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示当用户重定向到自定义错误页时是否应更改请求的 URL。
public:
property System::Web::Configuration::CustomErrorsRedirectMode RedirectMode { System::Web::Configuration::CustomErrorsRedirectMode get(); void set(System::Web::Configuration::CustomErrorsRedirectMode value); };
[System.Configuration.ConfigurationProperty("redirectMode", DefaultValue=System.Web.Configuration.CustomErrorsRedirectMode.ResponseRedirect)]
public System.Web.Configuration.CustomErrorsRedirectMode RedirectMode { get; set; }
[<System.Configuration.ConfigurationProperty("redirectMode", DefaultValue=System.Web.Configuration.CustomErrorsRedirectMode.ResponseRedirect)>]
member this.RedirectMode : System.Web.Configuration.CustomErrorsRedirectMode with get, set
Public Property RedirectMode As CustomErrorsRedirectMode
属性值
一个值,该值指示在用户重定向到自定义错误页时是否更改 URL。 默认值为 ResponseRedirect。
- 属性
注解
RedirectMode如果该属性设置为ResponseRedirect,则用户将被重定向到错误页,原始 URL 更改为错误页的 URL。 RedirectMode如果该属性设置为ResponseRewrite,则会将用户发送到错误页,并且浏览器中的原始 URL 不会更改。