Rank: Newbie Groups: Member
Joined: 1/4/2016 Posts: 4
|
//Custom Resource handler internal class ResourceRedirectLocation333 : ResourceHandler { public const string SampleUrlPrefix = "https://www.google.com";
public const string EmbeddedPageUrl0 = "https://www.yahoo.com"; public const string EmbeddedPageUrl1 = "https://www.google.com"; public const string EmbeddedPageUrl2 = "file:///E:/Web/Main/index.html";
public override bool Match(Request request) { return request.Url.StartsWith(SampleUrlPrefix, StringComparison.OrdinalIgnoreCase); }
public override void ProcessRequest(Request request, Response response) { response.RedirectLocation = EmbeddedPageUrl0; response.StatusCode = 302; response.End(); } }
when i set response.RedirectLocation = EmbeddedPageUrl0, it is worked. but when i set response.RedirectLocation = EmbeddedPageUrl1, or =EmbeddedPageUrl2 , it is failure!
so, response.RedirectLocation can be set to file:/// ?
thx!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
This is normal. You can not redirect from an Internet Url to a local file Url. All major browser, including Google Chrome browser, impose this restrictions. Since EO.WebBrowser is based on Google Chrome's source code, you can not do that either.
Thanks!
|