C# ASMX - How to read a Username
and Password from Web.config
and Password from Web.config
- In your Web.config - add the <appSettings> section
- In your code, add the following
string FaxCoreUsername = System.Configuration.ConfigurationManager.AppSettings["FaxCoreUsername"];
string FaxCorePassword = System.Configuration.ConfigurationManager.AppSettings["FaxCorePassword"];
- You can now use the FaxCoreUsername and FaxCorePassword to authenticate
long userID = faxSender.AuthenticateUser(FaxCoreUsername, FaxCorePassword);
Comments
Post a Comment