c# - Wpf WebBrowser NavigateToString and spoof HTTP Header (Referer) -


i have embedded wpf web browser control use:

webbrowser.navigatetostring(myinmemorygeneratedhtmlpage); 

the generated html page calls (google javascrip v3 map) web api. api call getting authenticated client id pass url , referer has authorized url. (detail authentication) . if referer not point authorized url can't load web api. problem when using navigatetostring(...) document not loading url , not include url referer when making api call.

i know how can manipulate http headers when doing webrequests , know can add http headers using [webbrowser.navigate(url, null, null, "referer: example.com"]3 when loading document.

two questions

  1. i not understand document property becomes referer property of next document being loaded. in javascript can read referrer getting document.referer property. there property represents current url, 1 becomes referer when navigating url?

  2. i need find way spoof referer on outgoing requests while using navigatetostring. see way doing this?

i hope clarify trying achieve. thank time. :)

sending , forward http requests or urls inside web browser not best way embed google map in windows desktop applications.

have tried gds google map winforms control? winforms control integrates live google map on desktop environment. using it, don't need worry authentication since handles you. hosted in wpf application.

check following links see how winform control can used in wpf: https://msdn.microsoft.com/en-us/library/ms751761(v=vs.110).aspx http://www.c-sharpcorner.com/uploadfile/mahesh/using-windows-forms-controls-in-wpf/


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -