<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8917091044471297157</id><updated>2012-01-20T06:47:26.989-08:00</updated><category term='striped volume'/><category term='XSLT'/><category term='host'/><category term='GhostScript'/><category term='PDF'/><category term='Document Organizer'/><category term='PNG'/><category term='SPFile'/><category term='claims-based'/><category term='API'/><category term='thumbnail'/><category term='Visual Studio 2010'/><category term='properties'/><category term='UIVersion'/><category term='permissions'/><category term='Visual Web Part'/><category term='RAID 0'/><category term='PowerShell'/><category term='user control'/><category term='object model'/><category term='XP Mode'/><category term='Web Part'/><category term='View Limit'/><category term='virtual environment'/><category term='Program Files'/><category term='menu'/><category term='authorization'/><title type='text'>Tushar with SharePoint</title><subtitle type='html'>This is just a start for me but I'm hoping to publish more blogs.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tusharwithsharepoint.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tusharwithsharepoint.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tushar</name><uri>http://www.blogger.com/profile/04451064581307056970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp3.blogger.com/_Pl9mugJ30-M/SFg745nG4VI/AAAAAAAAAAM/YoqVvx8IIPY/S220/Tushar.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8917091044471297157.post-3235184539167950274</id><published>2012-01-18T14:29:00.000-08:00</published><updated>2012-01-20T06:47:06.625-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='user control'/><category scheme='http://www.blogger.com/atom/ns#' term='properties'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Part'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Web Part'/><title type='text'>Referencing Visual Web Part Properties in User Control</title><content type='html'>&lt;p&gt;It is easy to create a web-part using the &lt;b&gt;Visual Web Part&lt;/b&gt; project template in &lt;b&gt;Visual Studio 2010&lt;/b&gt; particularly when the web-part has  a lot of controls and mark-up as setting properties for these using an HTML editor is easier than through C# coding.&lt;/p&gt;&lt;p&gt;If you’ve previously created more than a simple web-part then you would have made use of features such as &lt;b&gt;web-part properties&lt;/b&gt; but how do you access these in the user-control?&lt;/p&gt;&lt;dl&gt;&lt;dt&gt;Not recommended:&lt;/dt&gt;&lt;dd&gt;Like me if you have searched the web you will have found articles that state that you have to define the properties as &lt;tt&gt;static&lt;/tt&gt; and access these in the user-control statically using the web-part class name.&lt;/dd&gt;&lt;/dl&gt;&lt;p&gt;You may not want to define web-part properties as &lt;tt&gt;static&lt;/tt&gt; but instead you may want to access web-part instance property values. It is simple:&lt;/p&gt;&lt;p style="text-align: center;"&gt;&lt;tt&gt;YourWP wpInstance = (YourWP)this.Parent;&lt;/tt&gt;&lt;/p&gt;&lt;p&gt;The &lt;tt&gt;Parent&lt;/tt&gt; property may not be set when the user-control constructor is called but it should be fine to access it, for example, on the &lt;tt&gt;Page_Load&lt;/tt&gt; method. In this method you could assign a user-control instance variable to store this value so that it is accessible to other methods as well.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8917091044471297157-3235184539167950274?l=tusharwithsharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tusharwithsharepoint.blogspot.com/feeds/3235184539167950274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8917091044471297157&amp;postID=3235184539167950274' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/3235184539167950274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/3235184539167950274'/><link rel='alternate' type='text/html' href='http://tusharwithsharepoint.blogspot.com/2012/01/referencing-visual-webpart-properties.html' title='Referencing Visual Web Part Properties in User Control'/><author><name>Tushar</name><uri>http://www.blogger.com/profile/04451064581307056970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp3.blogger.com/_Pl9mugJ30-M/SFg745nG4VI/AAAAAAAAAAM/YoqVvx8IIPY/S220/Tushar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917091044471297157.post-6245693723381930163</id><published>2011-12-27T14:27:00.000-08:00</published><updated>2011-12-27T14:30:47.593-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Document Organizer'/><category scheme='http://www.blogger.com/atom/ns#' term='View Limit'/><title type='text'>SP2010 Document Organizer and View Limit</title><content type='html'>Recently I was involved in a project where SP2010 was being used as a document management system part of which used the above feature. The consultant who initially implemented the solution had taken a simpler approach of routing documents to root folders and the client was happy. After a period of time however the client reported that all the documents had disappeared from the libraries although they are still appearing in search-results.&lt;br /&gt;&lt;br /&gt;SharePoint limits the number of items that can appear in views to 5,000 and if a folder exceeds this limit then it does not show any. Had the items been organised into subfolders so that no more than 5K items were stored in each then there would have been no issue even if the library had far more items in total.&lt;br /&gt;&lt;br /&gt;There are a number of solutions to this problem and the obvious choice would be to alter the routing rules and to use PowerShell scripts to organise existing documents. This was not possible in this project because the rest of the solution, including custom workflows and event-receivers, would have required changes and that would have been far too much work for a system that was live and operational.&lt;br /&gt;&lt;br /&gt;When designing a document management system, due consideration needs to be given to the volume of documents that might be created over time including their retention requirements, otherwise rework later on may be too expensive. In this solution a decision was made to rely on search functionality instead of scrolling through thousands of documents. The view limit was turned off but this can cause other performance problems and so it may have to be turned on again.&lt;br /&gt;&lt;br /&gt;Content-types should be used to store meta-data instead of using subfolders as meta-data but these items may still require subfolders when large number of items are involved. &lt;b&gt;Document Organizer&lt;/b&gt; supports limiting of items and creating folders as needed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8917091044471297157-6245693723381930163?l=tusharwithsharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tusharwithsharepoint.blogspot.com/feeds/6245693723381930163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8917091044471297157&amp;postID=6245693723381930163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/6245693723381930163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/6245693723381930163'/><link rel='alternate' type='text/html' href='http://tusharwithsharepoint.blogspot.com/2011/12/sp2010-document-organizer-and-view.html' title='SP2010 Document Organizer and View Limit'/><author><name>Tushar</name><uri>http://www.blogger.com/profile/04451064581307056970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp3.blogger.com/_Pl9mugJ30-M/SFg745nG4VI/AAAAAAAAAAM/YoqVvx8IIPY/S220/Tushar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917091044471297157.post-2652592288550628530</id><published>2011-08-17T06:13:00.000-07:00</published><updated>2011-08-23T03:32:20.952-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='claims-based'/><category scheme='http://www.blogger.com/atom/ns#' term='authorization'/><category scheme='http://www.blogger.com/atom/ns#' term='permissions'/><category scheme='http://www.blogger.com/atom/ns#' term='PowerShell'/><title type='text'>Permissions to Claims using PowerShell</title><content type='html'>&lt;p&gt;After developing and configuring SharePoint to make use of claims-based authentication, you may get involved in deployment of the solution which can involve assignment of permissions to claims. This is easily achieved using the SharePoint people-picker control however doing so using a PowerShell script can be hair-scratching. Here is a sample to save your scalp :-)&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;$webSiteURL = "&lt;span style="color: green;"&gt;&amp;lt;web address&amp;gt;&lt;/span&gt;"&lt;br /&gt;$provider = Get-SPClaimProvider -Identity "&lt;span style="color: green;"&gt;&amp;lt;provider name&amp;gt;&lt;/span&gt;"&lt;br /&gt;$claim = New-SPClaimsPrincipal&lt;br /&gt;  -ClaimValue "&lt;span style="color: green;"&gt;&amp;lt;claim value&amp;gt;&lt;/span&gt;"&lt;br /&gt;  -ClaimType "http://&lt;span style="color: green;"&gt;&amp;lt;cliam type&amp;gt;&lt;/span&gt;"&lt;br /&gt;  -ClaimProvider $provider.ClaimProvider&lt;br /&gt;$user = New-SPUser&lt;br /&gt;  -UserAlias $claim.ToEncodedString()&lt;br /&gt;  -Web $webSiteURL&lt;br /&gt;Set-SPUser&lt;br /&gt;  -Identity $user&lt;br /&gt;  -Web $webSiteURL&lt;br /&gt;  –AddPermissionLevel "Read"&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;You may need to perform a further step on or after the last step such as adding the user to a &lt;span style="color: green;"&gt;role-assignments&lt;/span&gt; collection.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Notice that the parameters are placed on new lines for clarity.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You'll have to ensure that the PowerShell instance has the SharePoint plugins enabled.&lt;/p&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8917091044471297157-2652592288550628530?l=tusharwithsharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tusharwithsharepoint.blogspot.com/feeds/2652592288550628530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8917091044471297157&amp;postID=2652592288550628530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/2652592288550628530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/2652592288550628530'/><link rel='alternate' type='text/html' href='http://tusharwithsharepoint.blogspot.com/2011/08/permissions-to-claims-using-powershell.html' title='Permissions to Claims using PowerShell'/><author><name>Tushar</name><uri>http://www.blogger.com/profile/04451064581307056970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp3.blogger.com/_Pl9mugJ30-M/SFg745nG4VI/AAAAAAAAAAM/YoqVvx8IIPY/S220/Tushar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917091044471297157.post-8366444579051237664</id><published>2011-07-02T02:40:00.000-07:00</published><updated>2011-07-02T03:43:43.553-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RAID 0'/><category scheme='http://www.blogger.com/atom/ns#' term='virtual environment'/><category scheme='http://www.blogger.com/atom/ns#' term='striped volume'/><title type='text'>Stripe Virtual Environments</title><content type='html'>&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;For a specific project, I wanted to create a virtual ‘mini’ SharePoint farm so that DC, SP, and a 3&lt;sup&gt;rd&lt;/sup&gt; party app were running on different servers. Although the processor on the laptop was multi-core with hyper-threading and it had two large drives, I discovered that the physical HD is a performance bottleneck for such an environment because VM’s, each with two virtual HD, all try to access the same physical HD impacting on performance.&lt;/p&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;Saving the VM’s on different physical HD improves performance but copying the VM’s across disks is time consuming because of the large files involved. The disk access required by each VM may vary depending on type of project you are working on and so you may have to change the location of VM's. You may also need to change location if you have limited free disk space.&lt;/p&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;If you have a combination of multiple VM’s, some of which are part of different farms, then keeping track of these VM’s across multiple physical HD can become a problem. A better solution is needed.&lt;/p&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;The solution that worked for me is RAID 0 where data is striped across multiple disks (without redundancy or parity). As well as a large disk, even larger than any one physical drive, you also get the benefit of increased performance because each virtual HD is spread across multiple drives. You therefore do not have to worry about where to create your next VM.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;dl&gt;&lt;br /&gt;    &lt;dt&gt;Disclaimer&lt;/dt&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;The aim of this article is to briefly describe the possible options available to you for using a striped disks for storing virtual machines. Most of these options are dependent on your hardware. Before changing the configuration of your computer make sure that you have performed necessary backups so that you are able to revert back to the original configuration if things go wrong. Note that performing a backup is not sufficient if you do not have the required software to perform the restore including OS, drivers, software, and license-keys.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;I’ve deliberately avoided ‘how to’ steps here because I expect the person wanting to reconfigure their hardware to perform further analysis of the steps involved, the hardware required, and safety measures needed for their system.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Ensure that the hardware warranty is not invalidated by reconfiguring your computer.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Many hardware manufacturers create a special recovery partition on one hard drive that used restore the computer to factory defaults. You may want to ‘preserve’ this partition because it may be the only one that contains the valid licensed copy of your host OS.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Make changes at your risk.&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;br /&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;There are a number of options available for creating striped configured disks:&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;    &lt;li&gt;Through the BIOS&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;Windows Dynamic Disks&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;Disk Drivers&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;Below I briefly explain the advantages and disadvantages of each option.&lt;/p&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;Note that I refer to ‘drive’ as what Windows gives letters to like C: and ‘disk’ to the physical hardware that is partitioned and formatted.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Through the BIOS&lt;/h3&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;In order to use this option, you will need two identical disks in your computer.&lt;/p&gt;&lt;br /&gt;&lt;dl&gt;&lt;br /&gt;    &lt;dt&gt;Advantages&lt;/dt&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Easy to configure new drives through the BIOS, including formatting them, because there is no need to consider saving existing data.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Might be possible to later bit-copy a normal disk to a striped configured disk. This may be necessary for example if you are upgrading a single disk system by installing two new identical disks in a striped configuration. The bit-copier software will see the new striped disk as a single large disk due to the BIOS. For the same reason the OS should also boot without requiring additional drivers.&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;br /&gt;&lt;br /&gt;&lt;dl&gt;&lt;br /&gt;    &lt;dt&gt;Disadvantages&lt;/dt&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Configuration is performed through the BIOS before the host operating system is installed and therefore it is not a conversion or upgrade of an existing system.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;For a new Windows OS install you may need to provide additional drivers (F6 option) if you are not going to use a bit-copier.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;If you’re using a laptop then the it may not have the required hardware and BIOS support.&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Windows Dynamic Disks&lt;/h3&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;To use this option, you will need a Professional Edition of Windows OS as the Home Editions do not support this feature. Existing simple disks will need to be converted to dynamic disks that would allow creation of arbitrary volumes on the same disk without the partition limitation of simple disks. Dynamic disks allow creation of volumes on free space which need not be a single consecutive block of disk.&lt;/p&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;After the conversion the drive containing the OS (which is usually the C: drive) cannot be changed to a striped disk. The disk containing the OS needs to be 'shrunk' to create space for new volumes. An equal amount of space is also needed on another drive before a striped volume is created.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;dl&gt;&lt;br /&gt;    &lt;dt&gt;Advantages&lt;/dt&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;You can configure using a Windows interface instead of using the BIOS.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;You may change your mind by removing and recreating new volumes by either moving existing data around or backup-and-restore.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Not necessary to have identical physical drives.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Can convert a standard disk to a dynamic disk including the system disk.&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;br /&gt;&lt;br /&gt;&lt;dl&gt;&lt;br /&gt;    &lt;dt&gt;Disadvantages&lt;/dt&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Not easy to convert a dynamic disk to a simple disk in case you change your mind.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;You have to create volumes on separate disks (to have RAID 0) that will be used by the striped drive and because your OS is already installed on one disk, the maximum space you may configure for the striped volume depends on how much free space you leave on the OS drive – too little and you may run into problems.&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Disk Drivers&lt;/h3&gt;&lt;br /&gt;&lt;p style="margin-top: 0px; margin-bottom: 6pt;"&gt;These are device drivers supplied by hardware manufacturers for Windows OS. In addition to the drivers, utilities are provided to configure the hardware that may run within Windows OS.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;dl&gt;&lt;br /&gt;    &lt;dt&gt;Advantages&lt;/dt&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Like Dynamic Disks, you may be able to configure your hardware after the Windows OS is loaded using a Windows interface instead of using the BIOS.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;You may be able reconfigure an existing system without having to reload the operating system. I’ve personally not done this but I assume you may not be able to convert the volume on which Windows OS is running.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Such drivers claim to improve SATA disk performance in addition to supporting RAID 0.&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;br /&gt;&lt;br /&gt;&lt;dl&gt;&lt;br /&gt;    &lt;dt&gt;Disadvantages&lt;/dt&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;Your computer needs have the necessary hardware support and those that have it may also provide the BIOS support for RAID 0 configuration. You cannot upgrade the chipset without upgrading the system-board.&lt;/dd&gt;&lt;br /&gt;    &lt;dd style="margin-bottom: 6pt;"&gt;There may be limited support for your hardware manufacturer, perform internet searches to see what kind of problems others have encountered and the level of support you can expect.&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8917091044471297157-8366444579051237664?l=tusharwithsharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tusharwithsharepoint.blogspot.com/feeds/8366444579051237664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8917091044471297157&amp;postID=8366444579051237664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/8366444579051237664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/8366444579051237664'/><link rel='alternate' type='text/html' href='http://tusharwithsharepoint.blogspot.com/2011/07/stripe-virtual-environments.html' title='Stripe Virtual Environments'/><author><name>Tushar</name><uri>http://www.blogger.com/profile/04451064581307056970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp3.blogger.com/_Pl9mugJ30-M/SFg745nG4VI/AAAAAAAAAAM/YoqVvx8IIPY/S220/Tushar.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917091044471297157.post-1668463110918537628</id><published>2011-06-17T07:06:00.000-07:00</published><updated>2011-06-20T12:56:36.245-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Program Files'/><category scheme='http://www.blogger.com/atom/ns#' term='XP Mode'/><category scheme='http://www.blogger.com/atom/ns#' term='host'/><category scheme='http://www.blogger.com/atom/ns#' term='menu'/><title type='text'>Windows XP Mode Applications</title><content type='html'>&lt;p&gt;&lt;br /&gt;Recently I installed Windows XP Mode and found that I needed to go through the cycle of installing &lt;i&gt;Windows Updates&lt;/i&gt; and then &lt;i&gt;Microsoft Security Essentials&lt;/i&gt; antivirus software, and so on.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Downloading the software and then the updates is time consuming and once you’ve finished you find that the host &lt;i&gt;Program Files&lt;/i&gt; menu has guest items you did not want appearing, such as:&lt;br /&gt;&lt;ul style="font-size: small;"&gt;&lt;br /&gt;&lt;li&gt;Microsoft Security Essentials (Windows XP Mode)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Administrative Tools \ Microsoft .NET Framework 1.1 Configuration (Windows XP Mode)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Administrative Tools \ Microsoft .NET Framework 1.1 Wizards (Windows XP Mode)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Does this look familiar?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-D9jbcdUnQKo/TftgXOKzJZI/AAAAAAAAACE/keRQE-OmVPQ/s1600/ProgFiles.PNG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 188px; height: 200px;" src="http://1.bp.blogspot.com/-D9jbcdUnQKo/TftgXOKzJZI/AAAAAAAAACE/keRQE-OmVPQ/s200/ProgFiles.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5619190912131474834" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So you spend more time reconfiguring. Searching for a solution, you’ll find you have to make changes to the Windows XP Mode registry. Search for &lt;code&gt;VPCVAppExcludeList&lt;/code&gt; key in &lt;code&gt;HKEY_LOCAL_MACHINE&lt;/code&gt; and then add paths to applications you want to exclude. To save time, copy the following lines into a REG file and run it, at your peril, to exclude the above three items provided everything was installed at default path locations.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;div style="overflow: auto; border: 1px solid green;"&gt;&lt;pre style="color: green; font-size: small; white-space:nowrap;"&gt;&lt;br /&gt;Windows Registry Editor Version 5.00&lt;br /&gt;&lt;br /&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtual Machine\VPCVAppExcludeList]&lt;br /&gt;"msseces.exe"="C:\\Program Files\\Microsoft Security Client\\msseces.exe"&lt;br /&gt;"ConfigWizards.exe"="C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322\\ConfigWizards.exe"&lt;br /&gt;"mscorcfg.msc"="C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322\\mscorcfg.msc"&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;You might be asking what has this got to do with SharePoint, right?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;If you are like me, you probably take time to build a VM environment following best practices where possible, and then use that over a long period. Most VM’s give you the ability to save its state (checkpoint, snapshot, or whatever) so if it is corrupted you can go back to how if used to be however I usually to not make more than one such save. The default configuration for Windows XP Mode is to work off a parent disk installed in Program Files and you might need to reconfigure your environment to save its state (a subject for another blog).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Like me, you might find that the Windows XP Mode feature is useful for installing and running downloaded applications that you do not want installed on your host or your main VM mainly because you’re not sure what changes the new application will potentially make. For example you might need to install VPN software so that you can connect to another network and you might not want to connect your host or VM to that network and hence Windows XP Mode.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;I strongly recommend that you run anti-virus software on your VM's.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8917091044471297157-1668463110918537628?l=tusharwithsharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tusharwithsharepoint.blogspot.com/feeds/1668463110918537628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8917091044471297157&amp;postID=1668463110918537628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/1668463110918537628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/1668463110918537628'/><link rel='alternate' type='text/html' href='http://tusharwithsharepoint.blogspot.com/2011/06/windows-xp-mode-applications.html' title='Windows XP Mode Applications'/><author><name>Tushar</name><uri>http://www.blogger.com/profile/04451064581307056970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp3.blogger.com/_Pl9mugJ30-M/SFg745nG4VI/AAAAAAAAAAM/YoqVvx8IIPY/S220/Tushar.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-D9jbcdUnQKo/TftgXOKzJZI/AAAAAAAAACE/keRQE-OmVPQ/s72-c/ProgFiles.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917091044471297157.post-6261629053676373696</id><published>2010-08-24T08:53:00.000-07:00</published><updated>2011-07-02T03:11:04.403-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='object model'/><category scheme='http://www.blogger.com/atom/ns#' term='UIVersion'/><category scheme='http://www.blogger.com/atom/ns#' term='SPFile'/><title type='text'>Version from SPFile</title><content type='html'>Recently I worked on a project that involved MOSS 2007 publishing sites and the &lt;b&gt;SPFile&lt;/b&gt; object contains a couple of properties holding version information: &lt;b&gt;UIVersionLabel&lt;/b&gt; which is a string type and returns the version number of a page while &lt;b&gt;UIVersion&lt;/b&gt; is an integer type that returns the version as a numeric value making it easier to compare in &lt;code&gt;code&lt;/code&gt;. It appears as though the first nine bits of this property holds the minor version number. So to check if a file is grater then version 1.0 you can perform &lt;code&gt;(UIVersion &gt; 512)&lt;/code&gt; and to check if the page has also been approved and published, you may also perfrom &lt;code&gt;(UIVersion % 512) == 0&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8917091044471297157-6261629053676373696?l=tusharwithsharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tusharwithsharepoint.blogspot.com/feeds/6261629053676373696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8917091044471297157&amp;postID=6261629053676373696' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/6261629053676373696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/6261629053676373696'/><link rel='alternate' type='text/html' href='http://tusharwithsharepoint.blogspot.com/2010/08/version-from-spfile.html' title='Version from SPFile'/><author><name>Tushar</name><uri>http://www.blogger.com/profile/04451064581307056970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp3.blogger.com/_Pl9mugJ30-M/SFg745nG4VI/AAAAAAAAAAM/YoqVvx8IIPY/S220/Tushar.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8917091044471297157.post-8914415558514166443</id><published>2008-06-17T13:45:00.000-07:00</published><updated>2008-06-17T17:13:55.239-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PDF'/><category scheme='http://www.blogger.com/atom/ns#' term='PNG'/><category scheme='http://www.blogger.com/atom/ns#' term='GhostScript'/><category scheme='http://www.blogger.com/atom/ns#' term='thumbnail'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>Displaying PDF Thumbnails</title><content type='html'>&lt;div align="justify"&gt;Recently I was asked to display thumbnails of PDF files stored in a SharePoint library. Although it seemed difficult at first the solution was relatively simple but needed some C# and some XSLT coding. Also needed was a PDF processor to create the thumbnails and instead of using a commercial application I managed to do it with &lt;a href="http://pages.cs.wisc.edu/%7Eghost/" target='_blank'&gt;GNU GhostScript&lt;/a&gt;. In my case the PDF's were well known file names but in this blog I'm suggesting how it could be done dynamically.&lt;br /&gt;&lt;br /&gt;The solution is to create a list of PDF and thumbnail files in an XML file and then to create a corresponding XSLT to display the thumbnails as links to PDF files using the standard XML Web Part. You have to have the thumbnails pre-created for each of the PDF files.&lt;br /&gt;&lt;br /&gt;Using a PDF processor you'll create the thumbnails in say PNG format. This can be automated using an event-hander on the library that would also update the XML file although initially this could be done manually also. The XML could look like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;pdf_list&amp;gt;&lt;br /&gt; &amp;lt;item name='pdf_file_01' /&amp;gt;&lt;br /&gt; &amp;lt;item name='pdf_file_02' /&amp;gt;&lt;br /&gt; &amp;lt;item name='pdf_file_03' /&amp;gt;&lt;br /&gt;&amp;lt;/pdf_list&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and the XSLT would output for each item something like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;a href='pdf_file_99.pdf' target='_blank'&amp;gt;&lt;br /&gt; &amp;lt;img src='pdf_file_99.png' alt='thumbnail' /&amp;gt;&lt;br /&gt;&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The XSLT does not change as files are added and removed from the library - only the XML changes. The total files in the library would then be eight:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;_list.xml&lt;br /&gt;_list.xslt&lt;br /&gt;pdf_file_01.pdf&lt;br /&gt;pdf_file_01.png&lt;br /&gt;pdf_file_02.pdf&lt;br /&gt;pdf_file_02.png&lt;br /&gt;pdf_file_03.pdf&lt;br /&gt;pdf_file_03.png&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is just the basic idea and details will obviously change depending on your requirements.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tips and Tricks&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;The XML could contain additional metadata about the PDF files that could be displayed along with the thumbnail.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Create a bitmap in a large resolution and then resize it otherwise creating the a small thumbnail from a PDF may result in not so good quality.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To upload thumbnails map a drive to the SharePoint library using &lt;tt&gt;net use x: http://host/web&lt;/tt&gt; for which you will need Windows WebClient service running.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To dynamically arrange the thumbnails depending on the size of the end user's screen make use of HTML &lt;tt&gt;&amp;lt;DIV&amp;gt;&lt;/tt&gt; instead of tables.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It is possible to redesign the XSLT to, for example, display a slide show of the thumbnails as links to PDF using VBScript or JavaScript.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Filter the default view of the SharePoint library to only show PDF files and hide PNG and XML / XSLT files.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;i&gt;When I get a chance I will include some pictures in this blog.&lt;/i&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8917091044471297157-8914415558514166443?l=tusharwithsharepoint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tusharwithsharepoint.blogspot.com/feeds/8914415558514166443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8917091044471297157&amp;postID=8914415558514166443' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/8914415558514166443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8917091044471297157/posts/default/8914415558514166443'/><link rel='alternate' type='text/html' href='http://tusharwithsharepoint.blogspot.com/2008/06/displaying-pdf-thumbnails.html' title='Displaying PDF Thumbnails'/><author><name>Tushar</name><uri>http://www.blogger.com/profile/04451064581307056970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp3.blogger.com/_Pl9mugJ30-M/SFg745nG4VI/AAAAAAAAAAM/YoqVvx8IIPY/S220/Tushar.jpg'/></author><thr:total>4</thr:total></entry></feed>
