<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>SharePoint.BG: Radi Atanassov - English</title>
    <description>SharePoint на родна земя</description>
    <link>http://www.sharepoint.bg/radi/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.5.1.42</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://www.sharepoint.bg/radi/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>www.sharepoint.bg/radi</blogChannel:blink>
    <dc:creator>Radi Atanassov</dc:creator>
    <dc:title>SharePoint.BG: Radi Atanassov</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SharePointBG/RadiEng" /><feedburner:info uri="sharepointbg/radieng" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>Architecting your SharePoint application–things you shouldn’t miss out on</title>
      <description>&lt;p&gt;So a few people recommended I post my slides or content from my European SharePoint Conference session. I cover a list of considerations that makes a good reference for people undertaking the design of custom applications on SharePoint.&lt;/p&gt;
&lt;p&gt;Usually in projects you would have people responsible for the design of the infrastructure and then a development team would dig into the technical design of the SharePoint application. They will try to answer how different components will be used to satisfy the requirements. Solution Architects explore various options for meeting each requirement and all these options and choices intertwine into a proposed design, maybe a model or a proof of concept, and hopefully a document. Projects that miss this communication are either chaotic, or extremely agile.&lt;/p&gt;
&lt;p&gt;When doing architecture there is usually more than one possible way to achieve the same thing &amp;ndash; the &amp;ldquo;right&amp;rdquo; one will depend on the situation and each of the things I&amp;rsquo;m pointing out here could be equally right or wrong. This is especially true for SharePoint. That is why &amp;ldquo;awareness&amp;rdquo; and the knowledge of SharePoint are one of the key requirements for an architect to be any good.&lt;/p&gt;
&lt;p&gt;This list is not the ultimate list &amp;ndash; it is just my summary of what always lands on my table. It is also not the base for a definitive Technical Design document (it&amp;rsquo;s a start!). Some items below didn&amp;rsquo;t get mentioned in my talk as time was limiting what I could include.&lt;/p&gt;
&lt;h1&gt;Front-end Planning&lt;/h1&gt;
&lt;h2&gt;Page Model &amp;ndash; How you plan to store you (ASPX) pages&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Application Pages (_layouts) &lt;/li&gt;
&lt;li&gt;ASPX files served from a Document Library &lt;/li&gt;
&lt;li&gt;ASPX files in folders &lt;/li&gt;
&lt;li&gt;Publishing Infrastructure &amp;ndash; page layouts &lt;/li&gt;
&lt;li&gt;Consider Web Part Pages vs. Wiki Pages &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Form Strategy &amp;ndash; Consider how you will capture data and what controls/interfaces you will use&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Understand how SharePoint forms work and consider using SharePoint&amp;rsquo;s API&amp;rsquo;s &lt;/li&gt;
&lt;li&gt;SharePoint InputControls are great but may be difficult to use and may have limitations &lt;/li&gt;
&lt;li&gt;Consider exchanging data between forms. Plan Session and ViewState requirements &lt;/li&gt;
&lt;li&gt;SharePoint Scenario Framework &lt;/li&gt;
&lt;li&gt;Consider validation requirements and the UX on the validaiton &lt;/li&gt;
&lt;li&gt;Also consider Silverlight and InfoPath forms as alternatives for capturing data &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Client-Side Scripting &amp;ndash; plan out any requirements for client-side JavaScript&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;If using validation, plan out your client-side scripting and the use of any frameworks &lt;/li&gt;
&lt;li&gt;Will you use the Dialog Framework or any other popup/dialog framework/toolkit? &lt;/li&gt;
&lt;li&gt;Consider the use of jQuery, Modernizr, Knockout &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Page Components &amp;ndash; define what controls, web parts or other components you will use to create the actual interfaces&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Web Parts vs. User Controls &lt;/li&gt;
&lt;li&gt;SharePoint Rendering Templates and the Form UI (_controltemplates) &lt;/li&gt;
&lt;li&gt;Consider the styling/branding of your custom interfaces &amp;ndash; you don&amp;rsquo;t want your developers to be designers (unless they really are) &lt;/li&gt;
&lt;li&gt;Iframe &amp;ndash; various solutions use Iframes to display external content or components hosted elsewhere (plan out authentication) &lt;/li&gt;
&lt;li&gt;Consume HTML asynchronously &amp;ndash; I have seen solutions that grab HTML from an ASHX or other services &lt;/li&gt;
&lt;li&gt;InfoPath &amp;ndash; always think about the User Experience when you deal with InfoPath &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Resource Files &amp;ndash; evaluate how you will use resource files and what components will require localisation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Code-behind resource files &lt;/li&gt;
&lt;li&gt;ASPX resource files (14\Resources, AppGlobalResources) &lt;/li&gt;
&lt;li&gt;Feature Resources &lt;/li&gt;
&lt;li&gt;Localised Web Templates &lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Back-end Planning&lt;/h1&gt;
&lt;h2&gt;SharePoint Data Model &amp;ndash; define the storage of data&lt;/h2&gt;
&lt;p&gt;Consider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How are you going to store data? &lt;/li&gt;
&lt;li&gt;How will it scale? &lt;/li&gt;
&lt;li&gt;How are you going to access it? (SP OM, External Data (BCS), Web Service calls) &lt;/li&gt;
&lt;li&gt;How are you going to &amp;ldquo;replicate&amp;rdquo; it? (backup, archive, move/copy, log) &lt;/li&gt;
&lt;li&gt;How are you going to store applicaiton settings (SP list, P&amp;amp;P Settings) &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Visual Studio Solution Structure &amp;ndash; How will you structure code and artefacts&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Number of WSPs/Number of Features &lt;/li&gt;
&lt;li&gt;Separation of code &lt;/li&gt;
&lt;li&gt;Separation of SharePoint items &lt;/li&gt;
&lt;li&gt;Namespaces and naming conventions &lt;/li&gt;
&lt;li&gt;Source Control strategy &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Design Patterns/Anti-Patterns &amp;ndash; make your code maintainable and nice if it makes sense to do so&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;SharePoint Service Locator (P&amp;amp;P) &lt;/li&gt;
&lt;li&gt;Fa&amp;ccedil;ade/Adapter &lt;/li&gt;
&lt;li&gt;Consider/plan your data access layer &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Security Model &amp;ndash; don&amp;rsquo;t think about it in production&lt;/h2&gt;
&lt;p&gt;AuthN:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Kerberos/NTLM (consider the requirement for Kerberos) &lt;/li&gt;
&lt;li&gt;Claims (consider the effort to pull it off and any side-effects) &lt;/li&gt;
&lt;li&gt;Plan the use of service accounts and access for/to external systems &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AuthZ:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use SP groups or AD groups? &lt;/li&gt;
&lt;li&gt;Nested groups &lt;/li&gt;
&lt;li&gt;Do you really need item-level security? &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Exception Handling and Logging &amp;ndash; define how to display/capture errors and how you log them&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Consider how you will display errors to the user (don&amp;rsquo;t do lblMessage.Text = ex.ToString(); ) &lt;/li&gt;
&lt;li&gt;Define what needs to be logged and how &lt;/li&gt;
&lt;li&gt;SharePoint Logger (P&amp;amp;P) gives you a good API for Diagnostic categories and areas &lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Deployment&lt;/h1&gt;
&lt;h2&gt;Solution Deployment Frameworks &amp;ndash; define how your developers will deploy&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;MSBuild &lt;/li&gt;
&lt;li&gt;NAnt &lt;/li&gt;
&lt;li&gt;100% PowerShell &lt;/li&gt;
&lt;li&gt;CKS-Dev addin&amp;nbsp; for Visual Studio 2010 &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Other Knobs and Dials &amp;ndash; there are many other things that affect deployment&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;WSP lifecycle &lt;/li&gt;
&lt;li&gt;Feature activation &lt;/li&gt;
&lt;li&gt;Activate on Default &lt;/li&gt;
&lt;li&gt;Deployment configuration &lt;/li&gt;
&lt;li&gt;WSP additional DLL's &lt;/li&gt;
&lt;li&gt;Force on Activate &lt;/li&gt;
&lt;li&gt;Safe Controls &lt;/li&gt;
&lt;li&gt;Web.config modifications &lt;/li&gt;
&lt;li&gt;Web Part deployment &lt;/li&gt;
&lt;li&gt;List re-creation &lt;/li&gt;
&lt;li&gt;Feature Upgrade &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Site Templates &amp;ndash; reusable functionality that admins or end users could provision&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Site Definitions &lt;/li&gt;
&lt;li&gt;Web Templates &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Continuous Integration and Testing&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Plan and define the CI/Build process &lt;/li&gt;
&lt;li&gt;Always consider how you will upgrade the solution &lt;/li&gt;
&lt;li&gt;Define the unit testing and mocking requirements (Pex &amp;amp; Moles, TypeMock) &lt;/li&gt;
&lt;li&gt;Funcitonal UI Testing (Selenium, Coded UI, Telerik Test Suite) &lt;/li&gt;
&lt;li&gt;Always sync with the test team and what they do/how they will test your solution &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To close off the talk I finished off with a few tips:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build applications in such a way that makes you feel proud of what you have built. Doctors feel good when they help people, architects feel good when their creation is built, lawyers are happy when they get paid &amp;ndash; there is no reason why SharePoint developers and architects shouldn&amp;rsquo;t feel good about what they do if they do it well. &lt;/li&gt;
&lt;li&gt;Motivate your team to do good work &amp;ndash; As an architect you are most likely a role model. Do your best to motivate your team members to be champions and get good stuff out there. Reward them for good efforts. &lt;/li&gt;
&lt;li&gt;Change your job if your boss/architect/team leader/project manager is pressuring you to do crap work with no process around it, no scope, no clarity, no design, etc. Your SharePoint career is way to short for you to be doing crap work in crap teams. Only you could make that change. &lt;/li&gt;
&lt;li&gt;Apply development practices and architecture to SharePoint solutions &amp;ndash; many say that there is no real development in SharePoint. It&amp;rsquo;s true that there is a lot of &amp;ldquo;other stuff&amp;rdquo; in SharePoint projects, but for the development part &amp;ndash; make it count. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is my slide deck: &lt;a title="SharePoint Solution Architecture &amp;ndash; Radi Atanassov" href="https://skydrive.live.com/?cid=a4ce5f9a862fcadb&amp;amp;sc=documents&amp;amp;uc=1&amp;amp;id=A4CE5F9A862FCADB%21736#" target="_blank"&gt;SharePoint Solution Architecture &amp;ndash; Radi Atanassov&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;During my talk I showed bits of a solution I use to POC various SharePoint components. I use it to explain and demonstrate things to students, forums and colleagues. I call it Community.SharePoint and as soon as it has a few other key components I will post it on CodePlex.&lt;/p&gt;
&lt;p&gt;Here is the version I used at the European SharePoint Conference: &lt;a title="Community.SharePoint-EUSPC" href="https://skydrive.live.com/?cid=a4ce5f9a862fcadb&amp;amp;sc=documents&amp;amp;uc=1&amp;amp;id=A4CE5F9A862FCADB%21736#" target="_blank"&gt;Community.SharePoint-EUSPC&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps someone!&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/SharePointBG/RadiEng/~3/-gmQcxxoxQ4/post.aspx</link>
      <author>Ради Атанасов</author>
      <comments>http://www.sharepoint.bg/radi/post/Architecting-your-SharePoint-application-things-you-shouldnt-miss-out-on.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sharepoint.bg/radi/post.aspx?id=eff1a643-7ada-4ed0-8aaa-0a83e7998995</guid>
      <pubDate>Mon, 24 Oct 2011 03:57:00 +1200</pubDate>
      <category>English</category>
      <dc:publisher>Ради Атанасов</dc:publisher>
      <pingback:server>http://www.sharepoint.bg/radi/pingback.axd</pingback:server>
      <pingback:target>http://www.sharepoint.bg/radi/post.aspx?id=eff1a643-7ada-4ed0-8aaa-0a83e7998995</pingback:target>
      <slash:comments>20</slash:comments>
      <trackback:ping>http://www.sharepoint.bg/radi/trackback.axd?id=eff1a643-7ada-4ed0-8aaa-0a83e7998995</trackback:ping>
      <wfw:comment>http://www.sharepoint.bg/radi/post/Architecting-your-SharePoint-application-things-you-shouldnt-miss-out-on.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sharepoint.bg/radi/syndication.axd?post=eff1a643-7ada-4ed0-8aaa-0a83e7998995</wfw:commentRss>
    <feedburner:origLink>http://www.sharepoint.bg/radi/post.aspx?id=eff1a643-7ada-4ed0-8aaa-0a83e7998995</feedburner:origLink></item>
    <item>
      <title>European SharePoint Conference is over!</title>
      <description>&lt;p&gt;Now that the conference is over I can finally take a moment and rest before the week starts. #EuropeanSP was a great adventure full of learnings, laughs, new contacts, new opportunities, plenty of fun and drinks. I got to meet many SharePoint heroes whom I haven&amp;rsquo;t met before and managed to exchange some cool gossip. Conferences like these really demonstrate how much SharePoint has grown not only as a product with features, but as a product with a community, a following, a resource gap and a HUGE market.&lt;/p&gt;
