I encountered an error after upgrading from EO.WebBrowser 19.2.91 to 25.1.35. (Yep, it was a big jump.)
When loading page,
https://login.epicor.com, several errors such as the follow were logged:
These scripts and a few css files at
aspnetcdn.com are resources referenced by the page at
login.epicor.com. I tracked the problem down to these lines of code
Code: C#
private void WebView_BeforeRequestLoad(object sender, BeforeRequestLoadEventArgs eventArgs)
{
var webView = (WebView)sender;
eventArgs.Request.Headers[Constants.USERPREFS_UI_CULTURE_CODE] = CultureCode;
eventArgs.Request.Headers[Constants.SOURCEHEADER] = Source;
eventArgs.Request.Headers[Constants.USERNAME] = UserName;
if (!String.IsNullOrEmpty(Error))
eventArgs.Request.Headers[Constants.ERROR] = Error;
}
Constants.USERNAME is equal to "username", which is reported in the error message, "Request header field username". The essential cause is that
aspnetcdn.com does not allow these custom headers. Of course, have no control of server policies at aspnetcdn.com.
Using EO.WebBrowser 19.2.91, the custom headers added to the request to
https://login.epicor.com were not transmitted to the resources (scripts and css) it references, but in the latest version(s) it does. I found no reference to anything like this in the change logs, so I don't know when it occurred.
Was this an intentional change?
Is there an option to have this behave as they did in 19.2?
I can "resolve" the issue by not applying the headers except that sometimes I need them.
Thank you