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

IntegratedMiddleware throws when Piranha is hosted in a Virtual Directory #1273

Closed
eloekset opened this issue Jul 19, 2020 · 3 comments · Fixed by #1274
Closed

IntegratedMiddleware throws when Piranha is hosted in a Virtual Directory #1273

eloekset opened this issue Jul 19, 2020 · 3 comments · Fixed by #1274
Assignees
Milestone

Comments

@eloekset
Copy link
Contributor

Like mentioned in #372, Piranha is not tested when hosted in a Virtual Directory.

There may be more unexpected behavior, but at least I've tracked down one bug, which I know how to fix.

image
image

It starts after adding support for empty url at line 53, so I can send a PR for that.

@eloekset
Copy link
Contributor Author

I just wanted to update this issue with the results after building my own fork and trying to use it in a site hosted as a Virtual Directory within an Azure App Service.

The site starts up, but routing doesn't work as it should. At least I've confirmed that the /seed route defined in the SetupController doesn't work.

The error message that I find in the event log is:

System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\home\site\<virtual-directory-name>\seed'.

I'm not sure what this indicates, but it seems like Azure App Service tries to navigate to a folder, while instead ASP.NET Core should use this as a route. I will link to a new issue and send another PR if I find the solution to this.

@tidyui
Copy link
Member

tidyui commented Jul 25, 2020

Hi! This error looks like you’ve published but haven’t included the seed folder in the published files! This is needed if you want to run the seed after deploy.

Best regards

@eloekset
Copy link
Contributor Author

Thanks! You're absolutely right. The manager works fine, so there's obviously no routing issues.

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

Successfully merging a pull request may close this issue.

2 participants