&lt;p&gt;My talk was targeted towards SharePoint solution architects and developers who get to design their custom applications. My main driver for picking this topic was questions I get in the fashion of &amp;ldquo;How do you design your solutions?&amp;rdquo; or &amp;ldquo;What do you do when people throw you a set of requirements?&amp;rdquo;.&amp;nbsp; I was very happy with the turnout and I got really good feedback from some people.&lt;/p&gt;
&lt;p&gt;I will be writing a new blog post with the content, code and slides.&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/SharePointBG/RadiEng/~3/_A7IZdvj-0g/post.aspx</link>
      <author>Ради Атанасов</author>
      <comments>http://www.sharepoint.bg/radi/post/European-SharePoint-Conference-is-over!.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sharepoint.bg/radi/post.aspx?id=0a9b0978-283c-48a5-9820-2a057b325777</guid>
      <pubDate>Mon, 24 Oct 2011 03:56:00 +1200</pubDate>
      <category>English</category>
      <dc:publisher>Ради Атанасов</dc:publisher>
      <pingback:server>http://www.sharepoint.bg/radi/pingback.axd</pingback:server>
      <pingback:target>http://www.sharepoint.bg/radi/post.aspx?id=0a9b0978-283c-48a5-9820-2a057b325777</pingback:target>
      <slash:comments>9</slash:comments>
      <trackback:ping>http://www.sharepoint.bg/radi/trackback.axd?id=0a9b0978-283c-48a5-9820-2a057b325777</trackback:ping>
      <wfw:comment>http://www.sharepoint.bg/radi/post/European-SharePoint-Conference-is-over!.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sharepoint.bg/radi/syndication.axd?post=0a9b0978-283c-48a5-9820-2a057b325777</wfw:commentRss>
    <feedburner:origLink>http://www.sharepoint.bg/radi/post.aspx?id=0a9b0978-283c-48a5-9820-2a057b325777</feedburner:origLink></item>
    <item>
      <title>My Session at the #EuropeanSP Conference</title>
      <description>&lt;p&gt;I&amp;rsquo;m at the Estrel hotel in Berlin on the tutorial day of European SharePoint Conference. Most people will be arriving today &amp;ndash; you can definitely feel the SharePoint vibe in the air. The Estrel Convention is absolutely HUGE, walking around this place is a calorie-burning experience!&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m engaged in a few activites:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wednesday 19th October 15:00 &amp;ndash; Ask the Expert Session &amp;ndash; IT Decision Makers&lt;/li&gt;
&lt;li&gt;Thursday 20th October 11:15 &amp;ndash; Ask the Expert Session &amp;ndash; Developers&lt;/li&gt;
&lt;li&gt;Thursday 20th October 14:00 &amp;ndash; &lt;a title="Advanced SharePoint Solution Architecture &amp;amp; Development" href="http://sharepointeurope.com/conferences/session-details.aspx?sessionId=96"&gt;Advanced Solution Architecture &amp;amp; Development &lt;/a&gt;&amp;ndash; my talk for this conference.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please come and say hello!&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/SharePointBG/RadiEng/~3/LPskBpO51oM/post.aspx</link>
      <author>Ради Атанасов</author>
      <comments>http://www.sharepoint.bg/radi/post/My-Session-at-EuropeanSP-Conference.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sharepoint.bg/radi/post.aspx?id=e5b225de-3e2c-4b7e-85ed-ab8f89a316a3</guid>
      <pubDate>Mon, 17 Oct 2011 21:23:00 +1200</pubDate>
      <category>English</category>
      <dc:publisher>Ради Атанасов</dc:publisher>
      <pingback:server>http://www.sharepoint.bg/radi/pingback.axd</pingback:server>
      <pingback:target>http://www.sharepoint.bg/radi/post.aspx?id=e5b225de-3e2c-4b7e-85ed-ab8f89a316a3</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://www.sharepoint.bg/radi/trackback.axd?id=e5b225de-3e2c-4b7e-85ed-ab8f89a316a3</trackback:ping>
      <wfw:comment>http://www.sharepoint.bg/radi/post/My-Session-at-EuropeanSP-Conference.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sharepoint.bg/radi/syndication.axd?post=e5b225de-3e2c-4b7e-85ed-ab8f89a316a3</wfw:commentRss>
    <feedburner:origLink>http://www.sharepoint.bg/radi/post.aspx?id=e5b225de-3e2c-4b7e-85ed-ab8f89a316a3</feedburner:origLink></item>
    <item>
      <title>I’m presenting a SharePoint Conference Webinar in 4 hours!</title>
      <description>&lt;p&gt;I just wanted to post up info on a webinar I am delivering as part of the European SharePoint Conference program.&lt;/p&gt;
