haacked / feedback

Ask @haacked anything!
7 stars 1 forks source link

Ignoring Routes in Aspnet.core #166

Closed JohnChig closed 6 years ago

JohnChig commented 6 years ago

Greetings Phil, I have been looking at ways of ignoring routes ( and virtual paths) in aspnet.core MVC. I read an article that suggested creating a middleware, which I did. However the article stated to raise a response of 404, and this does not work for me.

I am using a single sign on, Shibboleth Authentication tool, which works well in the previous MVC versions. However, in apsnet.core, once I am authorized, a virtual path is being appended in the site's url, which physically does not exist

What is the best way, in your opinion, to ignore such routes, if any? Thanks again..... John

haacked commented 6 years ago

I really haven't spent much time with aspnet.core MVC to give you a good answer. I suggest posting this to Stack Overflow with a bit more detail. Why doesn't 404 work for you?

JohnChig commented 6 years ago

Hi Phil, Thanks for such a prompt response. The 404 is not what I am looking for. I am looking at the correct URl, meaning - I do not want this bad url to do anything, I want to go the base url, not with the appended virtual folder. Again, thank you so much. Regards John

-----Original Message----- From: Phil Haack [mailto:notifications@github.com] Sent: Wednesday, October 25, 2017 06:01 PM To: 'Haacked/feedback' Cc: 'JohnChig', 'Author' Subject: Re: [Haacked/feedback] Ignoring Routes in Aspnet.core (#166)

I really haven't spent much time with aspnet.core MVC to give you a good answer. I suggest posting this to Stack Overflow with a bit more detail. Why doesn't 404 work for you? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/Haacked/feedback","title":"Haacked/feedback","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/Haacked/feedback"}},"updates":{"snippets":[{"icon":"PERSON","message":"@Haacked in #166: I really haven't spent much time with aspnet.core MVC to give you a good answer. I suggest posting this to Stack Overflow with a bit more detail. Why doesn't 404 work for you?"}],"action":{"name":"View Issue","url":"https://github.com/Haacked/feedback/issues/166#issuecomment-339485464"}}}