-
Notifications
You must be signed in to change notification settings - Fork 10.3k
IIS deployment to virtual folders broken with preview 3 #8368
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
Comments
This is reproducible with the standard razor components project as generated from the template. Simply publish it to iis using a virtual directory. It has the same behaviour. |
After extensive testing and looking at other issues I've managed to determine that the root cause is that this IIS Server does not have websockets support. It seems to be the same issue as #8384. it is fine if websockets is required, but it probably requires at least a documentation / release note update to indicate the dependency, especially since it worked fine with previous preview versions without websockets enabled on IIS. |
@SteveSandersonMS any idea? |
I'll do more testing to try and reproduce the exact steps. Initially I thought an IIS deployment to the root folder (without a subfolder) worked ok. However, it was just the prerendering that returned the correct "looking" page. Nothing worked subsequently (due to websockets not working). It seems related to the difference between configuring the subapplication in IIS prior to deployment vs. deploying directly from VS and letting VS create the subapplication. I'll do more testing and provide feedback. I've closed this for now but I think it may at the very least require some documentation updates to clarify the requirements in more detail. As stated initially, it is not so much as this not working (to be expected in a preview product) it is more the fact that it worked in preview 2 and the behaviour changed in preview 3 that caused the issue. |
In RC preview 2 publishing to IIS with a virtual folders worked without any issues (provided one manually changed the base href in index.html).
In preview 3 this does not work any more. The index.html is generated from index.cshtml, the base href is set correctly (except that it has a slash prefix which did not work when used like that in preview 2?).
However, when loading the website a blank screen is shown.
When the IIS web config is modified to set stdLogOutEnable="true", the log file shows that the router cannot find the path.
Example with virtual path /t0:
System.InvalidOperationException: 'Router' cannot find any component with a route for '/t0', and no fallback is defined.
...
Failed to invoke hub method 'StartCircuit'.
System.InvalidOperationException: ComponentHub doesn't have an associated endpoint. Use 'app.UseRouting(routes => routes.MapComponentHub("app"))' to register your hub.
I've tested on the same infrastructure it works fine when publishing to the root of a website.
The text was updated successfully, but these errors were encountered: