<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Murat Odabasi</title><subtitle type="html" /><id>http://blogs.msdn.com/b/odabasi/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/odabasi/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/odabasi/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2012-05-04T13:03:00Z</updated><entry><title>Sharepoint 2013 Document Library Drag&amp;Drop feature requirements</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/odabasi/archive/2013/04/16/sharepoint-2013-document-library-drag-amp-drop-feature-requirements.aspx" /><id>http://blogs.msdn.com/b/odabasi/archive/2013/04/16/sharepoint-2013-document-library-drag-amp-drop-feature-requirements.aspx</id><published>2013-04-16T15:28:00Z</published><updated>2013-04-16T15:28:00Z</updated><content type="html">&lt;p&gt;One of the coolest new feature of Sharepoint 2013 is drag&amp;amp;drop functionality when uploading a file from your computer to a sharepoint library. But this has some limitations. Html 5 capable browser has this feature by default so if you have internet explorer 10 you can use it by default. But if you are using ie 8.x or 9.x you do not have this functionality by default.&amp;nbsp;You need an activex control named SharePoint DragUpload Control. In order to have this add on you need to install Office 2013 or installing sharepoint designer 2013 also does the job for you. So if we summarize these browsers&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Internet Explorer 10&lt;/li&gt;
&lt;li&gt;Internet Explorer&amp;nbsp;9&amp;nbsp;with Office 2013 or Sharepoint Designer 2013 installed&lt;/li&gt;
&lt;li&gt;Internet Explorer 8&amp;nbsp;with&amp;nbsp;Office 2013 or Sharepoint Designer 2013 installed&lt;/li&gt;
&lt;li&gt;FireFox&amp;nbsp;3.5 (or later)&lt;/li&gt;
&lt;li&gt;Chrome and Safari 5.x (or later)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;will do the job for you.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10411495" width="1" height="1"&gt;</content><author><name>Murat Odabasi</name><uri>http://blogs.msdn.com/odabasi_4000_kocaelispor.org/ProfileUrlRedirect.ashx</uri></author><category term="sharepoint 2013" scheme="http://blogs.msdn.com/b/odabasi/archive/tags/sharepoint+2013/" /><category term="sharepoint" scheme="http://blogs.msdn.com/b/odabasi/archive/tags/sharepoint/" /></entry><entry><title>Unable to view Sharepoint Web application General Settings</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/odabasi/archive/2012/12/28/unable-to-view-sharepoint-web-application-general-settings.aspx" /><id>http://blogs.msdn.com/b/odabasi/archive/2012/12/28/unable-to-view-sharepoint-web-application-general-settings.aspx</id><published>2012-12-28T15:27:00Z</published><updated>2012-12-28T15:27:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you try to open general settings of a web application in sharepoint and get an&amp;nbsp;error "Updates are currently disallowed on GET requests. To allow updates on a GET, set the 'AllowUnsafeUpdates' property on SPWeb.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;You can try this script from powershell.&lt;/p&gt;
&lt;p&gt;$myweb = &lt;span class="keywordhighlight"&gt;get&lt;/span&gt;-spwebapplication &lt;a href="http://mdotportal/"&gt;http://nameofproblemwebapp&lt;/a&gt; &lt;br /&gt;$myweb.HttpThrottleSettings&lt;br /&gt;$myweb.Update()&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10381169" width="1" height="1"&gt;</content><author><name>Murat Odabasi</name><uri>http://blogs.msdn.com/odabasi_4000_kocaelispor.org/ProfileUrlRedirect.ashx</uri></author><category term="sharepoint" scheme="http://blogs.msdn.com/b/odabasi/archive/tags/sharepoint/" /></entry><entry><title>Failed to install the product: Drive Name:\global\oserver.msi error code: 1603(0x643) error when installing sharepoint 2013</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/odabasi/archive/2012/12/28/failed-to-install-the-product-drive-name-global-oserver-msi-error-code-1603-0x643-error-when-istalling-sharepoint-2013.aspx" /><id>http://blogs.msdn.com/b/odabasi/archive/2012/12/28/failed-to-install-the-product-drive-name-global-oserver-msi-error-code-1603-0x643-error-when-istalling-sharepoint-2013.aspx</id><published>2012-12-28T15:20:00Z</published><updated>2012-12-28T15:20:00Z</updated><content type="html">&lt;p&gt;Today when installing a virtual development environment for Sharepoint 2013 I got&lt;/p&gt;
&lt;p&gt;"SharePoint Server 2013 encountered an error during setup"&amp;nbsp;&lt;/p&gt;
&lt;p&gt;error. When I checked the details of the error in error log file&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I found an entry&lt;/p&gt;
&lt;p&gt;"Failed to install the product: c:\global\oserver.msi error code: 1603(0x643) error when istalling sharepoint 2013"&lt;/p&gt;
&lt;p&gt;I tried many different things but the solution was very interesting:) Virtual machine was using just one CPU. After increasing the processor on virtual machine from 1 to 4 magic happened and installation finished successfully.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10381168" width="1" height="1"&gt;</content><author><name>Murat Odabasi</name><uri>http://blogs.msdn.com/odabasi_4000_kocaelispor.org/ProfileUrlRedirect.ashx</uri></author><category term="sharepoint 2013" scheme="http://blogs.msdn.com/b/odabasi/archive/tags/sharepoint+2013/" /></entry><entry><title>How many lines of code do i have?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/odabasi/archive/2012/08/28/how-many-lines-of-code-do-i-have.aspx" /><id>http://blogs.msdn.com/b/odabasi/archive/2012/08/28/how-many-lines-of-code-do-i-have.aspx</id><published>2012-08-28T14:31:19Z</published><updated>2012-08-28T14:31:19Z</updated><content type="html">&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;I am doing code reviews from time to time to my customers. When asking how lines of code do they have generally they do not know how to find it with an easy way.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Visual studio 2012 and 2010 has a cool feature called code metrics which you can use under analyze tab or just by right clicking the solution.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-72/5100.blog1.png"&gt;&lt;img alt="" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-72/5100.blog1.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Code metrics results shows you how many lines of code do you have. Also this report has some useful info that may help you. The maintability index ratio is calculated by a formula using Cyclomatic Complexity and lines of code. Bigger ratio means easier maintability. There is also a color in front of it which means&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Green&amp;nbsp;&amp;nbsp; High Maintainability&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;Between 20 and 100&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Yellow&amp;nbsp;&amp;nbsp; Moderate Maintainability&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Between 10 and 20&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Red&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Low Maintainability&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;Between 0 and 9&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Cyclomatic complexity measures the structural complexity of the code. High number for cyclomatic complexity indicates that the code may be too complex, and should be refactored.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Depth of inheritance indicates the number of class definitions that extend to the root of the class hierarcy.&lt;/p&gt;
&lt;p&gt;Class coupling indicates the total number of dependencies that a class has on other classes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10344188" width="1" height="1"&gt;</content><author><name>Murat Odabasi</name><uri>http://blogs.msdn.com/odabasi_4000_kocaelispor.org/ProfileUrlRedirect.ashx</uri></author><category term="code metrics" scheme="http://blogs.msdn.com/b/odabasi/archive/tags/code+metrics/" /><category term="visual studio" scheme="http://blogs.msdn.com/b/odabasi/archive/tags/visual+studio/" /></entry><entry><title>Secure Coding Basics</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/odabasi/archive/2012/05/04/secure-coding-basics.aspx" /><id>http://blogs.msdn.com/b/odabasi/archive/2012/05/04/secure-coding-basics.aspx</id><published>2012-05-04T10:03:00Z</published><updated>2012-05-04T10:03:00Z</updated><content type="html">&lt;p&gt;Most developers are reluctant to take the responsibility in security and assume that this is the job of web administrators and network engineers. You may have best infra in terms of security but if your developers are not writing secure code your system can easily be hacked.&lt;/p&gt;
&lt;p&gt;Security is a broad concept but I just want to give some simple examples and speak about best practices in secure code writing.&lt;/p&gt;
&lt;p&gt;First of all there is no fully secured system. If you want a fully secure system just turned off the server&lt;span style="font-family: Wingdings;"&gt;J&lt;/span&gt; &lt;br /&gt;What is our job in terms of security is making the attack surface smaller and making our systems much more secure. We should also keep in mind that security is an ongoing process and we should continuously review our applications in terms of security.&lt;/p&gt;
&lt;p&gt;Let's speak on some of the well known attack technics with examples;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sql Injection &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;SQL Injection happens when a malicious user manipulates the data input in such a manner to perform other operations against the database or any resource in the server. Think that we have a webpage asking for username and password and after validating this username and password we are authenticating the user.&lt;/p&gt;
&lt;p&gt;My sql query is ;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;string strQry = "SELECT Count(*) FROM M_USERS WHERE UserName='" + txtUser.Text + "' AND Password='" + txtPassword.Text + "'"; &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If the count is more than 0 this means password is correct and in normal scenario I will have a query like this&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.41gundedevrialem.com/blog/Lists/Photos/022512_2246_SecureCodin1.png"&gt;&lt;img style="max-width: 550px;" border="0" alt="" src="http://www.41gundedevrialem.com/blog/Lists/Photos/022512_2246_SecureCodin1.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;SELECT Count(*) FROM M_USERS WHERE UserName = 'KORFEZ' AND Password= 'pswd'; &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;But fraud login scenario an attacker can use such values and change the query&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.41gundedevrialem.com/blog/Lists/Photos/022512_2246_SecureCodin2.png"&gt;&lt;img style="max-width: 550px;" border="0" alt="" src="http://www.41gundedevrialem.com/blog/Lists/Photos/022512_2246_SecureCodin2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;SELECT Count(*) FROM M_USERS WHERE UserName='KORFEZ' Or 1=1 --' AND Password='XXXX &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;1=1 everytime and return of this query is more than 0 everytime&lt;span style="font-family: Wingdings;"&gt;J&lt;/span&gt; Attacker is in&amp;hellip;&lt;/p&gt;
&lt;p&gt;Take another example ;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.41gundedevrialem.com/blog/Lists/Photos/022512_2246_SecureCodin3.jpg"&gt;&lt;img style="max-width: 550px;" border="0" alt="" src="http://www.41gundedevrialem.com/blog/Lists/Photos/022512_2246_SecureCodin3.jpg" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a car passing through an automatic passing system (which is reading plate numbers) with a manipulated plate number&lt;span style="font-family: Wingdings;"&gt;J&lt;/span&gt; and dropping the database. This is just for humor but if you were the victim of such an attack it would not be funny for you&lt;span style="font-family: Wingdings;"&gt;J&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cross Site Scripting (XSS) &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;XSS exploit vulnerabilities in web page validation by injecting client-side script code into a vulnerable application.&lt;/p&gt;
&lt;p&gt;Let's continue with an example&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.41gundedevrialem.com/blog/Lists/Photos/022512_2246_SecureCodin4.png"&gt;&lt;img style="max-width: 550px;" border="0" alt="" src="http://www.41gundedevrialem.com/blog/Lists/Photos/022512_2246_SecureCodin4.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is an internet banking webpage to transfer money to another customer. I am adding a javascript to the description textbox.&lt;/p&gt;
&lt;p&gt;When the victim customer wants to see his/her transactions, an alert pops-up&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.41gundedevrialem.com/blog/Lists/Photos/022512_2246_SecureCodin5.png"&gt;&lt;img style="max-width: 550px;" border="0" alt="" src="http://www.41gundedevrialem.com/blog/Lists/Photos/022512_2246_SecureCodin5.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You may think that this is just a simple alert but I can also write a script which pops-up a site and send session id of the user and hijack user's session.&lt;/p&gt;
&lt;p&gt;There are more attack technics but what can we do in order not to be the victims of such attacks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Adopt the principle of least privilege&lt;/strong&gt;. The principle of least privilege requires that an individual, program or system process is not granted any more access privileges than are necessary to perform the task. Processes that run script or execute code should run under a least privileged account to limit the potential damage that can be done if the process is compromised.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Don't trust user input&lt;/strong&gt;. Applications should thoroughly validate all user input before performing operations with that input. The validation may include filtering out special characters. This preventive measure protects the application against accidental misuse or deliberate attacks by people who are attempting to inject malicious commands into the system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Don't rely on security by obscurity&lt;/strong&gt;. Trying to hide secrets by using misleading variable names or storing them in odd file locations does not provide security. In a game of hide-and-seek, it's better to use platform &lt;br /&gt;features or proven techniques for securing your data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Assume external systems are insecure&lt;/strong&gt;. If you don't own it, don't assume security is taken care of for you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reduce surface area&lt;/strong&gt;. Avoid exposing information that is not required. By doing so, you are potentially opening doors that can lead to additional vulnerabilities. Also, handle errors gracefully; don't expose any more information than is required when returning an error message to the end user.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fail to a secure mode&lt;/strong&gt;. If your application fails, make sure it does not leave sensitive data unprotected. Also, do not provide too much detail in error messages; meaning don't include details that could help an attacker exploit a vulnerability in your application. Write detailed error information to the Windows event log.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remember you are only as secure as your weakest link&lt;/strong&gt;. &lt;br /&gt;Security is a concern across all of your application tiers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10300894" width="1" height="1"&gt;</content><author><name>Murat Odabasi</name><uri>http://blogs.msdn.com/odabasi_4000_kocaelispor.org/ProfileUrlRedirect.ashx</uri></author><category term="security" scheme="http://blogs.msdn.com/b/odabasi/archive/tags/security/" /></entry></feed>