Monthly Archive:: September 2011

Code Snippet compiler is a good tool for quick coding and testing the code snippets. Normally, you need to create a Visual Studio Project and I am sure many of us (including Jeff Key ) wont like it just for writing and testing small code blocks….if you agree with me, follow below steps : 1. Add reference to the sharepoint assembly you need. “Tools>Add Reference” 2. Write a code snippet to test something or to help your colleague.It provides intellisense like VS 2010. 3. The output is shown in console…..saves a lot time!  Thank you Jeff

Read More...

Recently, I deployed a Silverlight application (xap)to SharePoint. For some reason the ‘xap’ file did not download for ananonymous user( The obvious reason was permission J). When I changed the permission to ‘Read” for ‘Everyone’,the problem solved on my server.   On production, I have to provide WSP package to deploythe xap file. The requirement was to automate “grant Read permission to everyone”in WSP. We can do that using FileSecurityand FileSystemAccessRule classes in System.Security.AccessControl namespace. We can programmatically access and modify ACL of any folder in windows. At my friend Utkarsh’s blog, I found the code to modify the folder ACLs…and that exactly I was looking for. Below is the code snippet thatmodifies ACL for a folder in SharePoint web application.  We can use it in

Read More...

Generally, to construct a class that cleans up internal unmanaged resources: 1) Override System.Object.Finalize(). Using this technique, we have the peace of mind that comes with knowing the object cleans itself up when garbage collected (whenever that may        be) without the need for user interaction. OR 2) Implement IDisposable. To provide a way for the object user to clean up the object as soon as it is finished. However, if the caller forgets to call Dispose(), the unmanaged resources may be held in memory indefinitely. It is good to blend both techniques into a single class definition. By doing so, you gain the best of both models. If the object user does remember to call Dispose(), you can inform the garbage collector to

Read More...

Problem: You havecallbacks or Ajax controls on a page. When you open the page in Firefox and do F5 or page refresh, you get below error: “The state information is invalid for this page and might be corrupted” Cause: The aboveerror is due to the BFCACHE feature of Firefox 1.5 and above. Firefox 1.5 and above versions do in-memory caching for all pages in a website, alongwith their JavaScript states, for a particular browser session. Going backwardand forward between visited pages requires no page loading and the JavaScriptstates are preserved. This feature, referred to by some as bfcache (for”Back-Forward Cache”), makes page navigation very fast. This cachingstate is preserved until the user closes the browser. However,this Firefox feature caches the page viewstate also which breaks theasynchronous calls

Read More...

Subscribe

Get every post delivered to your inbox via FeedBurner :

© 2010-2013 Extreme Sharepoint | The content is copyrighted to Amit Kumawat and may not be reproduced on other websites.