dsuryd / dotNetify

Simple, lightweight, yet powerful way to build real-time web apps.
https://dotnetify.net
Other
1.17k stars 164 forks source link

page displayed with UnauthorizedAccessException #258

Closed roozbehid-ic closed 4 years ago

roozbehid-ic commented 4 years ago

I have a page with [Authorize] attribute. I am trying to figure out how to create a new custom authorization attribute but anyway, I only get this

 UnauthorizedAccessException: Attempted to perform an unauthorized operation

in browser console and page still shows up. is this normal behaviour?

dsuryd commented 4 years ago

Yes, that's expected if client is unauthorized. You should add an exception handler on connect to provide your redirect. See https://dotnetify.net/core/api/security.