Url is case sensitive for actions

We use simple form authentication on our website.

</authentication> <forms name=".CXqJkTcZWBHJ" cookieless="UseDeviceProfile" domain=".mydomain.com" slidingExpiration="true" protection="All"> <credentials passwordFormat="SHA1" /> </forms> </authentication> 

Now I have an MVC action that can be called by an external program. For this action, I do not want to require authentication. What works when we call it: http: dev.mydomain.com/AgencyService/GetAgent/0001800 But redirect to the login page if the "AgencyService" part in the above URL is entered in any other case, for example: http: dev.mydomain.com/agencyservice/GetAgent/0001800

Any ideas why?

I excluded Routes because this method also works: http: dev.mydomain.com/AgencyService/GetAgent? agencyid = 0001800 And this method also does not work: http: dev.mydomain.com/agencyservice/GetAgent? Agencyid = 0001800

NOTE. I have moved my domain name above using "mydomain" to hide my domain for this message.

+4
source share
1 answer

In our AuthorizeRequest sub-item, we had a white list that we compared, but not with StringComparison.OrdinalIgnoreCase. As soon as I added this, he fixed the problem.

0
source

Source: https://habr.com/ru/post/1483221/


All Articles