-
Notifications
You must be signed in to change notification settings - Fork 65
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
SessionServer returns 404 from .net framework, help needed #569
Comments
It's probably because the virtual directories must be the same; see docs. |
Thanks so much for the reply Taylor. Is there more documentation on exactly how mirrored the virtual directories need to be and is there a tool or method to see if they do match? Any guidance on figuring this out, whether it be using an IDE debugger or looking for a particular error message in the log, would be greatly appreciated. If it's not possible to do so would you be able to answer any of the questions below? Apologies if some of these are very common knowledge, most of my experience is outside of the MS stack
|
@lkneat I was referring to IIS virtual directories: https://learn.microsoft.com/en-us/iis/get-started/planning-your-iis-architecture/understanding-sites-applications-and-virtual-directories-on-iis. That structure needs to be the same for both core and framework applications. ASP.NET Core doesn't care about the folders you have and won't affect anything. The reverse proxy will serve things from ASP.NET Core if the route exists (however you want to serve that) then proxy back to the ASP.NET Framework app |
@twsouthwick Thanks Taylor, to clarify our .net framework app is running on IIS in windows, however our .net core app that we are migrating to is running in an Alpine Linux image so there isn't a virtual directory if I understand correctly. Is the underlying assumption that the endpoints that we proxy to must match up in the virtual directory ( i.e. if I try to access resource1 at /endpoint1/resource1 and it's not in .net core then yarp should be proxying to a .net framework app where resource1 is in endpoint1 in the virtual directory) Or is the problem that there are other underlying architectural constraints that mean both .net core and .net framework must be running on IIS and use virtual directories? |
Yes, although I believe it's a bit more nuanced. If you're running on virtual directories on the framework app, it's tricky to make things work right (asp.net framework just doesn't have the right hooks to map things) if you're on Kestrel.
No - .net core can be hosted on any server you want (http.sys, iis, or kestrel) |
I'm hoping I've missed something simple here. Our .net framework app is using Unity DI which may be related to the issue. I see exceptions from Unity being unable to resolve constructors for things like
System.Web.Http.Dispatcher.IAssembliesResolver
but I believe these are red herrings as the services used internally in systemweb-adapters should fallback to default services when null is returned?The setup for sessionserver in Global.asax.cs Application_Start is as follows. I've tried with and without proxy support options and many different endpoints. We have a redirect set up for any unknown request not starting in
/api
so I haven't tested the default of/systemweb-adapters/session
I'm unable to access the /api/test, either from .net core or directly myself to see if the endpoint is live. Our .net core app is running in a docker container on 443 and the .net framework app is on IIS on windows on 32773. The .net framework app is hosted on a virtual directory subfolder so the site structure is a website called 'app' with a virtual directory called 'app' which is where the site lives.
I've tried setting the basepath in the container to '/app' as well as I saw something about mirroring virtual directories but with no success. I don't see any sort of relevant error in the logs for .net framework.
Any help on this would be greatly appreciated
The text was updated successfully, but these errors were encountered: