I wrote a custom web app for a site collection. Url is something like
If someone types this url is fine, SharePoint asks for username and password.
If a user, which exists on Active Directory but does not have privileges to access the site, types the url gets this message but the code still runs.
Sorry, this list hasn't been shared with you
I debugged the code and it actually drops into the
page_load even the user has no access to the site.
Is this normal?
Note: This is a fresh installed machine and all windows, iis, sharepoint e.t.c configurations are default settings
Edit: This site is publishing site. Clients does not have to be on domain to access it. Think two user, user #1 has privileges as site admin to access site and edit, user #2 is regular domain user and has no privileges on site. #1 can access that page and run the code, #2 can also access page gets "Sorry, this list hasn't been shared with you" error but code still runs, as you see debug drops in page_load in the animation gif. Why that code even run for #2?