<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1762972627483134319</id><updated>2025-07-10T01:34:14.745+03:00</updated><category term="C#"/><category term="ASP.net"/><category term="Database"/><category term="Javascript"/><category term="Entity Framework"/><category term="JQuery"/><category term="Oracle"/><category term="PLSQL"/><category term="SQL"/><category term="Windows Server"/><category term="Ajax"/><category term="Css"/><category term="Network"/><category term="Windows"/><title type='text'>Refat Eid</title><subtitle type='html'>Object Oriented Programming &#xa;&lt;br&gt; C# and ASP.NET</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://refateid.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-6115885221898015654</id><published>2018-11-24T20:48:00.002+03:00</published><updated>2018-11-24T20:48:49.686+03:00</updated><title type='text'>filter attribute that checks whether current connection is secured</title><content type='html'>using APS.net Core to mark all website pages working with https protocol&lt;br /&gt;
we will do this using IAuthorizationFilter.&lt;br /&gt;
and here is an example how we can do it.
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /// Represents a filter attribute that checks whether current connection is secured and properly redirect if necessary&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public class HttpsRequirementAttribute : TypeFilterAttribute&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #region Fields&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private readonly SslRequirement _sslRequirement;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #endregion&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #region Ctor&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// Create instance of the filter attribute&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;param name=&quot;sslRequirement&quot;&amp;gt;Whether the page should be secured&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public HttpsRequirementAttribute(SslRequirement sslRequirement) : base(typeof(HttpsRequirementFilter))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this._sslRequirement = sslRequirement;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Arguments = new object[] { sslRequirement };&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #endregion&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #region Properties&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// Gets a value indicating whether the page should be secured&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public SslRequirement SslRequirement =&amp;gt; _sslRequirement;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #endregion&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #region Nested filter&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// Represents a filter confirming that checks whether current connection is secured and properly redirect if necessary&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private class HttpsRequirementFilter : IAuthorizationFilter&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #region Fields&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private SslRequirement _sslRequirement;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private readonly WebsiteSettings _websiteSettings;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private readonly IWebHelper _webHelper;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private readonly SecuritySettings _securitySettings;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #endregion&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #region Ctor&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public HttpsRequirementFilter(SslRequirement sslRequirement,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WebsiteSettings websiteSettings,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IWebHelper webHelper,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SecuritySettings securitySettings)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this._sslRequirement = sslRequirement;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this._websiteSettings = websiteSettings;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this._webHelper = webHelper;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this._securitySettings = securitySettings;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #endregion&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #region Utilities&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// Check whether current connection is secured and properly redirect if necessary&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;param name=&quot;filterContext&quot;&amp;gt;Authorization filter context&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;param name=&quot;useSsl&quot;&amp;gt;Whether the page should be secured&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected void RedirectRequest(AuthorizationFilterContext filterContext, bool useSsl)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //whether current connection is secured&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var currentConnectionSecured = _webHelper.IsCurrentConnectionSecured();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //page should be secured, so redirect (permanent) to HTTPS version of page&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (useSsl &amp;amp;&amp;amp; !currentConnectionSecured &amp;amp;&amp;amp; _websiteSettings.SslEnabled)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filterContext.Result = new RedirectResult(_webHelper.GetThisPageUrl(true, true), true);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //page shouldn&#39;t be secured, so redirect (permanent) to HTTP version of page&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!useSsl &amp;amp;&amp;amp; currentConnectionSecured)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filterContext.Result = new RedirectResult(_webHelper.GetThisPageUrl(true, false), true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #endregion&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #region Methods&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// Called early in the filter pipeline to confirm request is authorized&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;param name=&quot;filterContext&quot;&amp;gt;Authorization filter context&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void OnAuthorization(AuthorizationFilterContext filterContext)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (filterContext == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new ArgumentNullException(nameof(filterContext));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (filterContext.HttpContext.Request == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //only in GET requests, otherwise the browser might not propagate the verb and request body correctly&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!filterContext.HttpContext.Request.Method.Equals(WebRequestMethods.Http.Get, StringComparison.InvariantCultureIgnoreCase))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!DataSettingsManager.DatabaseIsInstalled)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //check whether this filter has been overridden for the Action&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var actionFilter = filterContext.ActionDescriptor.FilterDescriptors&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(filterDescriptor =&amp;gt; filterDescriptor.Scope == FilterScope.Action)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Select(filterDescriptor =&amp;gt; filterDescriptor.Filter).OfType&amp;lt;HttpsRequirementAttribute&amp;gt;().FirstOrDefault();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var sslRequirement = actionFilter?.SslRequirement ?? _sslRequirement;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //whether all pages will be forced to use SSL no matter of the passed value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (_securitySettings.ForceSslForAllPages)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sslRequirement = SslRequirement.Yes;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (sslRequirement)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SslRequirement.Yes:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //redirect to HTTPS page&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RedirectRequest(filterContext, true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SslRequirement.No:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //redirect to HTTP page&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RedirectRequest(filterContext, false);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case SslRequirement.NoMatter:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //do nothing&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new PasException(&quot;Not supported SslRequirement parameter&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #endregion&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #endregion&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
this will do it. 


</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/6115885221898015654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/6115885221898015654'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/11/filter-attribute-that-checks-whether.html' title='filter attribute that checks whether current connection is secured'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-2433719005146740743</id><published>2018-11-24T04:09:00.000+03:00</published><updated>2018-11-24T04:09:17.265+03:00</updated><title type='text'>Create, bind and register as service the specified configuration parameters</title><content type='html'>supposed you have a json file with a specific parameter and you want to fill a class with the specified properties.&lt;br /&gt;
&lt;br /&gt;
and then register this object to the asp.net core service&amp;nbsp; collection&lt;br /&gt;
here is an example how to do it.&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/// Create, bind and register as service the specified configuration parameters&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;typeparam name=&quot;TConfig&quot;&amp;gt;Configuration parameters&amp;lt;/typeparam&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;param name=&quot;services&quot;&amp;gt;Collection of service descriptors&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;param name=&quot;configuration&quot;&amp;gt;Set of key/value application configuration properties&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;returns&amp;gt;Instance of configuration parameters&amp;lt;/returns&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static TConfig ConfigureStartupConfig&amp;lt;TConfig&amp;gt;(this IServiceCollection services, IConfiguration configuration) where TConfig : class, new()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (services == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new ArgumentNullException(nameof(services));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (configuration == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new ArgumentNullException(nameof(configuration));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //create instance of config&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TConfig config = new TConfig();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //bind it to the appropriate section of configuration&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; configuration.Bind(config);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //and register it as a service&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; services.AddSingleton(config);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return config;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;

