C# ASMX - How to read a Username
and Password from Web.config

  1. In your Web.config - add the <appSettings>  section


  1. In your code, add the following


string FaxCoreUsername = System.Configuration.ConfigurationManager.AppSettings["FaxCoreUsername"];
string FaxCorePassword = System.Configuration.ConfigurationManager.AppSettings["FaxCorePassword"];


  1. You can now use the FaxCoreUsername and FaxCorePassword to authenticate


long userID = faxSender.AuthenticateUser(FaxCoreUsername, FaxCorePassword);

Comments

Popular posts from this blog

VBA Randomize a 3x3 Filter for Convoluted Neural Network

Adding IQ Driver to LINQPad and connecting to ORACLE Database

Upload a file to a Web server in ASP.NET by using Visual C# .NET