Skip to content

Add BaseAddress property to WebAssemblyHostEnvironment #20019

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

Merged
merged 3 commits into from
Mar 23, 2020
Merged

Add BaseAddress property to WebAssemblyHostEnvironment #20019

merged 3 commits into from
Mar 23, 2020

Conversation

captainsafia
Copy link
Member

Changes in this PR

  • Adds BaseAddress to IWebAssemblyHostEnvironment
  • Uses unmarshalled APIs to extract application host
  • Move NavigationManager initialization to startup code

Addresses #19910

@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Mar 20, 2020
Copy link
Member

@rynowak rynowak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see this getting fleshed out 👍

@pranavkm
Copy link
Contributor

[ERROR] Failed to configure the HTTPS. Ambiguous certficiate match. Multiple certificates found with extension '1.3.6.1.4.1.311.84.1.1' (ASP.NET Core HTTPS development certificate).

@javiercn is this from the dev-cert tool?

Copy link
Member

@SteveSandersonMS SteveSandersonMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic!

Added a couple of minor suggestions, but will leave it to you to decide what/if to do anything with them.

This is a great improvement!

Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@captainsafia
Copy link
Member Author

@javiercn and I spent some time debugging the failing ClientSideHostingTest suite. Eventually, we realized that the errors were due to a bug in the tests. The test operated under the assumption that the NavigationManager would be lazily initialized and that the getBaseURI and getLocationhref methods would not be called immediately when the host was initialized.

As a result, a null-ref exception was thrown and navigating to any of the paths in the test suite resulted in a 404. This was not a problem before because the test suite was not expecting the base path to be validated on initialization. To resolve this issue, we updated the tests to use the correct base path on each route.

Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New changes look great!

@captainsafia captainsafia merged commit e6078c4 into dotnet:blazor-wasm-preview4 Mar 23, 2020
ghost pushed a commit that referenced this pull request Mar 25, 2020
* Restore public API contract on WebAssemblyJSRuntime (#19968)

* Shrink icon-512.png (#19999)

* Use custom DebugProxyHost to initialize DebugProxy config (#19980)

Addresses #19909

* Spruce up WebAssemblyHostEnvironment interface and use (#20008)

* Load .dlls/.wasm/.pdb in parallel with dotnet.*.js. Fixes #18898 (#20029)

* Add BaseAddress property to WebAssemblyHostEnvironment (#20019)

- Adds `BaseAddress` to `IWebAssemblyHostEnvironment`
- Uses unmarshalled APIs to extract application host
- Move NavigationManager initialization to startup code
- Fix subdir mapping in ClientSideHostingTest

Addresses #19910

Co-authored-by: Steve Sanderson <[email protected]>
Co-authored-by: Safia Abdalla <[email protected]>
Co-authored-by: Safia Abdalla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants