Hi,
In the sql database for the login user sa, we have a password like ab<|xy"z So in the web.config file I used ab@lt|xy"z and it works fine when debugging in the visual studio. But after deployment of the .net web application, when tried to login from the application it started throwing error 'Login failed for user sa' . Also I tried RsaProtectedConfigurationProvider for encrypting the connection string , but gettiing the same error. Please suggest a way for getting this issue resolved
Tuhin PaulPosted Oct 14, 2024, 5:29 PM
This is the infamous "Login failed for user sa" error!
URL encode the password before placing it in the
web.configfileTuhin PaulPosted Oct 14, 2024, 5:28 PM
This is due to the password encoding/escaping differences between Visual Studio debugging and the deployed environment.
Instead of using
ab@lt|xy"z, try using the actual passwordab<|xy"zand let .NET handle the encoding.