Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Suspected Bug) Cannot set the response type in a web resource request event #254

Closed
shawty opened this issue Jun 9, 2020 · 3 comments
Closed

Comments

@shawty
Copy link

shawty commented Jun 9, 2020

I'm working with a scenario where I want to load a custom request into an image tag on a web page, and the image is to be generated by the C# app hosting the WebViewControl.

In my app set up, I have the following:

image

In javascript code in the page loaded into the control, I have this javascript

image

When the resource is requested by the page, the event handler in my app is fired (As Expected), my C# code in the handler looks like this

image

When the handler runs, this seems to set ok, no errors, no compile time problems etc, but soon after the entire app stops at the main entry point with a null reference.

image

If I breakpoint on my handler app, and inspect the event object just before it returns, you can clearly see that "e.Response" is null, despite my code assigning a value to it.

image

It seems to me that this is the correct process for handling a web resource request, can the team confirm if it is?

I'm currently working in .NET 4.7 with a WinForms app, but have been testing in Core too.

@shawty shawty changed the title Cannot set the response type in a web resource request event (Suspected Bug) Cannot set the response type in a web resource request event Jun 10, 2020
@shawty
Copy link
Author

shawty commented Jun 10, 2020

Closing as this appears to be being tracked in #219

@pagoe-msft
Copy link

Closing this issue because it is being tracked in #219

@shawty
Copy link
Author

shawty commented Jun 12, 2020

I thought I'd already closed this one myself :-)

Oh well... I blame friday :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants