When running a web in visual studio, the following line returns true.
if (Membership.ValidateUser(Login1.UserName, Login1.Password))
However, the moment I access the same code through a web, it returns false.
Same database, same computer, same web folder, the only difference is that when I’m running through debug in visual studio, it works and when I’m trying to access it through a web, it fails.
Thanks
When you are in debug mode you are in the security context of the user you are logged in as.
When you access over the web you may be in the context of the same user or the IIS anonymous user or the identity of the application pool depending on your configuration.
If you configure IIS and web.config to use windows authentication and impersonate = true, you should get the same result.