&lt;p&gt;I will be talking about SharePoint Architecture, what it is, who are the &amp;ldquo;architects&amp;rdquo;, what their challenges are, how they make decisions and how their decisions impact the progress of a project.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Join me here&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;Thursday 8th September, 11am CET&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SharePoint Solution Architecture - Introduction and Fundamentals &lt;/strong&gt;Presented by &lt;strong&gt;Radi Atanassov&lt;/strong&gt;, MCM -SharePoint 2010, MVP, MCT, OneBit Consulting, Bulgaria&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://r20.rs6.net/tn.jsp?llr=f6w99deab&amp;amp;et=1107080715137&amp;amp;s=0&amp;amp;e=0018vpzZ9kf_FtFMfEMACZHMCqmkLJXn9DE6WTQdyQrSqGxxUz17Ylxy9UbBKXIGz7lGDxJhwk9oHX1VH5folVesPcoGBXdSROk2KkCSD7J5LT4Kjt2N3cWVatjdMF6tCWEsS8Zbpe8kM0WL8kkOpbnH_Edl6XZWBDB0aQlr0D72e2MkSn4cqcreFgTlxkCVbE6vQsbCcIZuEQletQIGDyecS9nKX_xzn3WfTYNxJ_TZSrBbalq0kxtDud3BLC_0sRa"&gt;Register Now &amp;gt;&amp;gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/SharePointBG/RadiEng/~3/EAMf4uGlHj4/post.aspx</link>
      <author>Ради Атанасов</author>
      <comments>http://www.sharepoint.bg/radi/post/Im-presenting-a-SharePoint-Conference-Webinar-in-4-hours!.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sharepoint.bg/radi/post.aspx?id=db1f6eff-5603-4024-9e51-928302200614</guid>
      <pubDate>Thu, 08 Sep 2011 17:13:00 +1200</pubDate>
      <category>English</category>
      <dc:publisher>Ради Атанасов</dc:publisher>
      <pingback:server>http://www.sharepoint.bg/radi/pingback.axd</pingback:server>
      <pingback:target>http://www.sharepoint.bg/radi/post.aspx?id=db1f6eff-5603-4024-9e51-928302200614</pingback:target>
      <slash:comments>6</slash:comments>
      <trackback:ping>http://www.sharepoint.bg/radi/trackback.axd?id=db1f6eff-5603-4024-9e51-928302200614</trackback:ping>
      <wfw:comment>http://www.sharepoint.bg/radi/post/Im-presenting-a-SharePoint-Conference-Webinar-in-4-hours!.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sharepoint.bg/radi/syndication.axd?post=db1f6eff-5603-4024-9e51-928302200614</wfw:commentRss>
    <feedburner:origLink>http://www.sharepoint.bg/radi/post.aspx?id=db1f6eff-5603-4024-9e51-928302200614</feedburner:origLink></item>
    <item>
      <title>Custom WCF Services and setting Reader Quotas in SharePoint 2010</title>
      <description>&lt;p&gt;I&amp;rsquo;ve been working quite a bit with custom WCF services in SharePoint 2010 and have found there&amp;rsquo;s quite a bit to it. The part that worries me is that there is a ton of information out there that is not always best for enterprise scenarios, like setting the site in IIS to anonymous just to get service calls working.&lt;/p&gt;
&lt;p&gt;Anyway&amp;hellip; I was trying to figure out why the reader quota settings weren&amp;rsquo;t getting applied to our services. We had the following debug code:&lt;/p&gt;
&lt;div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:71a113ef-7b9c-4155-bdc5-15277de972dd" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px"&gt;
&lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt;
&lt;div style="background: #fff; max-height: 300px; overflow: auto"&gt;&lt;ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px;"&gt;
&lt;li&gt;&lt;span style="color:#2b91af"&gt;SPWebService&lt;/span&gt; contentService = &lt;span style="color:#2b91af"&gt;SPWebService&lt;/span&gt;.ContentService;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;contentService.ClientRequestServiceSettings.MaxReceivedMessageSize = -1;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span style="color:#2b91af"&gt;SPWcfServiceSettings&lt;/span&gt; wcfServiceSettings = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;SPWcfServiceSettings&lt;/span&gt;();&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;wcfServiceSettings.ReaderQuotasMaxStringContentLength = &lt;span style="color:#2b91af"&gt;Int32&lt;/span&gt;.MaxValue;&lt;/li&gt;
&lt;li&gt;wcfServiceSettings.ReaderQuotasMaxArrayLength = &lt;span style="color:#2b91af"&gt;Int32&lt;/span&gt;.MaxValue;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;wcfServiceSettings.ReaderQuotasMaxBytesPerRead = &lt;span style="color:#2b91af"&gt;Int32&lt;/span&gt;.MaxValue;&lt;/li&gt;
&lt;li&gt;wcfServiceSettings.MaxReceivedMessageSize = &lt;span style="color:#2b91af"&gt;Int32&lt;/span&gt;.MaxValue;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;wcfServiceSettings.MaxBufferSize = &lt;span style="color:#2b91af"&gt;Int32&lt;/span&gt;.MaxValue;&lt;/li&gt;
&lt;li&gt;wcfServiceSettings.ReaderQuotasMaxDepth = &lt;span style="color:#2b91af"&gt;Int32&lt;/span&gt;.MaxValue;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;wcfServiceSettings.ReaderQuotasMaxNameTableCharCount = &lt;span style="color:#2b91af"&gt;Int32&lt;/span&gt;.MaxValue;&lt;/li&gt;
&lt;li&gt;wcfServiceSettings.ReceiveTimeout = &lt;span style="color:#2b91af"&gt;TimeSpan&lt;/span&gt;.MaxValue;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;contentService.WcfServiceSettings[&lt;span style="color:#a31515"&gt;"MyService.svc"&lt;/span&gt;] = wcfServiceSettings;&lt;/li&gt;
&lt;li style="background: #f3f3f3"&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;contentService.Update(&lt;span style="color:#0000ff"&gt;true&lt;/span&gt;);&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This was placed in a feature scoped at the web application level, and the WSP was deploying to /ISAPI/CustomWcf/MyService.svc&amp;rdquo;. We we&amp;rsquo;re using SharePoint&amp;rsquo;s MultipleBaseAddressBasicHttpBindingServiceHostFactory factory, and if you are you don&amp;rsquo;t need to set anonymous in IIS.&amp;nbsp; This factory applies your security settings as they are on the web application.&lt;/p&gt;
&lt;p&gt;So why weren&amp;rsquo;t our WCF Service settings getting applied? If you check out this MSDN article, it doesn&amp;rsquo;t actually tell you what I figured out:&lt;a title="http://msdn.microsoft.com/en-us/library/ff599489.aspx" href="http://msdn.microsoft.com/en-us/library/ff599489.aspx"&gt;http://msdn.microsoft.com/en-us/library/ff599489.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The problem is that &amp;ldquo;MyService.svc&amp;rdquo; should &lt;strong&gt;actually be lower case&lt;/strong&gt;: &amp;ldquo;myservice.svc&amp;rdquo;. It sounds silly, but that is what worked for me. The /CustomWcf/ folder part should be excluded.&lt;/p&gt;
&lt;p&gt;If anyone is doing the same, here are a few tips on how such deployment strategy could be improved:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The feature should really be at a farm level if it is modifying settings on the Content Service. There is one per farm. &lt;/li&gt;
&lt;li&gt;Feature Deactivation code should call contentService.WcfServiceSettings.Remove("myservice.svc"); &lt;/li&gt;
&lt;li&gt;You &lt;strong&gt;SHOULD NOT&lt;/strong&gt; just use Int32.MaxValue, but actually figure out your maximums and what exact properties you should apply them on. In my example I&amp;rsquo;m obviously trying to get a sample to work. &lt;/li&gt;
&lt;li&gt;Make sure your deactivation doesn&amp;rsquo;t break any other solution if you are resetting with this line: contentService.ClientRequestServiceSettings.MaxReceivedMessageSize = 0; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/SharePointBG/RadiEng/~3/91QfB1R8DE4/post.aspx</link>
      <author>Ради Атанасов</author>
      <comments>http://www.sharepoint.bg/radi/post/Custom-WCF-Services-and-setting-Reader-Quotas-in-SharePoint-2010.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sharepoint.bg/radi/post.aspx?id=a5210c59-48df-40ab-b175-9eef6b43d2c1</guid>
      <pubDate>Sun, 28 Aug 2011 19:55:00 +1200</pubDate>
      <category>English</category>
      <dc:publisher>Ради Атанасов</dc:publisher>
      <pingback:server>http://www.sharepoint.bg/radi/pingback.axd</pingback:server>
      <pingback:target>http://www.sharepoint.bg/radi/post.aspx?id=a5210c59-48df-40ab-b175-9eef6b43d2c1</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.sharepoint.bg/radi/trackback.axd?id=a5210c59-48df-40ab-b175-9eef6b43d2c1</trackback:ping>
      <wfw:comment>http://www.sharepoint.bg/radi/post/Custom-WCF-Services-and-setting-Reader-Quotas-in-SharePoint-2010.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sharepoint.bg/radi/syndication.axd?post=a5210c59-48df-40ab-b175-9eef6b43d2c1</wfw:commentRss>
    <feedburner:origLink>http://www.sharepoint.bg/radi/post.aspx?id=a5210c59-48df-40ab-b175-9eef6b43d2c1</feedburner:origLink></item>
    <item>
      <title>“Activate on Default” confusion and features scoped at Web Application level</title>
      <description>&lt;p&gt;When creating SharePoint features in Visual Studio 2010, one of the settings that defaults to &lt;strong&gt;True&lt;/strong&gt; is &amp;ldquo;Activate on Default&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharepoint.bg/radi/image.axd?picture=image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" src="http://www.sharepoint.bg/radi/image.axd?picture=image_thumb_4.png" border="0" alt="image" width="343" height="151" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is a lot of confusion as to what this setting actually does:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It ONLY applies to features scoped at &lt;strong&gt;Farm&lt;/strong&gt; and &lt;strong&gt;Web Application&lt;/strong&gt; levels. You can still modify it for other features, but it doesn&amp;rsquo;t do anything.&lt;/li&gt;
&lt;li&gt;Any feature (Farm or WebApplication) with that setting set to True will &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;automatically activate when you deploy the WSP solution,&lt;/span&gt;&lt;/strong&gt; no matter which way you deploy it (Install-SPSolution, stsasm.exe, Central Administration)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This setting is not related to the deployment configuration settings in Visual Studio 2010:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001_12.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001" src="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001_thumb_12.png" border="0" alt="clip_image001" width="399" height="264" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;These features will still activate, even if VS&amp;rsquo;s deployment configuration is set to &amp;ldquo;No Activation&amp;rdquo;.&lt;/p&gt;
&lt;h2&gt;Where can this be an inconvenience?&lt;/h2&gt;
&lt;p&gt;When you create features that deploy &lt;strong&gt;Timer Jobs&lt;/strong&gt; at the &lt;strong&gt;Web Application&lt;/strong&gt; level, you really want to have &amp;ldquo;Activate on Default&amp;rdquo; set to &lt;strong&gt;False&lt;/strong&gt;. Otherwise, your feature will be activated on ALL web applications. I did some tests and found out that even if your WSP Solution is not global and is deployed to a specific Web Application, your feature will still get activated. Dangerous, you really want your Timer Jobs to be running where they are meant to run, i.e. don&amp;rsquo;t deploy Timer Jobs to Central Administration unless you really need to.&lt;/p&gt;
&lt;p&gt;If you are ever trying to find out why your Timer Jobs are &amp;ldquo;attached&amp;rdquo; to all web applications, this might be why.&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/SharePointBG/RadiEng/~3/ud-KypwcxeU/post.aspx</link>
      <author>Ради Атанасов</author>
      <comments>http://www.sharepoint.bg/radi/post/Activate-on-Default-confusion-and-features-scoped-at-Web-Application-level.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sharepoint.bg/radi/post.aspx?id=87e0e96d-c001-4edb-a4fc-d94cb36e661f</guid>
      <pubDate>Sat, 23 Jul 2011 14:59:00 +1200</pubDate>
      <category>English</category>
      <dc:publisher>Ради Атанасов</dc:publisher>
      <pingback:server>http://www.sharepoint.bg/radi/pingback.axd</pingback:server>
      <pingback:target>http://www.sharepoint.bg/radi/post.aspx?id=87e0e96d-c001-4edb-a4fc-d94cb36e661f</pingback:target>
      <slash:comments>11</slash:comments>
      <trackback:ping>http://www.sharepoint.bg/radi/trackback.axd?id=87e0e96d-c001-4edb-a4fc-d94cb36e661f</trackback:ping>
      <wfw:comment>http://www.sharepoint.bg/radi/post/Activate-on-Default-confusion-and-features-scoped-at-Web-Application-level.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sharepoint.bg/radi/syndication.axd?post=87e0e96d-c001-4edb-a4fc-d94cb36e661f</wfw:commentRss>
    <feedburner:origLink>http://www.sharepoint.bg/radi/post.aspx?id=87e0e96d-c001-4edb-a4fc-d94cb36e661f</feedburner:origLink></item>
    <item>
      <title>I’m a SharePoint Server MVP!!!</title>
      <description>&lt;p&gt;It was near the end of my working day, I was just about to do code reviews and catch-ups with my team, when I got the email:&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Congratulations! We are pleased to present you with the 2011 Microsoft&amp;reg; MVP Award!&amp;rdquo;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;img src="http://www.sharepoint.bg/radi/image.axd?picture=2011%2f7%2fmvp.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;My excitement is warranted &amp;ndash; it is my first time. I feel honoured and would like to thank everyone who contributed towards my nomination and my eventual award.&lt;/p&gt;
&lt;p&gt;I am grateful for all the people who inspire, challenge, listen, support, influence and motivate me to do my work. To me this award is really about you.&lt;/p&gt;
&lt;p&gt;Just like the Master award, and like every other achievement, its not an end, but a start to new goals and targets. Becoming a SharePoint MCM was a real achievement, but it was more a beginning to new paths &amp;ndash; people expect you to know, do the right thing, always solve the problems, give the right advice. Being a Master means you always have to be up-to-date, always know what's new, always aim to provide the best possible architecture and solution to customers, write the best code even, you must know what buttons to push and what levers to pull, and if you don&amp;rsquo;t know you must know where to get the answers. To me, becoming an MVP is similar &amp;ndash; there&amp;rsquo;s a community out there and MVP&amp;rsquo;s support it. They develop it and inspire individuals. I&amp;rsquo;ve been &amp;ldquo;crowned&amp;rdquo; an MVP - now it&amp;rsquo;s my job to make the great community greater.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/SharePointBG/RadiEng/~3/xX2-inkjewA/post.aspx</link>
      <author>Ради Атанасов</author>
      <comments>http://www.sharepoint.bg/radi/post/Im-a-SharePoint-Server-MVP!!!.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sharepoint.bg/radi/post.aspx?id=a406dd1c-a649-4bed-89fa-095901916c0f</guid>
      <pubDate>Sun, 03 Jul 2011 08:30:00 +1200</pubDate>
      <category>English</category>
      <dc:publisher>Ради Атанасов</dc:publisher>
      <pingback:server>http://www.sharepoint.bg/radi/pingback.axd</pingback:server>
      <pingback:target>http://www.sharepoint.bg/radi/post.aspx?id=a406dd1c-a649-4bed-89fa-095901916c0f</pingback:target>
      <slash:comments>12</slash:comments>
      <trackback:ping>http://www.sharepoint.bg/radi/trackback.axd?id=a406dd1c-a649-4bed-89fa-095901916c0f</trackback:ping>
      <wfw:comment>http://www.sharepoint.bg/radi/post/Im-a-SharePoint-Server-MVP!!!.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sharepoint.bg/radi/syndication.axd?post=a406dd1c-a649-4bed-89fa-095901916c0f</wfw:commentRss>
    <feedburner:origLink>http://www.sharepoint.bg/radi/post.aspx?id=a406dd1c-a649-4bed-89fa-095901916c0f</feedburner:origLink></item>
    <item>
      <title>Fun with HTTP Handlers, Security Validations, FormDigest, AllowUnsafeUpdates, jQuery, AJAX and POST parameters in SharePoint</title>
      <description>&lt;p&gt;Ever seen this error message?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;System.Exception: Microsoft.SharePoint.SPException: The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It is usually related to a missing SharePoint &lt;strong&gt;FormDigest&lt;/strong&gt; control, or updates to the DB on an HTTP GET request. You might hear people saying you should set &lt;strong&gt;AllowUnsafeUpdates&lt;/strong&gt; to true, but in the case of a POST request that is not the best thing you could do. The &lt;span style="text-decoration: underline;"&gt;best resource that you could ever read&lt;/span&gt; on the topic is written a while back (in 2008!) by a good friend of mine and ex colleague - &lt;strong&gt;&lt;a href="http://hristopavlov.wordpress.com/"&gt;Hristo Pavlov&lt;/a&gt;&lt;/strong&gt;. These two posts are your best starting point if you want to understand what these items are for and how they achieve their purpose.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://hristopavlov.wordpress.com/2008/05/16/what-you-need-to-know-about-allowunsafeupdates/"&gt;What You Need To Know About AllowUnsafeUpdates (Part 1)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://hristopavlov.wordpress.com/2008/05/21/what-you-need-to-know-about-allowunsafeupdates-part-2/"&gt;What You Need To Know About AllowUnsafeUpdates (Part 2)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Generally speaking, &lt;strong&gt;AllowUnsafeUpdates = true&lt;/strong&gt; on POST shouldn&amp;rsquo;t be required at all. I was working with my team on an HTTP Handler living in the SharePoint Layouts folder and it was failing with the security validation exception. In a typical ASPX web page you would include the SharePoint FormDigest control and SharePoint will handle it from there onwards:&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #800000;"&gt;SharePoint&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #800000;"&gt;FormDigest&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;"&gt;runat&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9.5pt;"&gt;="server"/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas; color: #0000ff;"&gt;&lt;span style="font-family: "&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;You will notice the output of this control is a hidden &amp;lt;input&amp;gt; like this one:&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&amp;lt;input name="__REQUESTDIGEST" id="__REQUESTDIGEST" type="hidden" value="0xDA527A96&amp;hellip;A23,22 Apr 2011 14:17:06 -0000"/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;SharePoint will use this control (in particular the parameter &lt;strong&gt;__REQUESTDIGEST&lt;/strong&gt;) and validate the &amp;ldquo;FormDigest&amp;rdquo;. You can explicitly call the &lt;strong&gt;SPUtility.ValidateFormDigest()&lt;/strong&gt; helper method achieves the same. (See Hristo&amp;rsquo;s blog posts for more info on how it works). It basically takes the __REQUESTDIGEST value and validates it on the request object.&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;But in an HTTP Handler you don&amp;rsquo;t have the &amp;lt;SharePoint:FormDigest /&amp;gt; control as there is no ASPX. Developers can get the handler working by setting AllowUnsafeUpdates on the SPWeb object, but this should be avoided when it could (see Hristo&amp;rsquo;s post on why it is not good). If you are making a POST request, pass in the &lt;strong&gt;__REQUESTDIGEST&lt;/strong&gt; and make sure you call the &lt;strong&gt;SPUtility.ValidateFormDigest()&lt;/strong&gt; method before you do any DB updates.&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;If you want to call your handler asynchronously with AJAX, lets say with jQuery, this adds another level of complexity. You have to pass in the &lt;strong&gt;__REQUESTDIGEST&lt;/strong&gt; parameter for &lt;strong&gt;SPUtility.ValidateFormDigest()&lt;/strong&gt; to succeed. I personally found documentation on the &lt;strong&gt;$.ajax&lt;/strong&gt; jQuery method quite poor, but here is a JavaScript example on how to use it and pass the &lt;strong&gt;__REQUESTDIGEST&lt;/strong&gt; &amp;lt;input/&amp;gt; value:&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;span style="font-size: 9.5pt;"&gt;function&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #000000; font-size: 9.5pt;"&gt; UploadFileAsync() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; listId = $(&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;"&gt;"input[id$='hdnListID']"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;).val();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000; font-size: 9.5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;$.ajax({&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;type: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span&gt;&lt;span style="color: #800000;"&gt;"POST"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;url: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span&gt;&lt;span style="color: #800000;"&gt;"/_layouts/Handlers/FileUpload.ashx?ListID="&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; + listId,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;contentType: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span&gt;&lt;span style="color: #800000;"&gt;"application/x-www-form-urlencoded"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;data: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span&gt;&lt;span style="color: #800000;"&gt;"__REQUESTDIGEST="&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; + $(&lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;"&gt;"#__REQUESTDIGEST"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;).val(),&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;timeout: 30000,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;success: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; (response) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&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;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;alert(response);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;},&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;error: &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;function&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; (x, t, m) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="font-size: 9.5pt;"&gt;&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;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; (t === &lt;/span&gt;&lt;span&gt;&lt;span style="color: #800000;"&gt;"timeout"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&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; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;alert(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span&gt;&lt;span style="color: #800000;"&gt;"got timeout"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&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;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="font-size: 9.5pt;"&gt;&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;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&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; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;alert(t);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&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;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;} &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: "&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0cm 0cm 10pt"&gt;&lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A few things are important and worth mentioning. In the &amp;ldquo;data&amp;rdquo; parameter I get the value of &lt;strong&gt;__REQUESTDIGEST&lt;/strong&gt; and pass it in the POST request. (NOTE: you may want to improve the $(&amp;ldquo;#__RE..&amp;rdquo;) selector to get only input/hidden elements and be better performing). This will allow &lt;strong&gt;SPUtility.ValidateFormDigest()&lt;/strong&gt; to pass successfully. If ever in doubt, open the request with Fiddler and validate the contents, you should see something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001_11.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001" src="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001_thumb_11.png" border="0" alt="clip_image001" width="642" height="179" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The other important point is the &lt;strong&gt;contentType&lt;/strong&gt; parameter. For me this did not work when set to &amp;ldquo;text/plain; charset=utf8&amp;rdquo;. I didn&amp;rsquo;t have enough time to figure out why, but &amp;ldquo;&lt;strong&gt;application/x-www-form-urlencoded&lt;/strong&gt;&amp;rdquo; succeeded successfully.&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/SharePointBG/RadiEng/~3/vt0CblXaN6M/post.aspx</link>
      <author>Ради Атанасов</author>
      <comments>http://www.sharepoint.bg/radi/post/Fun-with-HTTP-Handlers-Security-Validations-FormDigest-AllowUnsafeUpdates-jQuery-AJAX-and-POST-parameters-in-SharePoint.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sharepoint.bg/radi/post.aspx?id=a1c12f32-3631-4d36-9cb4-bf76d9125460</guid>
      <pubDate>Sun, 24 Apr 2011 08:47:00 +1200</pubDate>
      <category>English</category>
      <dc:publisher>Ради Атанасов</dc:publisher>
      <pingback:server>http://www.sharepoint.bg/radi/pingback.axd</pingback:server>
      <pingback:target>http://www.sharepoint.bg/radi/post.aspx?id=a1c12f32-3631-4d36-9cb4-bf76d9125460</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://www.sharepoint.bg/radi/trackback.axd?id=a1c12f32-3631-4d36-9cb4-bf76d9125460</trackback:ping>
      <wfw:comment>http://www.sharepoint.bg/radi/post/Fun-with-HTTP-Handlers-Security-Validations-FormDigest-AllowUnsafeUpdates-jQuery-AJAX-and-POST-parameters-in-SharePoint.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sharepoint.bg/radi/syndication.axd?post=a1c12f32-3631-4d36-9cb4-bf76d9125460</wfw:commentRss>
    <feedburner:origLink>http://www.sharepoint.bg/radi/post.aspx?id=a1c12f32-3631-4d36-9cb4-bf76d9125460</feedburner:origLink></item>
    <item>
      <title>Custom Upload Controls and the Maximum File Upload Size</title>
      <description>&lt;p&gt;If you&amp;rsquo;re creating a custom page or control that uploads files from a users PC (or somewhere else) you may get this error if the file is too big:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;System.Web.HttpException: Maximum request length exceeded. &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This is an ASP.NET error before the request is being handled by SharePoint (you can follow the stack trace to understand it a bit more). The challenge developers are facing is handling the exception and producing a nice &amp;amp; customized error message to users. You can easily overcome the problem by modifying the web.config of the Web Application, but that is not good practice and you have to worry about reproducing the modification for scalability and backup/restore purposes.&lt;/p&gt;
&lt;p&gt;In a typical custom solution there is a nice solution to this problem. If you use Application Pages (those ASPX files that live in {SharePoint Root}\Templates\Layouts) you can place a web.config in your solution folder within the Layouts folder. Your web.config will go in:&lt;/p&gt;
&lt;p&gt;14\TEMPLATE\LAYOUTS\&lt;strong&gt;CustomSolutionFolder&lt;/strong&gt;\web.config&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s what you need in the web.config:&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;lt;?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #a31515;"&gt;xml&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #ff0000;"&gt;version&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;1.0&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;"&gt;encoding&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;utf-8&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #ff0000;"&gt;standalone&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;yes&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9.5pt;"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #a31515;"&gt;configuration&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #a31515;"&gt;location&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #ff0000;"&gt;path&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;CustomUploadPage.aspx&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #a31515;"&gt;system.web&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #a31515;"&gt;httpRuntime&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #ff0000;"&gt;maxRequestLength&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff;"&gt;&lt;strong&gt;2097151&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color: #0000ff; font-size: 9.5pt;"&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #a31515;"&gt;system.web&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #a31515;"&gt;location&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-family: Consolas;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff;"&gt;&lt;span style="font-size: 9.5pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 9.5pt;"&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #a31515;"&gt;configuration&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: "&gt;&lt;span style="color: #0000ff; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;web.config&amp;rsquo;s are very flexible and the location element lets you apply your change exactly on the file that you need. This will work even if you are using an ASCX control located in the _CONTROLTEMPLATES folder. It is also a great approach as it can be packed into WSP&amp;rsquo;s and be part of an enterprise solution.&lt;/p&gt;
&lt;p&gt;The number 2097151 is 2GB (boundary), the maximum SharePoint supported file size. It may be good to reduce this depending on your example.&lt;/p&gt;
&lt;p&gt;The next point worth mentioning here is that the above setting alone won&amp;rsquo;t let you upload files over 50MB unless you configure the &lt;strong&gt;Web Application&lt;/strong&gt; to allow it.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001_10.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001" src="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001_thumb_10.png" border="0" alt="clip_image001" width="632" height="242" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If the &lt;strong&gt;Web Application&lt;/strong&gt; setting is below your file size you will get this exception:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Microsoft.SharePoint.SPException: The specified file is larger than the maximum supported file size. &lt;br /&gt;&lt;/em&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: it has an ErrorCode of 2147024872&lt;/p&gt;
&lt;p&gt;The good news is that you can handle the above exception with a simple Try&amp;hellip;Catch, and that is all you need to facilitate a friendly, customized error message.&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/SharePointBG/RadiEng/~3/SY650WEfdpQ/post.aspx</link>
      <author>Ради Атанасов</author>
      <comments>http://www.sharepoint.bg/radi/post/Custom-Upload-Controls-and-the-Maximum-File-Upload-Size.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sharepoint.bg/radi/post.aspx?id=980d6def-ab68-4808-a18e-c5e6665e040f</guid>
      <pubDate>Sat, 23 Apr 2011 18:36:00 +1200</pubDate>
      <category>English</category>
      <dc:publisher>Ради Атанасов</dc:publisher>
      <pingback:server>http://www.sharepoint.bg/radi/pingback.axd</pingback:server>
      <pingback:target>http://www.sharepoint.bg/radi/post.aspx?id=980d6def-ab68-4808-a18e-c5e6665e040f</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://www.sharepoint.bg/radi/trackback.axd?id=980d6def-ab68-4808-a18e-c5e6665e040f</trackback:ping>
      <wfw:comment>http://www.sharepoint.bg/radi/post/Custom-Upload-Controls-and-the-Maximum-File-Upload-Size.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sharepoint.bg/radi/syndication.axd?post=980d6def-ab68-4808-a18e-c5e6665e040f</wfw:commentRss>
    <feedburner:origLink>http://www.sharepoint.bg/radi/post.aspx?id=980d6def-ab68-4808-a18e-c5e6665e040f</feedburner:origLink></item>
    <item>
      <title>Unit Testing SharePoint 2010 with MSTest</title>
      <description>&lt;p&gt;Most have figured out by now that Visual Studio 2010 and SharePoint 2010 have offered much better development stories compared to SP 2007 and VS 2008. Unit testing however, seemed to be worse off. MSTest projects only support .NET 4, and if a Visual Studio solution is set to .NET for, the SharePoint assemblies won&amp;rsquo;t work at all. You will get a System.IO.FileNotFoundException if you try to get reference to an SPSite. (There&amp;rsquo;s really good reasons why it is a FileNotFoundException, but thats for another post.)&lt;/p&gt;
