I have a .NET web service that I want to be accessed over https rather than http. Problem is HOW !!
Solution:
Activate SSL on web server (IIS)
Follow steps 1 through 4 of this very useful blog by Eric Longman
Specify the file for which SSL is required
Through inetmgr, browse to the file (in my case the .asmx file). Right click -> Properties -> File Security -> Secure Communications -> Edit
Check Require SSL Channel (SSL)
And you should be done.
Related useful article:
CONSUMING WEBSERVICES OVER HTTPS (SSL)..........................
READ FULL ARTICLE
Module: CEmailManager
Calling function:
public static bool SendDummyEmail()
{
return SendEmail(CGlobalParams.AdminEmail, "dummy", "Hi");
}
Worker function:
private static bool SendEmail(string p_strTo, string p_strSubject, string p_strBody)
{
try
{
MailMessage objMessage = new MailMessage();
string[] lstRecipient = p_strTo.Split(',');
foreach (string strTo in lstRecipient)
{
objMessage.To.Add(strTo);
}
objMessage.From = new MailAddress(CGlobalParams.SMTPUser, CGlobalParams.EmailSenderDisplay);
objMessage.Subject = p_strSubject;
objMessage.Body = p_s..........................
READ FULL ARTICLE