sp_configure 'Database Mail XPs', 1 reconfigure
Enable service broker in the MSDB database:
USE [master] GO ALTER DATABASE [MSDB] SET ENABLE_BROKER WITH NO_WAIT GO
sp_configure 'Database Mail XPs', 1 reconfigure
USE [master] GO ALTER DATABASE [MSDB] SET ENABLE_BROKER WITH NO_WAIT GO
-- To allow advanced options to be changed. EXEC sp_configure 'show advanced options', 1 GO -- To update the currently configured value for advanced options. RECONFIGURE GO -- To enable the feature. EXEC sp_configure 'xp_cmdshell', 1 GO -- To update the currently configured value for this feature. RECONFIGURE GO
<script type="text/javascript">
function preventBack() { window.history.forward(); }
setTimeout("preventBack()", 0);
window.onunload = function () { null };
</script>
public class MyPolicy : ICertificatePolicy
{
public bool CheckValidationResult(ServicePoint srvPoint,
X509Certificate certificate, WebRequest request,
int certificateProblem)
{
//Return True to force the certificate to be accepted.
return true;
}
}
protected void Page_Load(object sender, EventArgs e)
{
System.Net.ServicePointManager.CertificatePolicy = new MyPolicy();
// this is CertificatePolicy subclass
try
{
string url = "https://myirl.com";
HttpWebRequest req=(HttpWebRequest)WebRequest.Create(url);
req.KeepAlive = false;
req.AllowAutoRedirect = true;
req.ProtocolVersion = HttpVersion.Version10;
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
byte[] postBytes = Encoding.ASCII.GetBytes("username=sample_post_data");
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength = postBytes.Length;
Stream requestStream = req.GetRequestStream();
requestStream.Write(postBytes, 0, postBytes.Length);
requestStream.Close();
HttpWebResponse response = (HttpWebResponse)req.GetResponse();
Stream resStream = response.GetResponseStream();
var sr = new StreamReader(response.GetResponseStream());
string responseText = sr.ReadToEnd();
Response.Write(responseText);
}
catch (Exception ee)
{
}
} }
XmlDocument doc = new XmlDocument(); doc.LoadXml(responseText);Now you can use this xml result according to your requirement.
System.Drawing.Color c = System.Drawing.ColorTranslator.FromHtml("#F5F7F8");
String strHtmlColor = System.Drawing.ColorTranslator.ToHtml(c);