Skip to content

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

Closed
tn-5 opened this issue Mar 9, 2019 · 5 comments
Closed

IIS deployment to virtual folders broken with preview 3 #8368

tn-5 opened this issue Mar 9, 2019 · 5 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components investigate

Comments

@tn-5
Copy link

tn-5 commented Mar 9, 2019

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.

@tn-5 tn-5 changed the title IIS deployment in virtual folders broken with preview 3 IIS deployment to virtual folders broken with preview 3 Mar 9, 2019
@mkArtakMSFT mkArtakMSFT added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates area-blazor Includes: Blazor, Razor Components labels Mar 9, 2019
@mkArtakMSFT
Copy link
Member

Thanks for contacting us, @tn-5.
Please provide a sample project to reproduce the issue.
@javiercn, this may be related to the recent prerendering related routing changes. Please look into this when we'll get a repro available.

@tn-5
Copy link
Author

tn-5 commented Mar 9, 2019

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.

@tn-5
Copy link
Author

tn-5 commented Mar 10, 2019

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.

@tn-5 tn-5 closed this as completed Mar 10, 2019
@javiercn
Copy link
Member

@SteveSandersonMS any idea?

@tn-5
Copy link
Author

tn-5 commented Mar 11, 2019

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.

@mkArtakMSFT mkArtakMSFT removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels May 9, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components investigate
Projects
None yet
Development

No branches or pull requests

3 participants