<?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-5329394702240796264</id><updated>2024-12-18T19:27:09.023-08:00</updated><title type='text'> Coderskey</title><subtitle type='html'>asp.net interview questions and answers, sql server interview questions and answers, asp.net codes, sql queries</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>154</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-5159184866352779506</id><published>2015-12-09T00:05:00.002-08:00</published><updated>2015-12-09T00:05:22.234-08:00</updated><title type='text'>Could not load file or assembly &#39;Newtonsoft.Json&#39; or one of its dependencies. Manifest definition does not match the assembly reference</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To solve this, Ensure that all your projects used the same version by running the following command in Package manager console of Visual Studio and checking the results:&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot;&gt;&lt;code style=&quot;background-color: yellow;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;package&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Newtonsoft&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Json&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;reinstall&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot;&gt;&lt;code style=&quot;background-color: yellow;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot;&gt;&lt;code style=&quot;background-color: yellow;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/5159184866352779506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/12/could-not-load-file-or-assembly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/5159184866352779506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/5159184866352779506'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/12/could-not-load-file-or-assembly.html' title='Could not load file or assembly &#39;Newtonsoft.Json&#39; or one of its dependencies. Manifest definition does not match the assembly reference'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-1044072889540711661</id><published>2015-09-05T01:56:00.002-07:00</published><updated>2015-09-05T01:56:38.041-07:00</updated><title type='text'>The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;You will find fix, from below options:&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;case 1:&lt;/strong&gt;&amp;nbsp;when the password is wrong&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;case 2:&lt;/strong&gt;&amp;nbsp;when you try to login from some App&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;case 3:&lt;/strong&gt;&amp;nbsp;when you try to login from the domain other than your time zone/domain/computer&amp;nbsp;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;(This is the case in most of scenarios when sending mail from code)&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;There is a solution for each&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;solution for case 1:&lt;/strong&gt;&amp;nbsp;Enter the correct password.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;solution for case 2&lt;/strong&gt;: go to security settings at the followig link&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://www.google.com/settings/security/lesssecureapps&quot; style=&quot;border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;https://www.google.com/settings/security/lesssecureapps&lt;/a&gt;&lt;/em&gt;&amp;nbsp;and enable less secure apps . So that you will be able to login from all apps.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;solution 1 for case 3:&lt;/strong&gt;&amp;nbsp;(This might be helpful) you need to review the activity. but reviewing the activity will not be helpful due to latest security standards the link will not be useful. So try the below case.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;solution 2 for case 3&lt;/strong&gt;: If you have hosted your code somewhere on production server and if you have access to the production server, than take remote desktop connection to the production server and try to login once from the browser of the production server. This will add excpetioon for login to google and you will be allowed to login from code.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;But what if you don&#39;t have access to the production server.&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;try the solution 3&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;solution 3 for case 3:&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;You have to enable login from other timezone / ip for your google account.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
to do this follow the link&amp;nbsp;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;a href=&quot;https://g.co/allowaccess&quot; style=&quot;border: 0px; color: #0c65a5; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none;&quot;&gt;https://g.co/allowaccess&lt;/a&gt;&lt;/em&gt;&amp;nbsp;and allow access by clicking the continue button.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
And that&#39;s it. Here you go. Now you will be able to login from any of the computer and by any means of app to your google account.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/1044072889540711661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/09/the-smtp-server-requires-secure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/1044072889540711661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/1044072889540711661'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/09/the-smtp-server-requires-secure.html' title='The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-1996511770325385285</id><published>2015-08-26T02:52:00.003-07:00</published><updated>2015-08-26T02:53:31.837-07:00</updated><title type='text'>Difference between == and === in JS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;==&lt;/code&gt;&amp;nbsp;only compares values&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;code style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;===&lt;/code&gt;&amp;nbsp;compares values + type&lt;/div&gt;
&lt;hr style=&quot;background-color: #dddddd; border: 0px; color: #dddddd; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; height: 1px; line-height: 19.5px; margin-bottom: 20px;&quot; /&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; test1 &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&#39;11&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;
    test2 &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;

&lt;span style=&quot;white-space: inherit;&quot;&gt;test&lt;/span&gt;1 &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;span style=&quot;white-space: inherit;&quot;&gt;test&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: grey; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;// true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;white-space: inherit;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;default prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;white-space: inherit;&quot;&gt;test&lt;/span&gt;1 &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;===&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;span style=&quot;white-space: inherit;&quot;&gt;test&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;2 &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: grey; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;// false&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/1996511770325385285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/08/difference-between-and-in-js.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/1996511770325385285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/1996511770325385285'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/08/difference-between-and-in-js.html' title='Difference between == and === in JS'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-2963123833385044010</id><published>2015-08-10T07:00:00.002-07:00</published><updated>2015-08-11T03:55:26.302-07:00</updated><title type='text'>How to login using username only without password in MVC using identity membership</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;public async Task&amp;lt;ActionResult&amp;gt; CustomLogin(string name)&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; name = &quot;student@gmail.com&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var user = await UserManager.FindByNameAsync(name);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (user != null)&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; &amp;nbsp; &amp;nbsp; await SignInManager.SignInAsync(user, true, 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; return RedirectToAction(&quot;Index&quot;, &quot;Student&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/2963123833385044010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/08/how-to-login-using-username-without.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/2963123833385044010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/2963123833385044010'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/08/how-to-login-using-username-without.html' title='How to login using username only without password in MVC using identity membership'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-6541738241526160580</id><published>2015-06-22T02:38:00.002-07:00</published><updated>2015-06-22T02:38:43.404-07:00</updated><title type='text'>How to get datatype  and length of column in sql server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This query will help:&lt;br /&gt;
&lt;br /&gt;
SELECT column_name as &#39;Column Name&#39;, data_type as &#39;Data Type&#39;,&lt;br /&gt;
character_maximum_length as &#39;Max Length&#39;&lt;br /&gt;
FROM information_schema.columns&lt;br /&gt;
WHERE table_name = &#39;YourTableName&#39;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/6541738241526160580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/06/how-to-get-datatype-and-length-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6541738241526160580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6541738241526160580'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/06/how-to-get-datatype-and-length-of.html' title='How to get datatype  and length of column in sql server'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-7922123884899760187</id><published>2015-05-19T18:39:00.000-07:00</published><updated>2015-05-19T18:39:05.188-07:00</updated><title type='text'>How to configure IIS on windows server 2012/ 2012 r2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To enable IIS and the required IIS components on Windows Server 2012/2012 R2, see the instructions below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Use short key Windows+R to open control panel&lt;/li&gt;
&lt;li&gt;Click on Turn Windows features on or off&lt;/li&gt;
&lt;li&gt;Open Server Manager and click Manage &amp;gt; Add Roles and Features. Click Next.&lt;/li&gt;
&lt;li&gt;Select Role-based or feature-based installation and click Next.&lt;/li&gt;
&lt;li&gt;Select the appropriate server. The local server is selected by default. Click Next.&lt;/li&gt;
&lt;li&gt;Enable Web Server (IIS) and click Next.&lt;/li&gt;
&lt;li&gt;No additional features are necessary to install the Web Adaptor, so click Next.&lt;/li&gt;
&lt;li&gt;On the Web Server Role (IIS) dialog box, click Next.&lt;/li&gt;
&lt;li&gt;On the Select role services dialog box, verify that the web server components listed below are enabled. Click Next.&lt;/li&gt;
&lt;li&gt;Verify that your settings are correct and click Install.&lt;/li&gt;
&lt;li&gt;When the installation completes, click Close to exit the wizard.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
It will take some time to get installed, Enjoyyy......&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/7922123884899760187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/05/how-to-configure-iis-on-windows-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/7922123884899760187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/7922123884899760187'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/05/how-to-configure-iis-on-windows-server.html' title='How to configure IIS on windows server 2012/ 2012 r2'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-6061213411713084113</id><published>2015-05-10T21:59:00.002-07:00</published><updated>2015-05-10T22:00:29.216-07:00</updated><title type='text'>Lock user after number of wrong attempts in MVC 5 using identity 2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
First, create a new ASP.NET MVC 5 
project and select the Individual User Accounts authentication. Then, 
install the ASP.NET Idenetity 2 framework using the package manager 
console.&lt;br /&gt;
&lt;br /&gt;
Next, add the following default value settings in web.config&lt;br /&gt;
&lt;div&gt;
&lt;div class=&quot;syntaxhighlighter  xml&quot; id=&quot;highlighter_248474&quot;&gt;
&lt;div class=&quot;toolbar&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
1&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot;&gt;
2&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot;&gt;
3&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot;&gt;
4&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
5&lt;/div&gt;
&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;div class=&quot;container&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;xml plain&quot;&gt;&amp;lt;&lt;/code&gt;&lt;code class=&quot;xml keyword&quot;&gt;appSettings&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot;&gt;
&lt;code class=&quot;xml spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;&amp;lt;&lt;/code&gt;&lt;code class=&quot;xml keyword&quot;&gt;add&lt;/code&gt; &lt;code class=&quot;xml color1&quot;&gt;key&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;=&lt;/code&gt;&lt;code class=&quot;xml string&quot;&gt;&quot;UserLockoutEnabledByDefault&quot;&lt;/code&gt; &lt;code class=&quot;xml color1&quot;&gt;value&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;=&lt;/code&gt;&lt;code class=&quot;xml string&quot;&gt;&quot;true&quot;&lt;/code&gt; &lt;code class=&quot;xml plain&quot;&gt;/&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot;&gt;
&lt;code class=&quot;xml spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;&amp;lt;&lt;/code&gt;&lt;code class=&quot;xml keyword&quot;&gt;add&lt;/code&gt; &lt;code class=&quot;xml color1&quot;&gt;key&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;=&lt;/code&gt;&lt;code class=&quot;xml string&quot;&gt;&quot;DefaultAccountLockoutTimeSpan&quot;&lt;/code&gt; &lt;code class=&quot;xml color1&quot;&gt;value&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;=&lt;/code&gt;&lt;code class=&quot;xml string&quot;&gt;&quot;15&quot;&lt;/code&gt; &lt;code class=&quot;xml plain&quot;&gt;/&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot;&gt;
&lt;code class=&quot;xml spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;&amp;lt;&lt;/code&gt;&lt;code class=&quot;xml keyword&quot;&gt;add&lt;/code&gt; &lt;code class=&quot;xml color1&quot;&gt;key&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;=&lt;/code&gt;&lt;code class=&quot;xml string&quot;&gt;&quot;MaxFailedAccessAttemptsBeforeLockout&quot;&lt;/code&gt; &lt;code class=&quot;xml color1&quot;&gt;value&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;=&lt;/code&gt;&lt;code class=&quot;xml string&quot;&gt;&quot;3&quot;&lt;/code&gt; &lt;code class=&quot;xml plain&quot;&gt;/&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;code class=&quot;xml plain&quot;&gt;&amp;lt;/&lt;/code&gt;&lt;code class=&quot;xml keyword&quot;&gt;appSettings&lt;/code&gt;&lt;code class=&quot;xml plain&quot;&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
By setting &lt;code&gt;UserLockoutEnabledByDefault&lt;/code&gt; to true, we are 
configuring the application to enforce globally that for every user that
 gets created he/she is subject to lockouts if the user reaches the 
maximum failed login attempts. Off course, if you do not want to enforce
 lockouts for particular users such as administrators you can do so when
 creating their accounts.&lt;br /&gt;
The value for&amp;nbsp;&lt;code&gt;DefaultAccountLockoutTimeSpan&lt;/code&gt; is in 
minutes so you can set to what every value you prefer. The example is 
set to 15 minutes which means if the user reaches the maximum failed 
login attempts, the user will have to wait for 15 minutes before being 
allowed to login.&lt;br /&gt;
The &lt;code&gt;MaxFailedAccessAttemptsBeforeLockout&lt;/code&gt; setting is the 
number of login attempts you allow the user to retry before a lockout. 
The example allows 3 attempts after warning the user.&lt;br /&gt;
Next, open the &lt;tt&gt;IdentityConfig.cs&lt;/tt&gt; file which is found in the &lt;tt&gt;App_Start &lt;/tt&gt;folder and add the following in the &lt;code&gt;Create&lt;/code&gt; method of the &lt;code&gt;ApplicationUserManager&lt;/code&gt; class.&lt;br /&gt;
&lt;div&gt;
&lt;div class=&quot;syntaxhighlighter  csharp&quot; id=&quot;highlighter_450543&quot;&gt;
&lt;div class=&quot;toolbar&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
1&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot;&gt;
2&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot;&gt;
3&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot;&gt;
4&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
5&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot;&gt;
6&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot;&gt;
7&lt;/div&gt;
&lt;div class=&quot;line number8 index7 alt1&quot;&gt;
8&lt;/div&gt;
&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;div class=&quot;container&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;csharp keyword&quot;&gt;public&lt;/code&gt; &lt;code class=&quot;csharp keyword&quot;&gt;static&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;ApplicationUserManager Create(IdentityFactoryOptions&amp;lt;ApplicationUserManager&amp;gt; options, IOwinContext context) &lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot;&gt;
&lt;code class=&quot;csharp plain&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp comments&quot;&gt;// other code removed for brevity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;manager.UserLockoutEnabledByDefault = Convert.ToBoolean(ConfigurationManager.AppSettings[&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;UserLockoutEnabledByDefault&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;].ToString());&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;manager.DefaultAccountLockoutTimeSpan = TimeSpan.FromMinutes(Double.Parse(ConfigurationManager.AppSettings[&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;DefaultAccountLockoutTimeSpan&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;].ToString()));&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;manager.MaxFailedAccessAttemptsBeforeLockout = Convert.ToInt32(ConfigurationManager.AppSettings[&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;MaxFailedAccessAttemptsBeforeLockout&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;].ToString());&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number8 index7 alt1&quot;&gt;
&lt;code class=&quot;csharp plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
It is in the &lt;code&gt;Create&lt;/code&gt; method that you configure the lockout settings by refering to the default values set in web.config above.&lt;br /&gt;
The final step is to perform the lockout checks and you do that in 
the POST login action method. So open Account controller and replace it 
with the following code&lt;br /&gt;
&lt;div&gt;
&lt;div class=&quot;syntaxhighlighter  csharp&quot; id=&quot;highlighter_989241&quot;&gt;
&lt;div class=&quot;toolbar&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;gutter&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
1&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot;&gt;
2&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot;&gt;
3&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot;&gt;
4&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
5&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot;&gt;
6&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot;&gt;
7&lt;/div&gt;
&lt;div class=&quot;line number8 index7 alt1&quot;&gt;
8&lt;/div&gt;
&lt;div class=&quot;line number9 index8 alt2&quot;&gt;
9&lt;/div&gt;
&lt;div class=&quot;line number10 index9 alt1&quot;&gt;
10&lt;/div&gt;
&lt;div class=&quot;line number11 index10 alt2&quot;&gt;
11&lt;/div&gt;
&lt;div class=&quot;line number12 index11 alt1&quot;&gt;
12&lt;/div&gt;
&lt;div class=&quot;line number13 index12 alt2&quot;&gt;
13&lt;/div&gt;
&lt;div class=&quot;line number14 index13 alt1&quot;&gt;
14&lt;/div&gt;
&lt;div class=&quot;line number15 index14 alt2&quot;&gt;
15&lt;/div&gt;
&lt;div class=&quot;line number16 index15 alt1&quot;&gt;
16&lt;/div&gt;
&lt;div class=&quot;line number17 index16 alt2&quot;&gt;
17&lt;/div&gt;
&lt;div class=&quot;line number18 index17 alt1&quot;&gt;
18&lt;/div&gt;
&lt;div class=&quot;line number19 index18 alt2&quot;&gt;
19&lt;/div&gt;
&lt;div class=&quot;line number20 index19 alt1&quot;&gt;
20&lt;/div&gt;
&lt;div class=&quot;line number21 index20 alt2&quot;&gt;
21&lt;/div&gt;
&lt;div class=&quot;line number22 index21 alt1&quot;&gt;
22&lt;/div&gt;
&lt;div class=&quot;line number23 index22 alt2&quot;&gt;
23&lt;/div&gt;
&lt;div class=&quot;line number24 index23 alt1&quot;&gt;
24&lt;/div&gt;
&lt;div class=&quot;line number25 index24 alt2&quot;&gt;
25&lt;/div&gt;
&lt;div class=&quot;line number26 index25 alt1&quot;&gt;
26&lt;/div&gt;
&lt;div class=&quot;line number27 index26 alt2&quot;&gt;
27&lt;/div&gt;
&lt;div class=&quot;line number28 index27 alt1&quot;&gt;
28&lt;/div&gt;
&lt;div class=&quot;line number29 index28 alt2&quot;&gt;
29&lt;/div&gt;
&lt;div class=&quot;line number30 index29 alt1&quot;&gt;
30&lt;/div&gt;
&lt;div class=&quot;line number31 index30 alt2&quot;&gt;
31&lt;/div&gt;
&lt;div class=&quot;line number32 index31 alt1&quot;&gt;
32&lt;/div&gt;
&lt;div class=&quot;line number33 index32 alt2&quot;&gt;
33&lt;/div&gt;
&lt;div class=&quot;line number34 index33 alt1&quot;&gt;
34&lt;/div&gt;
&lt;div class=&quot;line number35 index34 alt2&quot;&gt;
35&lt;/div&gt;
&lt;div class=&quot;line number36 index35 alt1&quot;&gt;
36&lt;/div&gt;
&lt;div class=&quot;line number37 index36 alt2&quot;&gt;
37&lt;/div&gt;
&lt;div class=&quot;line number38 index37 alt1&quot;&gt;
38&lt;/div&gt;
&lt;div class=&quot;line number39 index38 alt2&quot;&gt;
39&lt;/div&gt;
&lt;div class=&quot;line number40 index39 alt1&quot;&gt;
40&lt;/div&gt;
&lt;div class=&quot;line number41 index40 alt2&quot;&gt;
41&lt;/div&gt;
&lt;div class=&quot;line number42 index41 alt1&quot;&gt;
42&lt;/div&gt;
&lt;div class=&quot;line number43 index42 alt2&quot;&gt;
43&lt;/div&gt;
&lt;div class=&quot;line number44 index43 alt1&quot;&gt;
44&lt;/div&gt;
&lt;div class=&quot;line number45 index44 alt2&quot;&gt;
45&lt;/div&gt;
&lt;div class=&quot;line number46 index45 alt1&quot;&gt;
46&lt;/div&gt;
&lt;div class=&quot;line number47 index46 alt2&quot;&gt;
47&lt;/div&gt;
&lt;div class=&quot;line number48 index47 alt1&quot;&gt;
48&lt;/div&gt;
&lt;div class=&quot;line number49 index48 alt2&quot;&gt;
49&lt;/div&gt;
&lt;div class=&quot;line number50 index49 alt1&quot;&gt;
50&lt;/div&gt;
&lt;div class=&quot;line number51 index50 alt2&quot;&gt;
51&lt;/div&gt;
&lt;div class=&quot;line number52 index51 alt1&quot;&gt;
52&lt;/div&gt;
&lt;div class=&quot;line number53 index52 alt2&quot;&gt;
53&lt;/div&gt;
&lt;div class=&quot;line number54 index53 alt1&quot;&gt;
54&lt;/div&gt;
&lt;div class=&quot;line number55 index54 alt2&quot;&gt;
55&lt;/div&gt;
&lt;div class=&quot;line number56 index55 alt1&quot;&gt;
56&lt;/div&gt;
&lt;div class=&quot;line number57 index56 alt2&quot;&gt;
57&lt;/div&gt;
&lt;div class=&quot;line number58 index57 alt1&quot;&gt;
58&lt;/div&gt;
&lt;div class=&quot;line number59 index58 alt2&quot;&gt;
59&lt;/div&gt;
&lt;div class=&quot;line number60 index59 alt1&quot;&gt;
60&lt;/div&gt;
&lt;div class=&quot;line number61 index60 alt2&quot;&gt;
61&lt;/div&gt;
&lt;div class=&quot;line number62 index61 alt1&quot;&gt;
62&lt;/div&gt;
&lt;div class=&quot;line number63 index62 alt2&quot;&gt;
63&lt;/div&gt;
&lt;div class=&quot;line number64 index63 alt1&quot;&gt;
64&lt;/div&gt;
&lt;div class=&quot;line number65 index64 alt2&quot;&gt;
65&lt;/div&gt;
&lt;div class=&quot;line number66 index65 alt1&quot;&gt;
66&lt;/div&gt;
&lt;div class=&quot;line number67 index66 alt2&quot;&gt;
67&lt;/div&gt;
&lt;div class=&quot;line number68 index67 alt1&quot;&gt;
68&lt;/div&gt;
&lt;div class=&quot;line number69 index68 alt2&quot;&gt;
69&lt;/div&gt;
&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;div class=&quot;container&quot;&gt;
&lt;div class=&quot;line number1 index0 alt2&quot;&gt;
&lt;code class=&quot;csharp plain&quot;&gt;[HttpPost]&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number2 index1 alt1&quot;&gt;
&lt;code class=&quot;csharp plain&quot;&gt;[AllowAnonymous]&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number3 index2 alt2&quot;&gt;
&lt;code class=&quot;csharp plain&quot;&gt;[ValidateAntiForgeryToken]&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number4 index3 alt1&quot;&gt;
&lt;code class=&quot;csharp keyword&quot;&gt;public&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;async Task&amp;lt;ActionResult&amp;gt; Login(LoginViewModel model, &lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;string&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;returnUrl)&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number5 index4 alt2&quot;&gt;
&lt;code class=&quot;csharp plain&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number6 index5 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;if&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;(ModelState.IsValid)&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number7 index6 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number8 index7 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp comments&quot;&gt;// find user by username first&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number9 index8 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;var user = await UserManager.FindByNameAsync(model.Email);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number10 index9 alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number11 index10 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;if&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;(user != &lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;null&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;)&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number12 index11 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number13 index12 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;var validCredentials = await UserManager.FindAsync(model.Email, model.Password);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number14 index13 alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number15 index14 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp comments&quot;&gt;// When a user is lockedout, this check is done to ensure that even if the credentials are valid&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number16 index15 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp comments&quot;&gt;// the user can not login until the lockout duration has passed&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number17 index16 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;if&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;(await UserManager.IsLockedOutAsync(user.Id))&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number18 index17 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number19 index18 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;ModelState.AddModelError(&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;string&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;.Format(&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;Your account has been locked out for {0} minutes due to multiple failed login attempts.&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;, ConfigurationManager.AppSettings[&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;DefaultAccountLockoutTimeSpan&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;].ToString()));&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number20 index19 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number21 index20 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp comments&quot;&gt;// if user is subject to lockouts and the credentials are invalid&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number22 index21 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp comments&quot;&gt;// record the failure and check if user is lockedout and display message, otherwise, &lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number23 index22 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp comments&quot;&gt;// display the number of attempts remaining before lockout&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number24 index23 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;else&lt;/code&gt; &lt;code class=&quot;csharp keyword&quot;&gt;if&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;(await UserManager.GetLockoutEnabledAsync(user.Id) &amp;amp;&amp;amp; validCredentials == &lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;null&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;)&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number25 index24 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number26 index25 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp comments&quot;&gt;// Record the failure which also may cause the user to be locked out&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number27 index26 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;await UserManager.AccessFailedAsync(user.Id);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number28 index27 alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number29 index28 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;string&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;message;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number30 index29 alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number31 index30 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;if&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;(await UserManager.IsLockedOutAsync(user.Id))&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number32 index31 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number33 index32 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;message = &lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;string&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;.Format(&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;Your account has been locked out for {0} minutes due to multiple failed login attempts.&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;, ConfigurationManager.AppSettings[&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;DefaultAccountLockoutTimeSpan&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;].ToString());&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number34 index33 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number35 index34 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;else&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number36 index35 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number37 index36 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;int&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;accessFailedCount = await UserManager.GetAccessFailedCountAsync(user.Id);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number38 index37 alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number39 index38 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;int&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;attemptsLeft =&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number40 index39 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;Convert.ToInt32(&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number41 index40 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;ConfigurationManager.AppSettings[&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;MaxFailedAccessAttemptsBeforeLockout&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;].ToString()) -&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number42 index41 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;accessFailedCount;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number43 index42 alt2&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number44 index43 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;message = &lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;string&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;.Format(&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number45 index44 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;Invalid credentials. You have {0} more attempt(s) before your account gets locked out.&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;, attemptsLeft);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number46 index45 alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number47 index46 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number48 index47 alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number49 index48 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;ModelState.AddModelError(&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;, message);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number50 index49 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number51 index50 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;else&lt;/code&gt; &lt;code class=&quot;csharp keyword&quot;&gt;if&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;(validCredentials == &lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;null&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;)&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number52 index51 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number53 index52 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;ModelState.AddModelError(&lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;csharp string&quot;&gt;&quot;Invalid credentials. Please try again.&quot;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number54 index53 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number55 index54 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;else&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number56 index55 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;{&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number57 index56 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;await SignInAsync(user, model.RememberMe);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number58 index57 alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number59 index58 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp comments&quot;&gt;// When token is verified correctly, clear the access failed count used for lockout&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number60 index59 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;await UserManager.ResetAccessFailedCountAsync(user.Id);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number61 index60 alt2&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number62 index61 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;return&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;RedirectToLocal(returnUrl);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number63 index62 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&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;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number64 index63 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number65 index64 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number66 index65 alt1&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;line number67 index66 alt2&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp comments&quot;&gt;// If we got this far, something failed, redisplay form&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number68 index67 alt1&quot;&gt;
&lt;code class=&quot;csharp spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;csharp keyword&quot;&gt;return&lt;/code&gt; &lt;code class=&quot;csharp plain&quot;&gt;View(model);&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;line number69 index68 alt2&quot;&gt;
&lt;code class=&quot;csharp plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
When a user attempts to login, the first check is to find out if the 
account is locked out and inform the user accordingly. Then it checks if
 the user is subject to lockouts and if it does and the credentials are 
invalid, record the failure(increment the access failed count) and 
inform the user that he/she has how many more login attempts before 
account gets locked out. If the account is not locked out and the 
credentials are valid, then sign the user in and reset the access failed
 count to zero. &lt;br /&gt;
The following shows the message a valid user gets when he/she fails to login the first time&lt;br /&gt;
&lt;img alt=&quot;&quot; class=&quot;img-thumbnail img-thumbnail-roundered img-margin-right img-margin-bottom&quot; src=&quot;http://www.jlum.ws/Images/uploads/images/login_failed_attempt_first.jpg&quot; style=&quot;height: 466px; width: 397px;&quot; /&gt;&lt;br /&gt;
The following shows the message a valid user gets when the account gets locked out&lt;br /&gt;
&lt;span itemprop=&quot;articleBody&quot;&gt;



























&lt;/span&gt;&lt;br /&gt;
&lt;img alt=&quot;&quot; class=&quot;pull-left img-thumbnail img-thumbnail-roundered img-margin-right img-margin-bottom&quot; src=&quot;http://www.jlum.ws/Images/uploads/images/login_account_locked.jpg&quot; style=&quot;height: 464px; width: 363px;&quot; /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/6061213411713084113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/05/lock-user-after-number-of-wrong.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6061213411713084113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6061213411713084113'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/05/lock-user-after-number-of-wrong.html' title='Lock user after number of wrong attempts in MVC 5 using identity 2'/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-996478527663494099</id><published>2015-03-18T00:14:00.000-07:00</published><updated>2015-03-18T00:14:01.105-07:00</updated><title type='text'>How to get lat long from address in C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
We need to install GoogleMaps.LocationServices from the NuGet package. It uses Google&#39;s REST API to get lat/long for a given address. Using these you can get latitude and longitude without any need of any API Key.&lt;br /&gt;
&lt;br /&gt;
To install GoogleMaps.LocationServices, either, run the following command in the Package Manger Console.&lt;br /&gt;
&lt;br /&gt;
PM&amp;gt; Install-Package GoogleMaps.LocationServices&lt;br /&gt;
&lt;br /&gt;
Or, search it on Nuget and install it directly&lt;br /&gt;
&lt;br /&gt;
After Install the above package you can use it like this:&lt;br /&gt;
&lt;br /&gt;
Firstly, Add the NameSpace.&lt;br /&gt;
&lt;br /&gt;
using GoogleMaps.LocationServices;&lt;br /&gt;
&lt;br /&gt;
Then use &amp;nbsp;GoogleLocationService() class to get the latitude and longitude of any given address.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&amp;nbsp; /// &amp;lt;summary&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /// This is to get the lat long from address&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 void GetLatLongFromAddress()&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; var address = &quot;920 N. Parish Place, Burbank, CA 91506&quot;; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var locationService = new GoogleLocationService();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var point = locationService.GetLatLongFromAddress(address);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var latitude = point.Latitude;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var longitude = point.Longitude;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
Enjoyyy.... :)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/996478527663494099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/03/how-to-get-lat-long-from-address-in-c.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/996478527663494099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/996478527663494099'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/03/how-to-get-lat-long-from-address-in-c.html' title='How to get lat long from address in C#'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-7890499298612923749</id><published>2015-03-10T23:54:00.000-07:00</published><updated>2015-03-10T23:54:05.687-07:00</updated><title type='text'>Create database script with data in Sql Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;Right Click on db =&amp;gt; Tasks =&amp;gt; Generate Scripts =&amp;gt; In &quot;Set Scripting Options: Click Advanced, find&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;Types of data to script&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;. You can choose between&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;Data only&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;Script and data&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;Schema only&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;. The default is&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;Schema only.&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/code&gt;
&lt;code style=&quot;background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/code&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlJjSX7v5cyhLVfKPF7MzSV-zmI4lcvQB5CRPgmp2QcsgAanRUz72OpewW1xEVsGmm7sMCAMuEtGzDjdJZsIxeUYAJN21L8zLIdoi-WyCfUdYQ6pJw3Sh1vql7_pDPMS21wn-Ikb13fjs/s1600/DBScriptWithData.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlJjSX7v5cyhLVfKPF7MzSV-zmI4lcvQB5CRPgmp2QcsgAanRUz72OpewW1xEVsGmm7sMCAMuEtGzDjdJZsIxeUYAJN21L8zLIdoi-WyCfUdYQ6pJw3Sh1vql7_pDPMS21wn-Ikb13fjs/s1600/DBScriptWithData.jpg&quot; height=&quot;334&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;code style=&quot;background-color: #eeeeee; border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/7890499298612923749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/03/create-database-script-with-data-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/7890499298612923749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/7890499298612923749'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/03/create-database-script-with-data-in-sql.html' title='Create database script with data in Sql Server'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlJjSX7v5cyhLVfKPF7MzSV-zmI4lcvQB5CRPgmp2QcsgAanRUz72OpewW1xEVsGmm7sMCAMuEtGzDjdJZsIxeUYAJN21L8zLIdoi-WyCfUdYQ6pJw3Sh1vql7_pDPMS21wn-Ikb13fjs/s72-c/DBScriptWithData.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-6585883040277112128</id><published>2015-02-11T03:06:00.001-08:00</published><updated>2015-02-11T03:06:25.883-08:00</updated><title type='text'>Convert httppostedfilebase to image in C# and image re-sizing in c#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;private string UploadFile(HttpPostedFileBase postedFile)&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 (postedFile.ContentLength &amp;gt; 0)&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; &lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; var filename = Path.GetFileName(postedFile.FileName);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Drawing.Image sourceimage =&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Drawing.Image.FromStream(postedFile.InputStream);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Bitmap newImage = new Bitmap(5, 5);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (Graphics gr = Graphics.FromImage(newImage))&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; gr.SmoothingMode = SmoothingMode.HighQuality;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.InterpolationMode = InterpolationMode.HighQualityBicubic;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.PixelOffsetMode = PixelOffsetMode.HighQuality;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.DrawImage(sourceimage, new Rectangle(0, 0, 5, 5));&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;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/6585883040277112128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/02/convert-httppostedfilebase-to-image-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6585883040277112128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6585883040277112128'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/02/convert-httppostedfilebase-to-image-in.html' title='Convert httppostedfilebase to image in C# and image re-sizing in c#'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-6803014659508430863</id><published>2015-02-04T22:54:00.002-08:00</published><updated>2015-02-04T22:54:35.559-08:00</updated><title type='text'>How To Change Password Validation strength in ASP.Net MVC Identity ?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In the MVC project template in VS2013 Update 2, there should be a file called App_Start/IdentityConfig.cs.&lt;br /&gt;
&lt;br /&gt;
In it you should find the class ApplicationUserManager and a static factory method called Create().&lt;br /&gt;
&lt;br /&gt;
That&#39;s where the user manager class is configured, including the server-side validation rules for passwords are defined. For example:&lt;br /&gt;
&lt;br /&gt;
manager.PasswordValidator = new PasswordValidator&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RequiredLength = 6,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RequireNonLetterOrDigit = true,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RequireDigit = true,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RequireLowercase = true,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; RequireUppercase = true,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
Note: you can change/customize above configuration for password strength, like this:&lt;br /&gt;
&lt;br /&gt;
// Configure validation logic for passwords&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; manager.PasswordValidator = new PasswordValidator&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; RequiredLength = 6,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RequireNonLetterOrDigit = false,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RequireDigit = false,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RequireLowercase = false,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RequireUppercase = false,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;br /&gt;
&lt;br /&gt;
Enjoyyyy...&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/6803014659508430863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/02/how-to-change-password-validation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6803014659508430863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6803014659508430863'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/02/how-to-change-password-validation.html' title='How To Change Password Validation strength in ASP.Net MVC Identity ?'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-1905898568918201170</id><published>2015-01-27T22:14:00.002-08:00</published><updated>2015-01-27T22:14:24.320-08:00</updated><title type='text'>Query to rename column name in Sql Server 2008</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; EXEC sp_RENAME &#39;TableName.OldColumnName&#39; , &#39;NewColumnName&#39;, &#39;COLUMN&#39;&lt;br /&gt;
&lt;br /&gt;
Query Example:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; EXEC sp_RENAME &#39;ExceptionLog.exceptionLog&#39;, &#39;LogMessage&#39;, &#39;COLUMN&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoyyy....&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/1905898568918201170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/01/query-to-rename-column-name-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/1905898568918201170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/1905898568918201170'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/01/query-to-rename-column-name-in-sql.html' title='Query to rename column name in Sql Server 2008'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-5093641028479052066</id><published>2015-01-21T23:05:00.003-08:00</published><updated>2015-01-21T23:05:55.090-08:00</updated><title type='text'>Reading App settings from app.config or web.config in .net C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre class=&quot;lang-xml prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; white-space: normal;&quot;&gt;For Sample App.config like below:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-xml prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-xml prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;xml version&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; encoding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;appSettings&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;add&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;border: 0px; color: red; margin: 0px; padding: 0px;&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;&quot;countoffiles&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;border: 0px; color: red; margin: 0px; padding: 0px;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;&quot;7&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;add&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;border: 0px; color: red; margin: 0px; padding: 0px;&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;&quot;logfilelocation&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;border: 0px; color: red; margin: 0px; padding: 0px;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;&quot;abc.txt&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;/appSettings&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-xml prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-xml prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px; white-space: normal;&quot;&gt;
You read the above app settings using code shown below:&lt;/div&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;using &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;System&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;Configuration&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px; white-space: normal;&quot;&gt;
You may also need to also add a reference to System.Configuration in your project if there isn&#39;t one already. You can then access the values like so:&lt;/div&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px;&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; configvalue1 &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;ConfigurationManager&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;AppSettings&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&quot;countoffiles&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: darkblue; margin: 0px; padding: 0px;&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; configvalue2 &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;ConfigurationManager&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;AppSettings&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px;&quot;&gt;&quot;logfilelocation&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px;&quot;&gt;];&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;Enjoyyyy.... :)&lt;/pre&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/5093641028479052066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/01/reading-app-settings-from-appconfig-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/5093641028479052066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/5093641028479052066'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/01/reading-app-settings-from-appconfig-or.html' title='Reading App settings from app.config or web.config in .net C#'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-1115491495788933592</id><published>2015-01-14T01:17:00.005-08:00</published><updated>2015-01-14T01:17:59.492-08:00</updated><title type='text'>How to calculate difference between two dates in C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;post-text&quot; itemprop=&quot;text&quot;&gt;
Assuming &lt;code&gt;StartDate&lt;/code&gt; and &lt;code&gt;EndDate&lt;/code&gt; are of type &lt;code&gt;DateTime&lt;/code&gt;:&lt;br /&gt;