&lt;p&gt;This resulted in many loud cries in the industry&amp;hellip;&lt;/p&gt;
&lt;p&gt;With the release of Visual Studio 2010 SP1, along came a resolution to this problem. MSTest projects now support .NET 3.5, which lets us add reference to SharePoint assemblies and execute the test host in an x64 process.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s how to do it:&lt;/p&gt;
&lt;p&gt;1) Create a new Test project in your solution. Make sure you select the .NET 3.5 Framework option. Take note of the location the template is in, not sure what Test Documents is &lt;img class="wlEmoticon wlEmoticon-smile" style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" src="http://www.sharepoint.bg/radi/image.axd?picture=wlEmoticon-smile.png" alt="Smile" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001_9.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001" src="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001_thumb_9.png" border="0" alt="clip_image001" width="646" height="258" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2) Go to the Properties of the newly created project and confirm that the Target framework is .NET 3.5&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001%5B5%5D_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001[5]" src="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001%5B5%5D_thumb_2.png" border="0" alt="clip_image001[5]" width="526" height="326" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3) Set the Build - Platform target to &amp;ldquo;&lt;strong&gt;Any CPU&lt;/strong&gt;&amp;rdquo;. This is &lt;strong&gt;important&lt;/strong&gt;, it doesn&amp;rsquo;t work when explicitly set to x64, I haven&amp;rsquo;t got around to figure out why.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001%5B7%5D_1.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001[7]" src="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001%5B7%5D_thumb_1.png" border="0" alt="clip_image001[7]" width="539" height="294" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4) Go to the Test menu at the top, select Edit test settings, and choose local settings:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001%5B9%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001[9]" src="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001%5B9%5D_thumb.png" border="0" alt="clip_image001[9]" width="566" height="257" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;5) Click the Hosts option and configure the environment to run under x64 bit:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001%5B11%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001[11]" src="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001%5B11%5D_thumb.png" border="0" alt="clip_image001[11]" width="599" height="274" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;5) Add references to you SharePoint assemblies and write some unit tests. They should run fine:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001%5B13%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001[13]" src="http://www.sharepoint.bg/radi/image.axd?picture=clip_image001%5B13%5D_thumb.png" border="0" alt="clip_image001[13]" width="632" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Great stuff from the VS team. This still doesn&amp;rsquo;t solve the stubbing requirements though. Pex and Moles and TypeMock are still the way to go.&lt;/p&gt;
&lt;p&gt;Another major functionality that is still missing is Load Tests in .NET 3.5 mode, still can't do them :(&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;</description>
      <link>http://feedproxy.google.com/~r/SharePointBG/RadiEng/~3/woe-pNP3DiI/post.aspx</link>
      <author>Ради Атанасов</author>
      <comments>http://www.sharepoint.bg/radi/post/Unit-Testing-SharePoint-2010-with-MSTest.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sharepoint.bg/radi/post.aspx?id=9196f913-3610-4345-8562-7394abd9ef62</guid>
      <pubDate>Fri, 18 Mar 2011 14:27:00 +1200</pubDate>
      <category>English</category>
      <dc:publisher>Ради Атанасов</dc:publisher>
      <pingback:server>http://www.sharepoint.bg/radi/pingback.axd</pingback:server>
      <pingback:target>http://www.sharepoint.bg/radi/post.aspx?id=9196f913-3610-4345-8562-7394abd9ef62</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://www.sharepoint.bg/radi/trackback.axd?id=9196f913-3610-4345-8562-7394abd9ef62</trackback:ping>
      <wfw:comment>http://www.sharepoint.bg/radi/post/Unit-Testing-SharePoint-2010-with-MSTest.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sharepoint.bg/radi/syndication.axd?post=9196f913-3610-4345-8562-7394abd9ef62</wfw:commentRss>
    <feedburner:origLink>http://www.sharepoint.bg/radi/post.aspx?id=9196f913-3610-4345-8562-7394abd9ef62</feedburner:origLink></item>
  </channel>
</rss>