this will do it.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/2433719005146740743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/2433719005146740743'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/11/create-bind-and-register-as-service.html' title='Create, bind and register as service the specified configuration parameters'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-2012741557210653871</id><published>2018-11-18T19:03:00.001+03:00</published><updated>2018-11-18T19:03:29.574+03:00</updated><title type='text'>Run exe file from console application </title><content type='html'>To run a .exe file using console application you need to do the following.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
Process proc = new Process();&lt;br /&gt;
proc.StartInfo.WorkingDirectory = _filePath;&lt;br /&gt;
proc.StartInfo.FileName = _fileName;&lt;br /&gt;
proc.StartInfo.CreateNoWindow = false;&lt;br /&gt;
proc.Start();&lt;br /&gt;
proc.WaitForExit();&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/2012741557210653871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/2012741557210653871'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/11/run-exe-file-from-console-application.html' title='Run exe file from console application '/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-4370594151530009494</id><published>2018-11-14T20:00:00.001+03:00</published><updated>2018-11-14T20:00:20.155+03:00</updated><title type='text'>How to Authenticate from Azure </title><content type='html'>First you need to create a section in appsettings.json file
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
&amp;nbsp; &quot;AzureAd&quot;: {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;Instance&quot;: &quot;https://login.microsoftonline.com/&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;Domain&quot;: &quot;Your Domain&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;TenantId&quot;: &quot;Your Tenant Id&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;ClientId&quot;: &quot;Your Client Id&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;CallbackPath&quot;: &quot;/signin-oidc&quot;&lt;br /&gt;
&amp;nbsp; }&lt;/div&gt;
then I usually use extension method for the service collection
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
public static void AddApplicationAuthentication(this IServiceCollection services)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IConfiguration Configuration = services.BuildServiceProvider().GetRequiredService&amp;lt;IConfiguration&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; services.Configure&amp;lt;CookiePolicyOptions&amp;gt;(options =&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // This lambda determines whether user consent for non-essential cookies is needed for a given request.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; options.CheckConsentNeeded = context =&amp;gt; true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; options.MinimumSameSitePolicy = SameSiteMode.None;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; services.AddAuthentication(AzureADDefaults.AuthenticationScheme)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .AddAzureAD(options =&amp;gt; Configuration.Bind(&quot;AzureAd&quot;, options));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
this should do the trick</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/4370594151530009494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/4370594151530009494'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/11/how-to-authenticate-from-azure.html' title='How to Authenticate from Azure '/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-6320885389567324946</id><published>2018-11-14T19:29:00.001+03:00</published><updated>2018-11-14T19:29:30.549+03:00</updated><title type='text'>How to get months names based on Culture Info</title><content type='html'>To get the month names using a given&amp;nbsp;Culture Info in a simple select list&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
var monthOfBirthValues = new List&lt;selectlistitem&gt;();
&lt;br /&gt;
 monthOfBirthValues.Add(new SelectListItem&amp;nbsp;&lt;/selectlistitem&gt;&lt;br /&gt;
&lt;selectlistitem&gt;{&amp;nbsp;&lt;/selectlistitem&gt;&lt;br /&gt;
&lt;selectlistitem&gt;&amp;nbsp; &amp;nbsp; Text = CultureInfo.GetCultureInfo(&quot;ar-KW&quot;).DateTimeFormat.GetMonthName(i),&amp;nbsp;&lt;/selectlistitem&gt;&lt;br /&gt;
&lt;selectlistitem&gt;&amp;nbsp; &amp;nbsp;Value = i.ToString(CultureInfo.InvariantCulture)&amp;nbsp;&lt;/selectlistitem&gt;&lt;br /&gt;
&lt;selectlistitem&gt;});
&lt;/selectlistitem&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/6320885389567324946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/6320885389567324946'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/11/how-to-get-months-names-based-on.html' title='How to get months names based on Culture Info'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-7816103722071978542</id><published>2018-10-27T23:59:00.002+03:00</published><updated>2018-10-27T23:59:55.290+03:00</updated><title type='text'>How to make html pre tag responsive</title><content type='html'>If you have a textbox and you want your user to enter multi-text.&lt;br /&gt;
it will work fine if you changed your textbox from input to textarea&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
but there is a small issue how can i present it on desktop and mobile devices.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
I&#39;m using MVC in my presentation layer.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
@Html.Raw(&quot;&amp;lt;div class=&#39;divpre&#39; style=&#39;margin-right: -20px;&#39;&amp;gt;&amp;lt;pre class=&#39;pre&#39;&amp;gt;&quot; + Html.Encode(@Model.Desc) + &quot;&amp;lt;/pre&amp;gt;&amp;lt;div&amp;gt;&quot;)&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
now the css&lt;br /&gt;
1- desktop
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
.pre&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; word-break: break-word;&lt;br /&gt;
&amp;nbsp; white-space: pre-wrap;&lt;br /&gt;
&amp;nbsp; text-align: justify;&lt;br /&gt;
&amp;nbsp; overflow-x: hidden;&lt;br /&gt;
&amp;nbsp;}&lt;/div&gt;
2- mobile
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
@media only screen and (max-width: 600px)&lt;br /&gt;
.pre&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; word-break: break-word!important;&lt;br /&gt;
&amp;nbsp; white-space: pre-line;&lt;br /&gt;
&amp;nbsp; overflow: hidden;&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/7816103722071978542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/7816103722071978542'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/10/how-to-make-html-pre-tag-responsive.html' title='How to make html pre tag responsive'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-846355523852435631</id><published>2018-10-23T07:26:00.000+03:00</published><updated>2018-10-23T07:26:15.843+03:00</updated><title type='text'>Visual Studio Cannot access a disposed object. Object name: &#39;WorkspaceContext&#39; TFS</title><content type='html'>problem: I have a simple project hosted on our company TFS. our security policy required the development team change there passwords every 1 month.&lt;br /&gt;
after changing my password, I recived this error while check In TFS
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
Cannot access a disposed object. Object name: &#39;WorkspaceContext&#39;
&lt;/div&gt;
solution:&lt;br /&gt;
You need to visit this location
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
%LocalAppData%\Microsoft\Team Foundation\7\Cache
&lt;/div&gt;
inside this location delete the content of this folder
and try to connect again to visual studio. 
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/846355523852435631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/846355523852435631'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/10/visual-studio-cannot-access-disposed.html' title='Visual Studio Cannot access a disposed object. Object name: &#39;WorkspaceContext&#39; TFS'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-5291633457427375397</id><published>2018-10-22T00:46:00.000+03:00</published><updated>2018-10-22T00:46:06.772+03:00</updated><title type='text'>Stop Visual Studio from debugging method or class </title><content type='html'>Sometimes you need to step through code, So you use debugging in Visual Studio.&lt;br /&gt;
But some other times you visit the same method over and over again for 100 times&lt;br /&gt;
&lt;br /&gt;
if and only if the code is tested.&lt;br /&gt;
then you can do decorate your method with this attribute&amp;nbsp; [DebuggerStepThrough()] and your debugger will never hit this method again&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/5291633457427375397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/5291633457427375397'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/10/stop-visual-studio-from-debugging.html' title='Stop Visual Studio from debugging method or class '/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-8605902428208195475</id><published>2018-10-21T08:11:00.000+03:00</published><updated>2018-10-21T08:11:13.497+03:00</updated><title type='text'>List all files in a dirctory and subdirectory contains substring </title><content type='html'>Open cmd&lt;br /&gt;
go to main directory&lt;br /&gt;
&lt;br /&gt;
type the following command.&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
dir /b /s &quot;PAS*.cs&quot;&lt;/div&gt;
this will list all files begin with PAS (uper or lower) case and any set of characters and ends with .cs </content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/8605902428208195475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/8605902428208195475'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/10/list-all-files-in-dirctory-and.html' title='List all files in a dirctory and subdirectory contains substring '/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-844671613740607664</id><published>2018-10-19T20:33:00.002+03:00</published><updated>2018-10-19T20:33:36.642+03:00</updated><title type='text'>visual studio 2017 search and replace regular expressions group</title><content type='html'>&lt;span id=&quot;goog_1829461349&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://www.blogger.com/&quot;&gt;&lt;/a&gt;&lt;span id=&quot;goog_1829461350&quot;&gt;&lt;/span&gt;Sometimes you write some codes and then you find your self want to change a suffix or prefix in your codes or classes names or namespaces&lt;br /&gt;
&lt;br /&gt;
I will show with an example how to do it.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;let us supposed we need to change the following &quot;Manager&quot; sub-string into the class name&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
public interface IParticipantImageManager&lt;/div&gt;
in visual studio click on ctrl + shift + H 

use any website to test your regular expression, personally I use&amp;nbsp;&lt;a href=&quot;https://regex101.com/&quot; target=&quot;_blank&quot;&gt;regex101&lt;/a&gt;&amp;nbsp;to write the right expression and the replace it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
to find the string 
&lt;div class=&quot;code&quot;&gt;
IParticipantImage(\w+) 
&lt;/div&gt; 
and to replace the sting 
&lt;div class=&quot;code&quot;&gt;
IParticipantImage$1
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/844671613740607664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/844671613740607664'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/10/visual-studio-2017-search-and-replace.html' title='visual studio 2017 search and replace regular expressions group'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-908036480463128935</id><published>2018-10-05T01:54:00.002+03:00</published><updated>2018-10-05T01:54:47.508+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="Entity Framework"/><title type='text'>Could not load file or assembly &#39;Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&#39; or one of its dependencies. The system cannot find the file specified.&#39;</title><content type='html'>I already posted another post today about solving&amp;nbsp;&lt;span style=&quot;color: lime;&quot;&gt;&lt;a href=&quot;https://refateid.blogspot.com/2018/10/visual-studio-stuck-at-preparing.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Visual Studio 2018 Stuck at &#39;preparing solution&#39;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
If you follow the same solution you will be able to build your solution.&lt;br /&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/908036480463128935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/908036480463128935'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/10/could-not-load-file-or-assembly.html' title='Could not load file or assembly &#39;Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&#39; or one of its dependencies. The system cannot find the file specified.&#39;'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-1516005245390997906</id><published>2018-10-05T01:30:00.001+03:00</published><updated>2018-10-05T01:56:32.821+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Visual Studio 2018 Stuck at &#39;preparing solution&#39; </title><content type='html'>&lt;a href=&quot;http://visualstudio.microsoft.com/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Visual Studio 2018&lt;/span&gt;&lt;/a&gt;&amp;nbsp; stuck after lunching specific solution. after spending sometime on the internet,&lt;br /&gt;
I found the problem and the fix.&lt;br /&gt;
&lt;br /&gt;
I used &lt;a href=&quot;https://visualstudio.microsoft.com/vs/community/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Community Edition&lt;/span&gt;&lt;/a&gt; for visual studio 2018.&lt;br /&gt;
&lt;br /&gt;
1- Close all running instances of Visual Studio 2017&lt;br /&gt;
2- Launch the Visual Studio 2017 Developer Command Prompt as Admin&lt;br /&gt;
3-&amp;nbsp;Type the following commands (replace Community with your edition, either Enterprise or Professional&amp;nbsp;, or adjust the path accordingly):&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
gacutil /i &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Build.Framework.dll&quot;&lt;br /&gt;
&lt;br /&gt;
gacutil /i &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Build.dll&quot;&lt;br /&gt;
&lt;br /&gt;
gacutil /i &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Build.Engine.dll&quot;&lt;br /&gt;
&lt;br /&gt;
gacutil /i &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Build.Conversion.Core.dll&quot;&lt;br /&gt;
&lt;br /&gt;
gacutil /i &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Build.Tasks.Core.dll&quot;&lt;br /&gt;
&lt;br /&gt;
gacutil /i &quot;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Build.Utilities.Core.dll&quot;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/1516005245390997906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/1516005245390997906'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/10/visual-studio-stuck-at-preparing.html' title='Visual Studio 2018 Stuck at &#39;preparing solution&#39; '/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-1166400536643211484</id><published>2018-09-30T23:13:00.001+03:00</published><updated>2018-10-01T16:29:29.601+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Entity Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="PLSQL"/><title type='text'>Entityframework Oracle.ManagedDataAccess.Client.OracleException: &#39;ORA-01950: no privileges on tablespace &#39;USERS&#39;&#39;</title><content type='html'>I used &lt;span style=&quot;color: lime;&quot;&gt;&lt;a href=&quot;http://www.entityframeworktutorial.net/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;EF&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/span&gt;to connect to &lt;a href=&quot;https://www.oracle.com/index.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Oracle&lt;/span&gt;&lt;/a&gt; database and&amp;nbsp; I received the following error&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
Oracle.ManagedDataAccess.Client.OracleException: &#39;ORA-01950: no privileges on tablespace &#39;USERS&#39;&#39;
&lt;/div&gt;
In my case the connection string has invalid value.&lt;br /&gt;
the user password was typed wrong.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/1166400536643211484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/1166400536643211484'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/entityframework-oraclemanageddataaccess_30.html' title='Entityframework Oracle.ManagedDataAccess.Client.OracleException: &#39;ORA-01950: no privileges on tablespace &#39;USERS&#39;&#39;'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-166044524928476197</id><published>2018-09-29T21:48:00.001+03:00</published><updated>2018-09-29T22:24:07.421+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="Entity Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>EntityFramework Oracle.ManagedDataAccess.Client.OracleException: &#39;ORA-01918: user &#39;dbo&#39; does not exist&#39;</title><content type='html'>While trying to use code first approach to connect to &lt;a href=&quot;https://www.oracle.com/index.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Oracle&lt;/span&gt;&lt;/a&gt; database using &lt;a href=&quot;https://www.asp.net/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;ASP NET&lt;/span&gt;&lt;/a&gt; &lt;a href=&quot;https://www.tutorialspoint.com/csharp/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;C#&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
I received the following exception&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
Oracle.ManagedDataAccess.Client.OracleException: &#39;ORA-01918: user &#39;dbo&#39; does not exist&#39;
&lt;/div&gt;
My current User Is IT_USER&lt;br /&gt;
The Reason for the error is that Oracle tried to create my tables which are in my first migration into dbo schema as &lt;a href=&quot;https://azure.microsoft.com/en-us/services/sql-database/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;SQL Server&lt;/span&gt;&lt;/a&gt; do, but in Oracle it is a User.&lt;br /&gt;
&lt;br /&gt;
So you need to till &lt;a href=&quot;https://docs.microsoft.com/en-us/ef/ef6/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Entity Framework&lt;/span&gt;&lt;/a&gt; where is my Table Should be&lt;br /&gt;
You have two solutions&lt;br /&gt;
&lt;br /&gt;
First is to use &lt;b&gt;DbModelBuilder.HasDefaultSchema&lt;/b&gt;&lt;br /&gt;
This will make all of your tables in this schema.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
protected override void OnModelCreating(DbModelBuilder modelBuilder)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;modelBuilder.HasDefaultSchema(&quot;IT_USER&quot;);&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; base.OnModelCreating(modelBuilder);&lt;br /&gt;
}&lt;/div&gt;
&lt;br /&gt;
Second is to use&amp;nbsp;&lt;b&gt;System.ComponentModel.DataAnnotations.Schema.Table&lt;/b&gt;
&lt;br /&gt;
This will give you the ability to change the schema when ever you want&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;b&gt;[Table(&quot;STD_FA_VALIDATION&quot;, Schema =&quot;IT_USER&quot;)]&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
public class STD_FA_VALIDATION&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; [Key]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; [DatabaseGenerated(DatabaseGeneratedOption.None)]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public int SGBSTDN_PIDM { get; set; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public string NAT_CHANGE_IND { get; set; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public string WORK_IND { get; set; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public DateTime NAT_PROC_DATE { get; set; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public DateTime WORK_PROC_DATE { get; set; }&lt;br /&gt;
&amp;nbsp;}&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/166044524928476197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/166044524928476197'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/entityframework-oraclemanageddataaccess.html' title='EntityFramework Oracle.ManagedDataAccess.Client.OracleException: &#39;ORA-01918: user &#39;dbo&#39; does not exist&#39;'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-7383113920811055861</id><published>2018-09-27T23:00:00.001+03:00</published><updated>2018-09-27T23:00:23.427+03:00</updated><title type='text'>Remote Desktop Error terminal server has exceeded the maximum number of allowed connections</title><content type='html'>&lt;a href=&quot;http://refateid.blogspot.com/2018/09/connect-to-cisco-vpn-client-using-patch.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;I already posted a script&lt;/span&gt;&lt;/a&gt; to connect throw &lt;a href=&quot;https://www.cisco.com/c/en/us/support/web/obsolete/security-vpn-client.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Cisco VPN Client&lt;/span&gt;&lt;/a&gt; using patch file.&lt;br /&gt;
and the patch connected direct to a remote desktop connection.&lt;br /&gt;
&lt;br /&gt;
some times the connection failed with this error.&lt;br /&gt;
&quot;Remote Desktop Error terminal server has exceeded the maximum number of allowed connections&quot;&lt;br /&gt;
you need to change 
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
mstsc /v:192.168.80.145
&lt;/div&gt;
to
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
mstsc /admin /v:192.168.80.145
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/7383113920811055861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/7383113920811055861'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/remote-desktop-error-terminal-server.html' title='Remote Desktop Error terminal server has exceeded the maximum number of allowed connections'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-4355564905210289945</id><published>2018-09-27T00:20:00.003+03:00</published><updated>2018-09-27T01:15:07.296+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><title type='text'>Remove duplicates from javascript array</title><content type='html'>To remove duplicates from JavaScript array.&lt;br /&gt;
you can use the following javaScript function, you need&amp;nbsp;&lt;a href=&quot;https://jquery.com/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;JQuery&lt;/span&gt;&lt;/a&gt; to be able to run this function&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
distinct: function (anArray) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var result = [];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $.each(anArray, function (i, v) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ($.inArray(v, result) === -1) result.push(v);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/4355564905210289945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/4355564905210289945'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/remove-duplicates-from-javascript-array.html' title='Remove duplicates from javascript array'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-2877048421552662221</id><published>2018-09-27T00:09:00.001+03:00</published><updated>2018-09-27T00:23:21.445+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Remove duplicate options from HTML Select</title><content type='html'>Some times you get the options from database by ajax duplicated.&lt;br /&gt;
The following JavaScript function should do the trick.&lt;br /&gt;
You need&amp;nbsp;&lt;a href=&quot;https://jquery.com/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;JQuery&lt;/span&gt;&lt;/a&gt; to make it work.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
dropdown_remove_repeated: function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $selects = $(&#39;select&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $selects.each(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $select = $(this);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $options = $select.find(&#39;option&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $options.each(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $option = $(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $option.siblings().each(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $this = $(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ($this.text().trim() === $option.text().trim()) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this.remove();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/2877048421552662221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/2877048421552662221'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/remove-duplicate-options-from-html.html' title='Remove duplicate options from HTML Select'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-6446460516298877266</id><published>2018-09-26T01:20:00.001+03:00</published><updated>2018-09-27T01:18:23.844+03:00</updated><title type='text'>How to call webservice from PLSQL</title><content type='html'>The object of this article is to show how to call &lt;a href=&quot;https://www.w3schools.com/xml/xml_services.asp&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;webservice&lt;/span&gt;&lt;/a&gt; from&amp;nbsp;&lt;a href=&quot;https://www.tutorialspoint.com/plsql/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;PLSQL&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
and thanks for &lt;a href=&quot;https://www.oracle.com/index.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Oracle&lt;/span&gt;&lt;/a&gt; to provide such a thing&lt;br /&gt;
&lt;br /&gt;
I&#39;m using a local webservice&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
http://localhost/PAAET.asmx
&lt;/div&gt;
I have a collection of functions inside this webservice. one of them is &lt;b&gt;GetStudentInfo&lt;/b&gt;&lt;br /&gt;
when we request the service function on the web browser&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
http://localhost/PAAET.asmx?op=GetStudentInfo
&lt;/div&gt;
we will use the service response and request over SOAP 1.2&lt;br /&gt;
Request:&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
&amp;lt;soap12:envelope xmlns:soap12=&quot;http://www.w3.org/2003/05/soap-envelope&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;soap12:body&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;getstudentinfo xmlns=&quot;http://127.0.0.1:8080/&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;wvcivno&amp;gt;string&amp;lt;/wvcivno&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/getstudentinfo&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/soap12:body&amp;gt;&lt;br /&gt;
&amp;lt;/soap12:envelope&amp;gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
Response :&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
&amp;lt;soap12:envelope xmlns:soap12=&quot;http://www.w3.org/2003/05/soap-envelope&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;soap12:body&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;GetStudentInfoResponse xmlns=&quot;http://127.0.0.1:8080/&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;GetStudentInfoResult&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;pv_arab_name_1&amp;gt;string&amp;lt;/pv_arab_name_1&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/getstudentinforesult&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/getstudentinforesponse&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/soap12:body&amp;gt;&lt;br /&gt;
&amp;lt;/soap12:envelope&amp;gt;&lt;/div&gt;
Now let&#39;s take about what you will do inside the PLSQL
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;login to DB as sysdba this is a must.&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/* Formatted on 9/26/2018 1:26:58 AM (QP5 v5.163.1008.3004) */
BEGIN
   DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (ACL           =&amp;gt; &#39;paci.xml&#39;,&lt;br /&gt;
&amp;nbsp;DESCRIPTION   =&amp;gt; &#39;Test Sample ACL&#39;,
&lt;br /&gt;
&amp;nbsp;PRINCIPAL     =&amp;gt; &#39;IT_REG_DBA&#39;,&amp;nbsp; -- user to access the service it must be capital letters&lt;br /&gt;
&amp;nbsp;IS_GRANT      =&amp;gt; TRUE,
&lt;br /&gt;
&amp;nbsp;PRIVILEGE     =&amp;gt; &#39;connect&#39;);
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE (ACL         =&amp;gt; &#39;paci.xml&#39;,&lt;br /&gt;
&amp;nbsp;PRINCIPAL   =&amp;gt; &#39;IT_REG_DBA&#39;,
                                         IS_GRANT    =&amp;gt; TRUE,&lt;br /&gt;
&amp;nbsp;PRIVILEGE   =&amp;gt; &#39;resolve&#39;);
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (ACL    =&amp;gt; &#39;paci.xml&#39;,&lt;br /&gt;
&amp;nbsp;HOST   =&amp;gt; &#39;127.0.0.1&#39;); -- ip address of the service
&lt;br /&gt;
END;
&lt;br /&gt;
&lt;br /&gt;
COMMIT;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;make sure the file has been added to the database&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
SELECT any_path FROM resource_view WHERE any_path like &#39;%.xml&#39;;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Grant Execution for the user&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
GRANT EXECUTE ON UTL_HTTP TO IT_REG_DBA;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Now execute this PLSQL Code&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
/* Formatted on 9/26/2018 1:46:49 AM (QP5 v5.163.1008.3004) */&lt;br /&gt;
DECLARE&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_HTTP_REQUEST&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UTL_HTTP.REQ;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_HTTP_RESPONSE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;UTL_HTTP.RESP;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_BUFFER_SIZE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NUMBER (10) := 512;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_LINE_SIZE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NUMBER (10) := 50;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_LINES_COUNT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NUMBER (10) := 20;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_STRING_REQUEST&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VARCHAR2 (512);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_LINE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VARCHAR2 (128);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_SUBSTRING_MSG&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VARCHAR2 (512);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_RAW_DATA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RAW (512);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_CLOB_RESPONSE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CLOB;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_HOST_NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VARCHAR2 (128) := &#39;http://localhost&#39;; -- the service url&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_CIVILID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VARCHAR2 (12) := &#39;283030306556&#39;; -- the service parameter&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_RESP_XML&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XMLTYPE;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_RESULT_XML_NODE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VARCHAR2 (128);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_NAMESPACE_SOAP&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VARCHAR2 (128)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; := &#39;xmlns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&#39;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_RESPONSE_FIRSTNAME&amp;nbsp; &amp;nbsp; VARCHAR2 (128);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-- first name&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_RESPONSE_SECONDNAME&amp;nbsp; &amp;nbsp;VARCHAR2 (128);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- second name&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_RESPONSE_THIRDNAME&amp;nbsp; &amp;nbsp; VARCHAR2 (128);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-- third name&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_RESPONSE_LASTNAME&amp;nbsp; &amp;nbsp; &amp;nbsp;VARCHAR2 (128);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- last name&lt;br /&gt;
BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_STRING_REQUEST :=&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;soap12:Envelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap12=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;soap12:Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;GetStudentInfo xmlns=&quot;http://127.0.0.1:8080/&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;WVCIVNO&amp;gt;&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; || L_CIVILID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; || &#39;&amp;lt;/WVCIVNO&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/GetStudentInfo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/soap12:Body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/soap12:Envelope&amp;gt;&#39;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;UTL_HTTP.SET_TRANSFER_TIMEOUT (10);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_HTTP_REQUEST :=&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; UTL_HTTP.BEGIN_REQUEST (URL =&amp;gt; &#39;http://localhost/PAAET.asmx&#39; -- COMPLETE SERVICE URL&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; , METHOD =&amp;gt; &#39;POST&#39;, HTTP_VERSION =&amp;gt; &#39;HTTP/1.1&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;UTL_HTTP.SET_HEADER (L_HTTP_REQUEST, &#39;User-Agent&#39;, &#39;Mozilla/4.0&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;UTL_HTTP.SET_HEADER (L_HTTP_REQUEST, &#39;Connection&#39;, &#39;close&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;UTL_HTTP.SET_HEADER (L_HTTP_REQUEST,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Content-Type&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;application/soap+xml; charset=utf-8&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;UTL_HTTP.SET_HEADER (L_HTTP_REQUEST,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Content-Length&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LENGTH (L_STRING_REQUEST));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;&amp;lt;REQUEST_LOOP&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;FOR I IN 0 .. CEIL (LENGTH (L_STRING_REQUEST) / L_BUFFER_SIZE) - 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp;LOOP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; L_SUBSTRING_MSG :=&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SUBSTR (L_STRING_REQUEST, I * L_BUFFER_SIZE + 1, L_BUFFER_SIZE);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L_RAW_DATA := UTL_RAW.CAST_TO_RAW (L_SUBSTRING_MSG);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;UTL_HTTP.WRITE_RAW (R =&amp;gt; L_HTTP_REQUEST, DATA =&amp;gt; L_RAW_DATA);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; EXCEPTION&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN NO_DATA_FOUND&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXIT REQUEST_LOOP;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; END;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;END LOOP REQUEST_LOOP;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;L_HTTP_RESPONSE := UTL_HTTP.GET_RESPONSE (L_HTTP_REQUEST);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.PUT_LINE (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Response&amp;gt; status_code: &quot;&#39; || L_HTTP_RESPONSE.STATUS_CODE || &#39;&quot;&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.PUT_LINE (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Response&amp;gt; reason_phrase: &quot;&#39; || L_HTTP_RESPONSE.REASON_PHRASE || &#39;&quot;&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.PUT_LINE (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Response&amp;gt; http_version: &quot;&#39; || L_HTTP_RESPONSE.HTTP_VERSION || &#39;&quot;&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt;RESPONSE_LOOP&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; LOOP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;UTL_HTTP.READ_RAW (L_HTTP_RESPONSE, L_RAW_DATA, L_BUFFER_SIZE);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L_CLOB_RESPONSE :=&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; L_CLOB_RESPONSE || UTL_RAW.CAST_TO_VARCHAR2 (L_RAW_DATA);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; END LOOP RESPONSE_LOOP;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;EXCEPTION&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN UTL_HTTP.END_OF_BODY&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;UTL_HTTP.END_RESPONSE (L_HTTP_RESPONSE);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;END;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;IF (L_HTTP_RESPONSE.STATUS_CODE = 200)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; -- Create XML type from response text&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; L_RESP_XML := XMLTYPE.CREATEXML (L_CLOB_RESPONSE);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; -- Clean SOAP header&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT EXTRACT (L_RESP_XML, &#39;Envelope/Body/node()&#39;, L_NAMESPACE_SOAP)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO L_RESP_XML&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM DUAL;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; -- Extract Culture Info value&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_OUTPUT.PUT_LINE (&#39;Response from PACI webservices:&#39;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; L_RESULT_XML_NODE :=&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;/GetStudentInfoResponse/GetStudentInfoResult/PV_ARAB_NAME_1&#39;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT EXTRACTVALUE (L_RESP_XML,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;L_RESULT_XML_NODE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;xmlns=&quot;http://127.0.0.1:8080/&quot;&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO L_RESPONSE_FIRSTNAME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM DUAL;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;END IF;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.PUT_LINE (&#39;Civil Id &amp;gt; &#39; || L_CIVILID);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;DBMS_OUTPUT.PUT_LINE (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;Full Name &amp;gt; &#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; || L_RESPONSE_FIRSTNAME);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;IF L_HTTP_REQUEST.PRIVATE_HNDL IS NOT NULL&lt;br /&gt;
&amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; UTL_HTTP.END_REQUEST (L_HTTP_REQUEST);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;END IF;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;IF L_HTTP_RESPONSE.PRIVATE_HNDL IS NOT NULL&lt;br /&gt;
&amp;nbsp; &amp;nbsp;THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; UTL_HTTP.END_RESPONSE (L_HTTP_RESPONSE);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;END IF;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;COMMIT;&lt;br /&gt;
END;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Now the result of the service will print the first name of the given ssn number&amp;nbsp; into the screen&amp;nbsp;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/6446460516298877266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/6446460516298877266'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/how-to-call-webservice-from-plsql.html' title='How to call webservice from PLSQL'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-5813499674174988792</id><published>2018-09-23T16:11:00.001+03:00</published><updated>2018-10-01T16:30:05.870+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Server"/><title type='text'>Connect to Cisco VPN Client Using batch file</title><content type='html'>To connect to the &lt;a href=&quot;https://www.cisco.com/c/en/us/products/security/vpn-endpoint-security-clients/index.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;CISCO VPN&lt;/span&gt;&lt;/a&gt; client throw batch file you need to define the location of the &lt;b&gt;exe&lt;/b&gt; file&lt;br /&gt;
and then use the connect command on&amp;nbsp;vpnclient.exe&lt;br /&gt;
&lt;br /&gt;
I also connected to my remote server in the same patch file.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
@echo off&lt;br /&gt;
@echo VPN Connection&lt;br /&gt;
set myPATH=&quot;C:\Program Files (x86)\Cisco Systems\VPN Client&quot;&lt;br /&gt;
cd %myPATH%&lt;br /&gt;
vpnclient.exe connect paaet user vpn_username pwd vpn_password&lt;br /&gt;
mstsc /v:192.168.80.145&lt;br /&gt;
@echo off&lt;br /&gt;
@echo VPN if you want to disconnect just hit enter&lt;br /&gt;
vpnclient.exe disconnect&lt;br /&gt;
@echo off&lt;br /&gt;
@echo the vpn disconnected 
exit&lt;/div&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1353133264841844&quot; data-ad-format=&quot;fluid&quot; data-ad-layout=&quot;in-article&quot; data-ad-slot=&quot;2492776839&quot; style=&quot;display: block; text-align: center;&quot;&gt;&lt;/ins&gt;&lt;script&gt;
var el = document.querySelector(&#39;.hidden-md, .hidden-lg&#39;);
        var display = window.getComputedStyle(el, null).getPropertyValue(&#39;display&#39;);
        var ins = el.querySelector(&#39;ins&#39;);
        if (display === &#39;block&#39;){
            ins.setAttribute(&#39;data-ad-format&#39;, &#39;auto&#39;);
        }
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/5813499674174988792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/5813499674174988792'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/connect-to-cisco-vpn-client-using-patch.html' title='Connect to Cisco VPN Client Using batch file'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-4084062313134587117</id><published>2018-09-22T21:32:00.003+03:00</published><updated>2018-09-27T01:20:40.810+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><title type='text'>Removing Watermark from Amazing Carousel Version (4.1)</title><content type='html'>Someone asked me how to remove the&amp;nbsp;&lt;a href=&quot;https://amazingcarousel.com/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Amazing Carousel&lt;/span&gt;&lt;/a&gt; Version (4.1) water mark from the free edition&lt;br /&gt;
&lt;br /&gt;
Please just download this&amp;nbsp;&lt;a href=&quot;https://drive.google.com/open?id=1e1Qq2k2o-VwhJpNLHDrepUXM2tRaITcc&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;File&lt;/span&gt;&lt;/a&gt; and replace it with your old one.&lt;br /&gt;
&lt;br /&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1353133264841844&quot; data-ad-format=&quot;fluid&quot; data-ad-layout=&quot;in-article&quot; data-ad-slot=&quot;2492776839&quot; style=&quot;display: block; text-align: center;&quot;&gt;&lt;/ins&gt;&lt;script&gt;
var el = document.querySelector(&#39;.hidden-md, .hidden-lg&#39;);
        var display = window.getComputedStyle(el, null).getPropertyValue(&#39;display&#39;);
        var ins = el.querySelector(&#39;ins&#39;);
        if (display === &#39;block&#39;){
            ins.setAttribute(&#39;data-ad-format&#39;, &#39;auto&#39;);
        }
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/4084062313134587117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/4084062313134587117'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/removing-watermark-from-amazing.html' title='Removing Watermark from Amazing Carousel Version (4.1)'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-6363022572126027465</id><published>2018-09-22T21:08:00.000+03:00</published><updated>2018-09-27T01:21:27.458+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><title type='text'>Remove Amazing Slider Watermark (Version 6.7)</title><content type='html'>Many of you asked about the latest version of &lt;a href=&quot;https://amazingslider.com/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Amazing Slider&lt;/span&gt;&lt;/a&gt; Version 6.7&lt;br /&gt;
Just replace &lt;b&gt;amazingslider.js &lt;/b&gt;inside&amp;nbsp;sliderengine folder with my file.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://drive.google.com/open?id=1WPfJLqFQKSAki5x0-rjzDaJyzAvutpvZ&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Download File&lt;/span&gt;&lt;/a&gt;

&lt;br /&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1353133264841844&quot; data-ad-format=&quot;fluid&quot; data-ad-layout=&quot;in-article&quot; data-ad-slot=&quot;2492776839&quot; style=&quot;display: block; text-align: center;&quot;&gt;&lt;/ins&gt;&lt;script&gt;
var el = document.querySelector(&#39;.hidden-md, .hidden-lg&#39;);
        var display = window.getComputedStyle(el, null).getPropertyValue(&#39;display&#39;);
        var ins = el.querySelector(&#39;ins&#39;);
        if (display === &#39;block&#39;){
            ins.setAttribute(&#39;data-ad-format&#39;, &#39;auto&#39;);
        }
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/6363022572126027465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/6363022572126027465'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/remove-amazing-slider-watermark-version.html' title='Remove Amazing Slider Watermark (Version 6.7)'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-7605770854557140790</id><published>2018-09-22T20:08:00.000+03:00</published><updated>2018-09-27T14:12:14.731+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="PLSQL"/><title type='text'>How to create OWA_COOKIE PLSQL</title><content type='html'>The &lt;a href=&quot;https://www.oracle.com/index.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;Oracle&lt;/span&gt;&lt;/a&gt;&amp;nbsp;Web Agent (OWA) provide the web users with an easy way to send and get cookies throw the browser header using &lt;a href=&quot;https://docs.oracle.com/database/121/ARPLS/w_cook.htm&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;OWA_COOKIE&lt;/span&gt;&lt;/a&gt; package.&lt;br /&gt;
there is two types can be used for OWA_COOKIE 

&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;type vc_arr is table of varchar2(4000)&amp;nbsp;&lt;span style=&quot;font-family: inherit;&quot;&gt;index by binary_integer&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit; font-size: xx-small;&quot;&gt;type cookie is record (name varchar2(4000),vals vc_arr,num_vals integer);&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Open Header&lt;/li&gt;
&lt;li&gt;Send Cookie&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Close Header&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Redirect to another page.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
don&#39;t forget to close the header.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
if for some reason you find the cookie value printed into the screen then your document header maybe was opened&amp;nbsp; and closed before your cookie code.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;code&quot;&gt;
BEGIN&lt;br /&gt;
OWA_UTIL.MIME_HEADER (&#39;text/html&#39;, FALSE);&lt;br /&gt;
OWA_COOKIE.SEND (NAME&amp;nbsp; &amp;nbsp; =&amp;gt; &#39;REGIND&#39;,VALUE&amp;nbsp; &amp;nbsp;=&amp;gt; TWBKBSSF.F_ENCODE (&#39;N&#39;));&lt;br /&gt;
OWA_UTIL.HTTP_HEADER_CLOSE;&lt;br /&gt;
OWA_UTIL.REDIRECT_URL (&#39;xwskstrg.P_RegsAddCrse&#39;);&lt;br /&gt;
END;&lt;/div&gt;
make sure that you encrypt the value of the cookie if it will contain a sensitive data.


&lt;br /&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1353133264841844&quot; data-ad-format=&quot;fluid&quot; data-ad-layout=&quot;in-article&quot; data-ad-slot=&quot;2492776839&quot; style=&quot;display: block; text-align: center;&quot;&gt;&lt;/ins&gt;&lt;script&gt;
var el = document.querySelector(&#39;.hidden-md, .hidden-lg&#39;);
        var display = window.getComputedStyle(el, null).getPropertyValue(&#39;display&#39;);
        var ins = el.querySelector(&#39;ins&#39;);
        if (display === &#39;block&#39;){
            ins.setAttribute(&#39;data-ad-format&#39;, &#39;auto&#39;);
        }
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;

</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/7605770854557140790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/7605770854557140790'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/how-to-create-owacookie-plsql.html' title='How to create OWA_COOKIE PLSQL'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-866336106250374924</id><published>2018-09-22T01:01:00.001+03:00</published><updated>2018-09-27T14:10:48.695+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="PLSQL"/><title type='text'>Modify AWR Automatic Snapshot Settings</title><content type='html'>&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , &amp;quot;times new roman&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_3202.htm&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;DBA_HIST_WR_CONTROL&lt;/span&gt;&lt;/a&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , &amp;quot;times new roman&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;table shows the AWR snapshot settings.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
In this example the retention period is specified as 1 month (43200 minutes) and the interval between each snapshot is 30 minutes.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;code&quot;&gt;
&lt;span&gt;BEGIN&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS (INTERVAL =&amp;gt; 30,RETENTION =&amp;gt; 43200);&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;
SELECT * FROM DBA_HIST_WR_CONTROL&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
After executing&amp;nbsp;&amp;nbsp;&lt;b&gt;DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS&lt;/b&gt;&amp;nbsp; procedure you can get the AWR Report for each 30 min the hole year.&lt;/div&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1353133264841844&quot; data-ad-format=&quot;fluid&quot; data-ad-layout=&quot;in-article&quot; data-ad-slot=&quot;2492776839&quot; style=&quot;display: block; text-align: center;&quot;&gt;&lt;/ins&gt;&lt;script&gt;
var el = document.querySelector(&#39;.hidden-md, .hidden-lg&#39;);
        var display = window.getComputedStyle(el, null).getPropertyValue(&#39;display&#39;);
        var ins = el.querySelector(&#39;ins&#39;);
        if (display === &#39;block&#39;){
            ins.setAttribute(&#39;data-ad-format&#39;, &#39;auto&#39;);
        }
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/866336106250374924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/866336106250374924'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2018/09/modify-awr-automatic-snapshot-settings.html' title='Modify AWR Automatic Snapshot Settings'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-830711356981100329</id><published>2017-05-05T04:20:00.000+03:00</published><updated>2018-09-21T14:59:13.205+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="Entity Framework"/><title type='text'>Unable to create a constant value of type ‘’. Only primitive types or enumeration types are supported in this context.</title><content type='html'>the problem appears because you are using contains method in non primitive type&lt;br /&gt;here is an example &lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Audit audit = new Audit();&lt;br /&gt;&lt;span style=&quot;color: #9b00d3;&quot;&gt;List&amp;lt;int&amp;gt; ints = userReports.Select(y =&amp;gt; y.ReportId).ToList();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;List&amp;lt;ReportUserVisit&amp;gt; userReportLastMonthVisit = audit.GetAudit(userId, AuditType.Report)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Where(x =&amp;gt;&lt;span style=&quot;color: #3e3f3c;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ints.Contains((int)x.ObjectId)&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Select(x=&amp;gt; x.ObjectId)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .GroupBy(x=&amp;gt;x.Value)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Select(x=&amp;gt;new ReportUserVisit { ReportId = x.Key, LastMonthVisitCount= x.Count() })&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .ToList();&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
note ints object, this will solve the problem. &lt;br /&gt;because ints collection is list of int it can use contains method inside entity framework&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:block; text-align:center;&quot;
     data-ad-layout=&quot;in-article&quot;
     data-ad-format=&quot;fluid&quot;
     data-ad-client=&quot;ca-pub-1353133264841844&quot;
     data-ad-slot=&quot;2492776839&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/830711356981100329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/830711356981100329'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2017/05/unable-to-create-constant-value-of-type.html' title='Unable to create a constant value of type ‘’. Only primitive types or enumeration types are supported in this context.'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762972627483134319.post-329176638030001361</id><published>2017-03-30T00:03:00.001+03:00</published><updated>2018-10-03T22:16:50.073+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>How to Get Browser Type</title><content type='html'>&lt;div class=&quot;code&quot;&gt;
// Opera 8.0+&lt;br /&gt;
&amp;nbsp;var isOpera = (!!window.opr &amp;amp;&amp;amp; !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(&#39; OPR/&#39;) &amp;gt;= 0;&lt;br /&gt;
&amp;nbsp;// Firefox 1.0+&lt;br /&gt;
var isFirefox = typeof InstallTrigger !== &#39;undefined&#39;;&lt;br /&gt;
// At least Safari 3+: &quot;[object HTMLElementConstructor]&quot;&lt;br /&gt;
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf(&#39;Constructor&#39;) &amp;gt; 0;&lt;br /&gt;
&amp;nbsp;// Internet Explorer 6-11&lt;br /&gt;
&amp;nbsp;var isIE = /*@cc_on!@*/false || !!document.documentMode;&lt;br /&gt;
&amp;nbsp;// Edge 20+&lt;br /&gt;
&amp;nbsp;var isEdge = !isIE &amp;amp;&amp;amp; !!window.StyleMedia;&lt;br /&gt;
&amp;nbsp;// Chrome 1+&lt;br /&gt;
&amp;nbsp;var isChrome = !!window.chrome &amp;amp;&amp;amp; !!window.chrome.webstore;&lt;br /&gt;
&amp;nbsp;// Blink engine detection&lt;br /&gt;
&amp;nbsp;var isBlink = (isChrome || isOpera) &amp;amp;&amp;amp; !!window.CSS;&lt;br /&gt;
&amp;nbsp;var output = &#39;Detecting browsers by ducktyping:&lt;br /&gt;
&lt;hr /&gt;
&#39;;

output += &#39;isFirefox: &#39; + isFirefox + &#39;&lt;br /&gt;
&#39;;

output += &#39;isChrome: &#39; + isChrome + &#39;&lt;br /&gt;
&#39;;

output += &#39;isSafari: &#39; + isSafari + &#39;&lt;br /&gt;
&#39;;

output += &#39;isOpera: &#39; + isOpera + &#39;&lt;br /&gt;
&#39;;

output += &#39;isIE: &#39; + isIE + &#39;&lt;br /&gt;
&#39;;

output += &#39;isEdge: &#39; + isEdge + &#39;&lt;br /&gt;
&#39;;

output += &#39;isBlink: &#39; + isBlink + &#39;&lt;br /&gt;
&#39;;

document.body.innerHTML = output;&lt;/div&gt;
&lt;br /&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1353133264841844&quot; data-ad-format=&quot;fluid&quot; data-ad-layout=&quot;in-article&quot; data-ad-slot=&quot;2492776839&quot; style=&quot;display: block; text-align: center;&quot;&gt;&lt;/ins&gt;&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/329176638030001361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762972627483134319/posts/default/329176638030001361'/><link rel='alternate' type='text/html' href='http://refateid.blogspot.com/2017/03/get-browser-type.html' title='How to Get Browser Type'/><author><name>Refat Eid</name><uri>http://www.blogger.com/profile/04471944459257063068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPhxUJFI_YoTsVG8fUVCkdgH1I6AW1p71WB86xVSGS6ZRLblTY789Ahmo4O25ShQWbtAhO9rrPWX8YKxFBuSk2lfItzyjwJ20NHES211krBaLHdh21Ac6eQl9OTR_LhA/s220/13015164_10156846359730525_7240787600639129000_n.jpg'/></author></entry></feed>