&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot;&gt;int dateDifference = (&lt;code style=&quot;white-space: normal;&quot;&gt;StartDate&lt;/code&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;- &lt;code style=&quot;white-space: normal;&quot;&gt;EndDate&lt;/code&gt;).Days;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/1115491495788933592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2015/01/how-to-calculate-difference-between-two.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/1115491495788933592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/1115491495788933592'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2015/01/how-to-calculate-difference-between-two.html' title='How to calculate difference between two dates in C#'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-1022702253615802670</id><published>2014-12-24T22:50:00.001-08:00</published><updated>2014-12-24T22:50:30.043-08:00</updated><title type='text'>How to Check if folder exists, if not create it in C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string realPath;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; realPath = Server.MapPath(&quot;~/ReportHtmlFiles/&quot; + TestFolder + &quot;/&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Check if folder exists, if not create it&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!Directory.Exists(realPath))&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; Directory.CreateDirectory(realPath);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/1022702253615802670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/12/how-to-check-if-folder-exists-if-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/1022702253615802670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/1022702253615802670'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/12/how-to-check-if-folder-exists-if-not.html' title='How to Check if folder exists, if not create it in C#'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-2286818188302871872</id><published>2014-12-24T22:11:00.003-08:00</published><updated>2014-12-24T22:12:59.804-08:00</updated><title type='text'>How to create new folder in mvc 4</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre class=&quot;prettyprint prettyprinted&quot;&gt;&lt;span class=&quot;kwd&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; path &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Server&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;MapPath&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;~/Content/users/&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &quot;NewFolderToAdd/&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Directory&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;CreateDirectory&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/2286818188302871872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/12/how-to-create-new-folder-in-mvc-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/2286818188302871872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/2286818188302871872'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/12/how-to-create-new-folder-in-mvc-4.html' title='How to create new folder in mvc 4'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-6015659965908116056</id><published>2014-12-18T07:35:00.000-08:00</published><updated>2014-12-18T07:35:33.832-08:00</updated><title type='text'>File upload using jquery Asp.Net MVC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&gt;
&lt;h2&gt;
&amp;nbsp;File Upload in ASP.NET MVC via ajax&lt;/h2&gt;
&lt;h3&gt;
Problem&lt;/h3&gt;
&lt;div&gt;
While looking for fileupload options via ajax and without posting the 
whole form, we often come across code in the internet using FormData 
API, which works perfectly fine on chrome and mozilla but on on IE. so a
 code snippet using a FormData API would like this below&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
//View Code&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; function save() {&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#test&quot;).submit();&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; function submitForm() {&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var formData = new FormData($(&#39;#test&#39;)[0]);&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $.ajax({&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &#39;@Url.Action(&quot;Upload&quot;,&quot;&lt;wbr&gt;&lt;/wbr&gt;FileUpload&quot;)&#39;,&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: &#39;POST&#39;,&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data: formData,&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; async: false,&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; success: function (data) {&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(&#39;posted&#39;)&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cache: false,&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contentType: false,&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; processData: false&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;lt;/script&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;lt;h2&amp;gt;Index&amp;lt;/h2&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;lt;input type=&quot;button&quot; value=&quot;Submit&quot; onclick=&quot;save();&quot; /&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;lt;form id=&quot;test&quot; action=&quot;javascript:submitForm(&lt;wbr&gt;&lt;/wbr&gt;);&quot; method=&quot;post&quot; enctype = &quot;multipart/form-data&quot;&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label for=&quot;fileUpload&quot;&amp;gt;File upload&amp;lt;/label&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type=&quot;file&quot; id=&quot;fileUpload&quot; name=&quot;fileUpload&quot; /&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;lt;/form&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
//Controller Code&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
public ActionResult Upload()&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpPostedFileBase postedFile = Request.Files[0];&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return View();&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
The above snipped works fine on chrome and mozilla and you will be able 
to see the postedFile in the controller but it does not work on IE 
because most versions of IE does not support FormData.&lt;/div&gt;
&lt;h3 style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
Solution&lt;/h3&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
So the solution I came up with after going some recommendations over 
internet about HTML controls on different browsers is that its better to
 use iframes. So Idea is to point the target of the form to an iframe 
