This change adds a fail-fast mechanism to our E2E tests based on
the browser console. This will fail super hard if an unhandled exception
is thrown.
I think it would be interesting to also see if we could do the same
thing for 404s.
The goal of this change is to make it so that the E2E tests can fail
faster (3-4s) than the 30s timeout in the case that something
catastrophic happens. As a nice side benefit you get to see the
exception message.
- In preview8 we warned users for non-public `[Parameter]`s and `[Parameter]` setters. For preview9 this is now an error because things will not work as they expect.
- Updated existing tests to reflect the new error expectation.
#12294
- #12786
- escape `'<'` chars in attribute values to make the .targets file valid XML
- escape `'\''` chars nested within single-quoted values to make `msbuild` conditions valid
* Rename IUriHelper -> NavigationManager
- Remove IUriHelper interface
- Rename to NavigationManager
- Remove all traces of old naming
There's no functional or design change in this commit - just removing
all traces of the old name. The next few iterations will try to improve
the design.
* Minor API tweaks to NavigationManager
Making Initialize protected causes problems because right now the
server-side code needs to deal with one of two different
implementations, hence an exchange type is used. I followed the same
pattern that was used for auth for symmetry but I have some *cool*
thoughts.
- We can remove this when we remove stateful prerendering
- I have another idea to banish this pattern to the land of wind and
ghosts
If this ends up sticking around longer than a week in the code, lets
discuss other ideas and try to improve the pattern.
* Use hub method for server-side navigation
* Get rid of async local
* Add hub method test
* Misc bikeshedding
* Update src/Components/Server/src/Circuits/DefaultCircuitFactory.cs
Co-Authored-By: campersau <buchholz.bastian@googlemail.com>
* PR feedback
Fixes: #5496Fixes: #10448
This change adds a *utility* base class that encourages you to do the
right thing when you need to interact with a disposable scoped or
transient service.
This solution ties the lifetime of a DI scope and a service to a
component instance. Note that this is not recursive - we expect users to
pass services like this around (or as cascading values) if the design
dictates it.
Fixes: #12245Fixes: #12630
This change removes stateful pre-rendering from Server-Side Blazor. This
means that when you render a component during the initial HTTP request,
we we will no longer preserve the component instances and their
parameters. While this feature was useful, it cause serious scalability
concerns.
This means that it will now be required to register "entry-point"
components in startup similar to client-side Blazor.
* Immediately releases the circuit when the client disconnects gracefully.
* This functionality is limited to websockets.
* We are able to release the circuit in the following situations:
* The user closes the browser.
* The user navigates away.
* The user reloads the page.
* Insert seed localization for templates.
* Updated loc strings for Worker for some langs
* Update en string.json for Blazor project template
* Refresh strings for initial seeding
Fixes: #12548
Renaming properties to drop 'Content' as a suffix. We haven't been
consistent in using this, and we're removing it instead of adding it
elsewhere.
Fixes: #12550
Removes UIEventArgs in favor of EventArgs as the base class.
Moving Type into all of our event args types - this is important because
many of the events types are used for multiple events.
The only think about this that isn't perfect is that we have keep
special casing change because of how binding works. I renamed the type
to drop the `UI` prefix. It's not possible to define a subclass in the
Web project because of the way covariance works (or doesn't work) in
.NET.
Fixes: #12631
These mappings were missing and adding them restores the correct
behaviour. Mixing up the usage of `@bind` vs `@bind-value` so we have
more coverage of this.
* Remove generated Web.JS javascript files files
* Build NodeJS project referenced by managed projects by default
* Build Web.JS before other CI jobs
- We can't build Web.JS on Linux Musl for example
* Make BuildAll not override explicit BuildJava/NodeJS/Native/Managed settings
* Capture CodeCheck logs for debugging
* Skip NodeJS projects when generation ref assemblies
* Do not build dependent projects if NodeJS is not built
* Make build fail immediately if BuildNodeJS is true but NodeJS is not installed
* Do not build nodejs in installer builds
* Update HubProtocol.md
Updated the code sample in the protocol doc to reflect the actual programming API
* Update src/SignalR/docs/specs/HubProtocol.md
Co-Authored-By: Brennan <brecon@microsoft.com>
* fix#12516 by cleaning up error page
* add a Diagnostics.slnf because I was there
* missed the IIS update
* update WebHost's error page
* Fix slnf path
* Moves Identity UI to use Static Web Assets
* Removes the static files as embedded content.
* Stops plugging the static assets through the embedded file provider.
* Selects the UI framework at build time instead of runtime.
- In the case that other middleware change the path of an `HttpContext` and cause middleware to re-invoke we used to short-circuit on second time through the middleware pipeline, now we allow routing to occur.
- Added unit tests to validate the clearing of state.
#11233
[Blazor] [Fixes#11847] Renderer.DispatchEventAsync throws null
reference exception if event handler throws synchronously
* Returns after handling the exception.
* Adds a unit test and an E2E test to validate expected behavior.
* Add converters for ProblemDetails and ValidationProblemDetails
ProblemDetails & ValidationProblemDetails require IgnoreNullValues to be
applied on the types. We'll use a converter to workaround the absence of this
feature
Fixes https://github.com/aspnet/AspNetCore/issues/11522
* E2E test to show current behavior
* Actually support base-relative, root-relative, and absolute redirections during prerendering
* Fix MVC functional test
- We made a change to dispatch connection execution but that also ended up dispatching the tracking of those connections in the connection manager. While it's not a huge deal most of the time it can affect graceful shutdown as there can be queued connections that are delayed in the thread pool queue which are untracked. This change makes it so we track the KestrelConnection before dispatching.
- This change goes from pooling just the HttpContext to pooling the entire TContext. In the past this was a huge struct that got copied around and now it can be a class. Servers can provide the storage for the TContext via a new `IHostContextContainer<TContext>` interface.
- Removed IDefaultHttpContextContainer since it's been superseded by IHostContextContainer
- Move DefaultHttpContextFactory to Hosting to take advantage of internal methods
- Also handle a null FeatureCollection and null HttpContext and throw a better exception
We used to be inconsistent between what we'd do when formatting a value
based on whether or not you specified a format.
This change brings us back into consistency.
For a `default` DateTime/DateTimeOffset we will just call ToString on
it. For a `default` nullable of these types we will return the empty
string.
While it's definitly intended for `@bind` to have culture-sensitive
output for most cases, we want the tests to behave consistently for all
developers.
So this is an attempt to use a fixed culture for all of our testing.
- #12363
- correct a few VS issues
- void silent failures
- improve documentation
- support the `clean` target
- stop using experimentatal package version
* Allows the server to accept acks with a higher sequence number than the first queued pending render and caches up to it.
* Makes the client send acks for previous render batches.
* Makes the client repeat acks for errored render batches if it keeps receiving new render batches.
* Client awaits sending acks to ensure that they get send in order.
Improvments to names
- Using EventData suffix
- More clarity for events assocated with filters
Fixes: #12263
We have to report the BeforeActionMethod using its old signature because
it's used by Intellitrace. I added a new pair of events with a better
name to use with strong types since there's no practical way to update
the old ones.
* Make E2E prerendering test use static prerendering (we no longer need coverage for stateful prerendering)
* Use authentication state during static prerendering. This replicates issue #11799 in the E2E test
* Initialize the authentication state provider during static prerendering
* Update ref assembly
* Update unit test
* Some initial tidying on Boot.Server.ts, though can't make much difference until stateful prerendering is removed
* In Web.JS, rename ILogger to Logger to match TypeScript conventions
* Move reconnection options into BlazorOptions
* In Web.JS, eliminate collection of CircuitHandlers and just have one ReconnectionHandler
* Expose Blazor.defaultReconnectionHandler
* Update binaries
* [Blazor][Fixes#12054] ComponentHub reliability improvements.
* Validates StartCircuit is called once per circuit.
* NOOPs when other hub methods are called before start circuit and
returns an error to the client.