and even bind a load event to the iframe so that you know when the 
upload is finished and write additional jquery functions. Also you can 
even hide the iframe and not show the user. But this solution works on 
IE as well. The code is as below&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
The code also shows how to post additional data along with the file post.&lt;/div&gt;
&lt;div style=&quot;color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;@{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; ViewBag.Title = &quot;Index&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;lt;script src=&quot;~/scripts/jquery-1.9.1.min_.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; function successFunction() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert($(&#39;#my_iframe&#39;).contents().find(&#39;p&#39;).html());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; function redirect() {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //debugger;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; document.getElementById(&#39;my_form&#39;).target = &#39;my_iframe&#39;; //&#39;my_iframe&#39; is the name of the iframe&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //document.getElementById(&#39;my_form&#39;).submit();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var callback = function () {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (successFunction)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; successFunction();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;#frame&#39;).unbind(&#39;load&#39;, callback);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;#my_iframe&#39;).bind(&#39;load&#39;, callback);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;#hfParam&#39;).val(&#39;id:1&#39;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;#my_form&#39;).submit();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //$(&quot;#my_form&quot;).trigger(&quot;submit&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;lt;h2&amp;gt;Index&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;lt;input type=&quot;button&quot; name=&quot;action&quot; value=&quot;Upload&quot; onclick=&quot;redirect();&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;lt;form id=&quot;my_form&quot; name=&quot;my_form&quot; action=&quot;/FileUpload/UploadFile&quot; method=&quot;POST&quot; enctype=&quot;multipart/form-data&quot; &amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;div id=&quot;main&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input name=&quot;my_hidden&quot; id=&quot;hfParam&quot; type=&quot;hidden&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input name=&quot;my_files&quot; id=&quot;my_file&quot; type=&quot;file&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;iframe id=&#39;my_iframe&#39; name=&#39;my_iframe&#39; src=&quot;&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/iframe&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div id=&quot;someDiv&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;[HttpPost]&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;
&lt;/span&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public ActionResult UploadFile()&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif; font-size: xx-small;&quot;&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ContentResult result = new ContentResult() { Content = &quot;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&quot;, ContentType = &quot;text/html&quot;};&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpPostedFileBase postedFile = Request.Files[0];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result.Content = &quot;&amp;lt;p&amp;gt;&quot; + postedFile.FileName + &quot;&amp;lt;/p&amp;gt;&quot;;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (System.Exception ex)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result.Content = ex.Message;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/6015659965908116056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/12/file-upload-using-jquery-aspnet-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6015659965908116056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6015659965908116056'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/12/file-upload-using-jquery-aspnet-mvc.html' title='File upload using jquery Asp.Net MVC'/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-7512427636059468923</id><published>2014-12-17T22:41:00.001-08:00</published><updated>2014-12-17T22:41:34.810-08:00</updated><title type='text'>Sql query to add new column in table</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
ALTER TABLE TableName&lt;br /&gt;
ADD ColumnName Datatype&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
ALTER TABLE AspNetUsers&lt;br /&gt;
ADD SubscripionDate datetime null&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/7512427636059468923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/12/sql-query-to-add-new-column-in-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/7512427636059468923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/7512427636059468923'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/12/sql-query-to-add-new-column-in-table.html' title='Sql query to add new column in table'/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/blank.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-4963488779725580037</id><published>2014-10-28T03:57:00.002-07:00</published><updated>2014-10-28T03:58:48.899-07:00</updated><title type='text'>Format number or add comma separation using Jquery</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;lt;!-- Add below script CDN is to apply currency formmater using jquery --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;lt;script src=&quot;//cdnjs.cloudflare.com/ajax/libs/numeral.js/1.4.5/numeral.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Format&lt;/h3&gt;
Numbers can be formatted to look like currency, 
percentages, times, or even plain old numbers with decimal places, 
thousands, and abbreviations.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;var string = numeral(1000).format(&#39;0,0.00&#39;);&lt;/span&gt;
// &#39;1,000.00&#39;
&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;Reference link: &lt;a href=&quot;http://numeraljs.com/&quot;&gt;http://numeraljs.com/&lt;/a&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/4963488779725580037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/10/format-number-or-add-comma-separation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/4963488779725580037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/4963488779725580037'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/10/format-number-or-add-comma-separation.html' title='Format number or add comma separation using Jquery'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-5107132517428829217</id><published>2014-10-17T09:44:00.001-07:00</published><updated>2014-10-17T09:44:04.998-07:00</updated><title type='text'>How to apply Special character validation using Jquery</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;lt;input type=&quot;text&quot; name=&quot;txtKeywords&quot; id=&quot;txtKeywords&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&quot;submit&quot; value=&quot;Search&quot; title=&quot;Search&quot; id=&quot;btnSearch&quot; &amp;nbsp;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $(document).ready(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#btnSearch&quot;).click(function () {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var titleValue = $(&quot;#txtKeywords&quot;).val();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Apply check for special characters&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ((/^[a-zA-Z0-9- ]*$/.test(titleValue) == false) ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(&#39;Your String Contains illegal Characters.&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&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; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/5107132517428829217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/10/how-to-apply-special-character.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/5107132517428829217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/5107132517428829217'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/10/how-to-apply-special-character.html' title='How to apply Special character validation using Jquery'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-6517360406680480135</id><published>2014-10-16T04:42:00.000-07:00</published><updated>2014-10-16T04:42:25.790-07:00</updated><title type='text'>Difference between loose coupling and tight coupling in object oriented paradigm</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Tight coupling is when a group of classes are highly dependent on one another. &lt;br /&gt;
&lt;br /&gt;
This scenario arises when a class assumes too many responsibilities, 
or when one concern is spread over many classes rather than having its 
own class.&lt;br /&gt;
&lt;br /&gt;
Loose coupling is achieved by means of a design that promotes single-responsibility and separation of concerns.&lt;br /&gt;
&lt;br /&gt;
A loosely-coupled class can be consumed and tested independently of other (concrete) classes.&lt;br /&gt;
Interfaces are a powerful tool to use for decoupling.&lt;br /&gt;
&lt;br /&gt;
Classes can 
communicate through interfaces rather than other concrete classes, and 
any class can be on the other end of that communication simply by 
implementing the interface.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example of tight coupling:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;pre&gt;&lt;code&gt;class CustomerRepository
{
    private readonly Database database;

    public CustomerRepository(Database database)
    {
        this.database = database;
    }

    public void Add(string CustomerName)
    {
        database.AddRow(&quot;Customer&quot;, CustomerName);
    }
}

class Database
{
    public void AddRow(string Table, string Value)
    {
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;b&gt;Example of loose coupling:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
















&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;class CustomerRepository
{
    private readonly IDatabase database;

    public CustomerRepository(IDatabase database)
    {
        this.database = database;
    }

    public void Add(string CustomerName)
    {
        database.AddRow(&quot;Customer&quot;, CustomerName);
    }
}

interface IDatabase
{
    void AddRow(string Table, string Value);
}

class Database : IDatabase
{
    public void AddRow(string Table, string Value)
    {
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Enjoyyy.... !!!!&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/6517360406680480135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/10/difference-between-loose-coupling-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6517360406680480135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/6517360406680480135'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/10/difference-between-loose-coupling-and.html' title='Difference between loose coupling and tight coupling in object oriented paradigm'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-4475622357781093024</id><published>2014-10-15T05:26:00.002-07:00</published><updated>2014-10-15T06:02:14.172-07:00</updated><title type='text'>Example to create Facebook App to show list of friends using FQL(Facebook Query Language) and send Invite in C# (MVC)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To create such App firstly we need to create Facebook Developer account to get the Facebook Application Id.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Refer this link to create developer account and get FB App Id :&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://help.yahoo.com/kb/yahoo-merchant-solutions/facebook-application-sln18861.html&quot;&gt;https://help.yahoo.com/kb/yahoo-merchant-solutions/facebook-application-sln18861.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here we have used MVC &amp;nbsp;to develop this :&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. Create a controller of name PeopleController&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2. Create an action&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;public ActionResult InviteFBPeople()&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return View();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
3. Create view for above action&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
@{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; ViewBag.Title = &quot;Invite Facebook People&quot;;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;h2&amp;gt;Invite Facebook Friends&amp;lt;/h2&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;div id=&quot;fb-root&quot; style=&quot;display:inline; margin-left:20px;&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; //Facebook SDK initialize portion&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; window.fbAsyncInit = function () {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FB.init({&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; appId: &#39;YourFBAppID&#39;,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status: true, cookie: false, xfbml: true&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; };&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // All FB resources&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; $(document).ready(function () {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (document.getElementById(&#39;fb-root&#39;) != undefined) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var e = document.createElement(&#39;script&#39;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.type = &#39;text/javascript&#39;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.src = document.location.protocol + &#39;//connect.facebook.net/en_US/all.js&#39;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.async = true;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; document.getElementById(&#39;fb-root&#39;).appendChild(e);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/script&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;script&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // This is to get the Access Token of FB&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; $(document).ready(function () {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setTimeout(function () {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //something you want delayed&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FB.getLoginStatus(function (response) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (response.status === &#39;connected&#39;) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var fbAccessToken = response.authResponse.accessToken;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; window.location = &#39;@Url.Action(&quot;ListFacebookFriends&quot;, &quot;People&quot;)&#39; + &quot;?id=&quot; + fbAccessToken;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }, 2000);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&amp;lt;/script&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
4. In above script we have made to fetch the access token of logged in FB user and passed it to an action of name &quot;ListFacebookFriends&quot; in same People Controller,&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp;public ActionResult ListFacebookFriends(string id)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //get current access token&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var accessToken = id;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;FacebookFriends&amp;gt; Friends = new List&amp;lt;FacebookFriends&amp;gt;();&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (accessToken != &quot;&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Friends = GetFriends(accessToken, false,&quot;&quot;).ToList();&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ViewBag.FbFriends = Friends;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return View();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
5. Create Function of name GetFriends&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;public IEnumerable&amp;lt;FacebookFriends&amp;gt; GetFriends(string accessToken, bool isUsing)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string strQuery = string.Empty;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (isUsing)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strQuery = &quot;SELECT uid, name, pic_square, email FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()) AND is_app_user&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strQuery = &quot;SELECT uid, name, pic_square, email FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()) AND NOT is_app_user&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FacebookClient objFQL = new FacebookClient(accessToken);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dynamic parameters = new ExpandoObject();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; parameters.q = strQuery;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dynamic objFNU = objFQL.Get(&quot;fql&quot;, parameters);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;FacebookFriends&amp;gt; friendsToReturn = new List&amp;lt;FacebookFriends&amp;gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (objFQL != null)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (dynamic row in objFNU.data)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&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; friendsToReturn.Add(new FacebookFriends()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&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; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&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; FriendID = Convert.ToString(row.uid),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&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; FriendName = row.name,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&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; PicURLSquare = row.pic_square,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&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; Email = row.email&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&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; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return friendsToReturn;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } //Get FB Friends not already using this app&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
6. Create class of name FacebookFriends.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public class FacebookFriends&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string FriendID { get; set; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string FriendName { get; set; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string PicURLSquare { get; set; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string ProfileLink { get; set; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public bool Follower { get; set; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string Email { get; set; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string UserName { get; set; }&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
7. Create view for action &quot;ListFacebookFriends&quot;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
@{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; ViewBag.Title = &quot;ListFacebookFriends&quot;;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;div id=&quot;main&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;div &amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div &amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h2&amp;gt;List of Facebook Friends&amp;lt;/h2&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div &amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div id=&quot;fb-root&quot; style=&quot;display:inline; margin-left:20px;&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Initialize facebook SDK&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; window.fbAsyncInit = function () {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FB.init({&lt;/div&gt;
&lt;div&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; appId: &#39;470021713099348&#39;,&lt;/div&gt;
&lt;div&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; status: true, cookie: false, xfbml: true, frictionlessRequests: true&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // All FB resources&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(document).ready(function () {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (document.getElementById(&#39;fb-root&#39;) != undefined) {&lt;/div&gt;
&lt;div&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; var e = document.createElement(&#39;script&#39;);&lt;/div&gt;
&lt;div&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; e.type = &#39;text/javascript&#39;;&lt;/div&gt;
&lt;div&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; e.src = document.location.protocol + &#39;//connect.facebook.net/en_US/all.js&#39;;&lt;/div&gt;
&lt;div&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; e.async = true;&lt;/div&gt;
&lt;div&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; document.getElementById(&#39;fb-root&#39;).appendChild(e);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Send Invite to friends&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function sendRequestToRecipients(targetid) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FB.ui({&lt;/div&gt;
&lt;div&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; method: &#39;apprequests&#39;,&lt;/div&gt;
&lt;div&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; message: &#39;Try Talentcubed.com&#39;,&lt;/div&gt;
&lt;div&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; description: &#39;Play Games Get Hired&#39;,&lt;/div&gt;
&lt;div&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; to: targetid&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }, requestCallback);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&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;method: &#39;feed&#39;,&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function requestCallback(response) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Handle callback here&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var uid = response[&#39;to&#39;];&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var link = $(&#39;#inv_&#39; + uid);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; link.removeAttr(&#39;href&#39;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#img_&quot; + uid).fadeOut();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(document).ready(function () {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#btnSearch&quot;).click(function () {&lt;/div&gt;
&lt;div&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; window.location = &#39;@Url.Action(&quot;Search&quot;, &quot;Wall&quot;)&#39; + &quot;?id=people&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/script&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div id=&quot;ListFbFriends&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;signupsearchTop&quot; style=&quot;display:none;&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input name=&quot;signupsearch&quot; id=&quot;signupsearch&quot; type=&quot;text&quot; size=&quot;18&quot; maxlength=&quot;150&quot; placeholder=&quot;search for&quot; class=&quot;signupfield&quot; /&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type=&quot;image&quot; src=&quot;/images/btnsearch.jpg&quot; name=&quot;image&quot; class=&quot;signupsearchbtn&quot; width=&quot;24&quot; height=&quot;21&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ul&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @foreach (var Friend in ViewBag.FbFriends)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&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;lt;li&amp;gt;&lt;/div&gt;
&lt;div&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;lt;div &amp;gt;&amp;lt;img src=&#39;@Friend.PicURLSquare&#39; alt=&#39;Friends&#39; /&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&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;lt;div &amp;gt;&amp;lt;p &amp;gt;@Friend.FriendName&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&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;lt;div &amp;gt;&lt;/div&gt;
&lt;div&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;lt;a href=&quot;javascript:sendRequestToRecipients(&#39;@Friend.FriendID&#39;);&quot; id=&quot;inv_@Friend.FriendID&quot;&amp;gt;Invite&amp;lt;/a&amp;gt;&lt;/div&gt;
&lt;div&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;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&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;lt;/li&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ul&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;!--row clearfix end --&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Enjoyyyyy...... !!!!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/4475622357781093024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/10/example-to-create-facebook-app-to-show.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/4475622357781093024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/4475622357781093024'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/10/example-to-create-facebook-app-to-show.html' title='Example to create Facebook App to show list of friends using FQL(Facebook Query Language) and send Invite in C# (MVC)'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-360678141025365990</id><published>2014-08-25T02:13:00.001-07:00</published><updated>2014-08-25T02:13:56.273-07:00</updated><title type='text'>Convert HTML content values to Object in C# using Html Agility Pack (HAP)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
In below code sample we are passing HTML in&amp;nbsp;variable of name dataStream, In HTML we have a table of which we made to convert &amp;lt;th&amp;gt; and &amp;lt;td&amp;gt; in objects directly, using HAP(Html Agility Pack) need to be added using Nuget Package in our Native Application.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Sample Code:&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
using HtmlAgilityPack;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
// Import Html table to datatable, Using “Html Agility Pack(Nuget)”&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;HtmlDocument doc = new HtmlDocument();&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;doc.LoadHtml(dataStream);&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;var headers = doc.DocumentNode.SelectNodes(“//tr/th”);&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
List&amp;lt;string&amp;gt; headingList = new List&amp;lt;string&amp;gt;();&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;List&amp;lt;string&amp;gt; valueList = new List&amp;lt;string&amp;gt;();&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
// Add th values in h&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;foreach (HtmlNode header in headers)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;{&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;var headText = header.InnerText; //Get head columns from th&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;headText = headText.Replace(“:”, “”); // Remove colon(:) sign from head text&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;headingList.Add(headText);&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
// Select rows with td elements&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;foreach (var row in doc.DocumentNode.SelectNodes(“//tr[td]“))&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;{&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;var valueText = row.SelectNodes(“td”).Select(td =&amp;gt; td.InnerText).ToArray();&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;var strValue = valueText[0].ToString();&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;valueList.Add(strValue);&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;}&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Reference Link:&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://htmlagilitypack.codeplex.com/&quot; style=&quot;border: 0px; box-sizing: border-box; color: #006bcf; font-size: 14px; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;http://htmlagilitypack.codeplex.com/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/360678141025365990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/08/convert-html-content-values-to-object.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/360678141025365990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/360678141025365990'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/08/convert-html-content-values-to-object.html' title='Convert HTML content values to Object in C# using Html Agility Pack (HAP)'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-4735442517547641688</id><published>2014-08-25T02:05:00.002-07:00</published><updated>2014-08-25T02:05:38.903-07:00</updated><title type='text'>Error Logging using ELMAH in Asp.Net Web Application completely pluggable</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Error Logging Modules And Handlers (ELMAH) offers another approach to logging runtime errors in a production environment.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
It can be dynamically added to a running Asp.Net web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Reference Links:&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
1.&amp;nbsp;&lt;a href=&quot;https://code.google.com/p/elmah/&quot; style=&quot;border: 0px; box-sizing: border-box; color: #006bcf; font-size: 14px; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;https://code.google.com/p/elmah/&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; box-sizing: border-box; color: #676767; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
2.&amp;nbsp;&lt;a href=&quot;http://www.asp.net/web-forms/tutorials/deployment/deploying-web-site-projects/logging-error-details-with-elmah-cs&quot; style=&quot;border: 0px; box-sizing: border-box; color: #006bcf; font-size: 14px; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;http://www.asp.net/web-forms/tutorials/deployment/deploying-web-site-projects/logging-error-details-with-elmah-cs&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/4735442517547641688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/08/error-logging-using-elmah-in-aspnet-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/4735442517547641688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/4735442517547641688'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/08/error-logging-using-elmah-in-aspnet-web.html' title='Error Logging using ELMAH in Asp.Net Web Application completely pluggable'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5329394702240796264.post-5950991846784652735</id><published>2014-08-20T23:20:00.001-07:00</published><updated>2014-08-20T23:20:27.993-07:00</updated><title type='text'>The type &#39;System.Data.Entity.DbContext&#39; is defined in an assembly that is not referenced.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I&#39;ve got one solution - The one project is class library with .edmx data model 
The other is asp.net MVC Web API project. &lt;br /&gt;
&lt;br /&gt;
when i start (Build) the solution I get the following exception:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcwyepWex_onXeBLUvAM_KOjO4MeTflDVGWRgf-HaGWdtg2Xoax3tGKo6f1jN1bH0m4qOEVMkSLMno-somVT5DG4iQdA7b_rRhaXMTLHqRk_YZN4D_oiJAz8c93dBvG8FkFU_nzmRVHhM/s1600/Error21Aug2014.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcwyepWex_onXeBLUvAM_KOjO4MeTflDVGWRgf-HaGWdtg2Xoax3tGKo6f1jN1bH0m4qOEVMkSLMno-somVT5DG4iQdA7b_rRhaXMTLHqRk_YZN4D_oiJAz8c93dBvG8FkFU_nzmRVHhM/s1600/Error21Aug2014.jpg&quot; height=&quot;109&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, to resolve this issue :&lt;br /&gt;
&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;votecell&quot;&gt;

            &lt;/td&gt;
            


&lt;td class=&quot;answercell&quot;&gt;
    &lt;div class=&quot;post-text&quot; itemprop=&quot;text&quot;&gt;
I suggest you to check&lt;br /&gt;
&lt;br /&gt;


&lt;code style=&quot;background-color: yellow;&quot;&gt;Allow NuGet to download missing packages during build&lt;/code&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8UXQmzY9S3A8CBtEBVPvSjwNFRfeVmsC0PFSodMib49_mBxdPG8Umc2WvSTyLzBHzzXRqHbeginWSYCGBvQbsPZPcn5JC7jsX8IxY8mPWFLdF7SBNWquSTnXRmsKoc9Nfy0SptoRITj8/s1600/Nuget.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8UXQmzY9S3A8CBtEBVPvSjwNFRfeVmsC0PFSodMib49_mBxdPG8Umc2WvSTyLzBHzzXRqHbeginWSYCGBvQbsPZPcn5JC7jsX8IxY8mPWFLdF7SBNWquSTnXRmsKoc9Nfy0SptoRITj8/s1600/Nuget.JPG&quot; height=&quot;187&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0r5mz5qx5WGbUAFlW4Lyn1nTd6YQSkdb__d5uQQWfAwRiIrEGpc-Qvu5o7GvVyvID2M8ZdiWldx2iXsDwAuyfwPwCvN2xV2FjRxDOH2G2of8RsxWux8Eyd3mvIi9Ik0-sMT0uJ5KZ2Z4/s1600/Nuget2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0r5mz5qx5WGbUAFlW4Lyn1nTd6YQSkdb__d5uQQWfAwRiIrEGpc-Qvu5o7GvVyvID2M8ZdiWldx2iXsDwAuyfwPwCvN2xV2FjRxDOH2G2of8RsxWux8Eyd3mvIi9Ik0-sMT0uJ5KZ2Z4/s1600/Nuget2.JPG&quot; height=&quot;362&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In this way I got resolved the issue.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://coderskey.blogspot.com/feeds/5950991846784652735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://coderskey.blogspot.com/2014/08/the-type-systemdataentitydbcontext-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/5950991846784652735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5329394702240796264/posts/default/5950991846784652735'/><link rel='alternate' type='text/html' href='http://coderskey.blogspot.com/2014/08/the-type-systemdataentitydbcontext-is.html' title='The type &#39;System.Data.Entity.DbContext&#39; is defined in an assembly that is not referenced.'/><author><name>Abhinav Ranjan Sinha</name><uri>http://www.blogger.com/profile/07492478211831240478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuO44johr1hOmKt_0moea7Kqli0uMmkTzpF45Vdq17gADlK2yJdd8eP8h1ygQBLgNEcxONc9z8KDydbcfb5YwDytE60uMdWLtPggfblgFZ8-BrqD7Q3NhLcMoR_kCaYgU/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcwyepWex_onXeBLUvAM_KOjO4MeTflDVGWRgf-HaGWdtg2Xoax3tGKo6f1jN1bH0m4qOEVMkSLMno-somVT5DG4iQdA7b_rRhaXMTLHqRk_YZN4D_oiJAz8c93dBvG8FkFU_nzmRVHhM/s72-c/Error21Aug2014.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>