<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ideas For Free</title>
	<atom:link href="http://blog.libinuko.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.libinuko.com</link>
	<description>Only freedom will grow our ideas</description>
	<lastBuildDate>Sun, 18 Dec 2011 04:51:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SharePoint 2010: RemoteStsAdm PowerShell Module is available via NuGet</title>
		<link>http://blog.libinuko.com/2011/12/18/sharepoint-2010-remotestsadm-powershell-module-is-available-via-nuget/</link>
		<comments>http://blog.libinuko.com/2011/12/18/sharepoint-2010-remotestsadm-powershell-module-is-available-via-nuget/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 04:15:43 +0000</pubDate>
		<dc:creator>cakriwut</dc:creator>
				<category><![CDATA[Community Content]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[NuGet]]></category>

		<guid isPermaLink="false">http://blog.libinuko.com/?p=716</guid>
		<description><![CDATA[English: Few month ago I have introduced RemoteStsAdm, a PowerShell module that enable you to execute StsAdm.exe remotely. StsAdm.exe is a command line administration tools for SharePoint. Unfortunately to run StsAdm, one must log-in to SharePoint server member &#8211; since the tool can not be executed remotely. RemoteStsAdm is to answer this problem, allowing admin to [...] <a href="http://blog.libinuko.com/2011/12/18/sharepoint-2010-remotestsadm-powershell-module-is-available-via-nuget/">[read more...]</a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>English:</p>
<p>Few month ago I have introduced RemoteStsAdm, a PowerShell module that enable you to execute StsAdm.exe remotely. StsAdm.exe is a command line administration tools for SharePoint. Unfortunately to run StsAdm, one must log-in to SharePoint server member &ndash; since the tool can not be executed remotely. RemoteStsAdm is to answer this problem, allowing admin to execute StsAdm remotely. You can download the source code from <a href="http://code.msdn.microsoft.com/windowsdesktop/Remote-StsAdm-in-6fec24b8">MSDN Galery here</a> or read the <a href="http://blog.libinuko.com/2011/09/17/sharepoint-2010-remotestsadm-powershell-module/">original article in previous post here</a>.&nbsp;</p>
<p>Yesterday, I have <a href="http://blog.libinuko.com/2011/12/17/introducing-import-psmodule/">released ImportPSModule</a> that will easy PowerShell module distribution, allow update notification and configuration. The RemoteStsAdm PowerShell module is now available via NuGet, so that you don&rsquo;t need to download and extract manually. All will be done seamlessly, and whenever we got script update &ndash; you will get notified as soon as you open PowerShell session.</p>
<p>So what do you wait for, open PowerShell session and type following:</p>
<div class="wlWriterEditableSmartContent" id="scid:E8C2ABEC-2EDF-4263-8854-38F0AFB6C437:4bb12004-931d-431d-af21-4723eda453ef" style="margin: 0px; padding: 0px; float: none; display: inline;">
<pre class="brush: powershell; title: ; notranslate">Import-PSModule RemoteStsAdm </pre>
</div>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://blog.libinuko.com/2011/12/18/sharepoint-2010-remotestsadm-powershell-module-is-available-via-nuget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell: Introducing Import-PSModule</title>
		<link>http://blog.libinuko.com/2011/12/17/introducing-import-psmodule/</link>
		<comments>http://blog.libinuko.com/2011/12/17/introducing-import-psmodule/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 11:32:51 +0000</pubDate>
		<dc:creator>cakriwut</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[NuGet]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.libinuko.com/?p=704</guid>
		<description><![CDATA[You may already know PsGet&#160;by Chaliy or PsGet by Anurse for PowerShell module distribution. They have created PowerShell module&#160;distribution mechanism with different approach. Chaliy uses PowerShell script approach and customized module directory. Everytime you want to distribute your PowerShell module, you have to fork his github project to update Directory.xml content. Even tough the instruction in [...] <a href="http://blog.libinuko.com/2011/12/17/introducing-import-psmodule/">[read more...]</a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>You may already know <strong><a href="http://psget.net/">PsGet</a>&nbsp;by Chaliy</strong> or <strong><a href="http://vibrantcode.com/blog/2011/2/16/psget-v02now-with-more-awesome-and-fewer-version-numbers.html">PsGet </a>by Anurse</strong> for PowerShell module distribution. They have created PowerShell module&nbsp;distribution mechanism with different approach.</p>
<p>Chaliy uses PowerShell script approach and customized module directory. Everytime you want to distribute your PowerShell module, you have to fork his github project to update Directory.xml content. Even tough the instruction in <a href="https://github.com/chaliy/psget/wiki/How-to-add-your-module-to-the-directory">https://github.com/chaliy/psget/wiki/How-to-add-your-module-to-the-directory</a>&nbsp;is very clear, however<u> I think there is risk of incorrect Directory.xml modification</u>.</p>
<p>Anurse uses PowerShell manifest approach and standard NuGet package to download and put module in appropriate location. In this case you can create a NuGet package containing PowerShell files and publish it to NuGet repository. Using his module, you will be able to get PowerShell module from NuGet repository right to your console. I like this approach because it uses standard NuGet package and publishing process. However, sometimes<strong> I want to be able to register the new module in my profile</strong>. I also want to ensure that I always use latest PowerShell Module&nbsp;package &#8211; ie. <strong>update local module automatically when there is new module in NuGet repository</strong>.</p>
<p>So then, I started to create Import-PSModule a PowerShell script module that will give you functionalities such as:</p>
<ol>
<li>Importing PS Module from NuGet repository</li>
<li>Load imported module to current session</li>
<li>Register imported module to current user profile or all user profile</li>
<li>Un-register imported module from current user profile or all user profile</li>
<li>Auto-update imported module when user start PowerShell session</li>
</ol>
<p>To start using the module, start PowerShell session and type following</p>
<p>&nbsp;&nbsp;
<pre class="brush: powershell; title: ; notranslate">(new-object Net.WebClient).DownloadString(&amp;quot;http://blog.libinuko.com/wp-content/plugins/download-monitor/download.php?id=1&amp;quot;) | iex </pre>
</p>
<p>The script will perform following actions:</p>
<ol>
<li>Download latest ImportPSModule from central NuGet repository.</li>
<li>Install the package to desired location. If you choose to install in User-Module or Global-Module, all future packages will be installed under Module path. If you choose to install in other folder, then all future package will be installed within installation folder.</li>
<li>Load the ImportPSModule to the memory. It will also&nbsp; download latest NuGet.CommandLine package if you don&#39;t have in your system.</li>
</ol>
<p>So what do you waiting for? Start to install the module and publish your PowerShell module in NuGet repository. But don&#39;t forget TAG &quot;<strong>PSModule</strong>&quot; to your NuGet package.</p>
<p>If you want to validate InstallPSModule.ps1, please click here <a class="downloadlink" href="http://blog.libinuko.com/wp-content/plugins/download-monitor/download.php?id=1" title="Version1.0.0 downloaded 115 times" >InstallPSModule (115)</a> .</p>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://blog.libinuko.com/2011/12/17/introducing-import-psmodule/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010 : RemoteStsAdm PowerShell Module</title>
		<link>http://blog.libinuko.com/2011/09/17/sharepoint-2010-remotestsadm-powershell-module/</link>
		<comments>http://blog.libinuko.com/2011/09/17/sharepoint-2010-remotestsadm-powershell-module/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 04:50:26 +0000</pubDate>
		<dc:creator>cakriwut</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[StsAdm]]></category>

		<guid isPermaLink="false">http://blog.libinuko.com/2011/09/17/sharepoint-2010-remotestsadm-powershell-module/</guid>
		<description><![CDATA[English The STSADM.exe is command-line tool for administration of Office SharePoint Server (SharePoint 2007, SharePoint 2010). It is installed on the same location as SharePoint Products and Technologies location: %COMMONPROGRAMFILES%\Microsoft Shared\Web Server Extensions\12\bin (for SharePoint 2007) or %COMMONPROGRAMFILES%\Microsoft Shared\Web Server Extensions\14\bin (for SharePoint 2010). You must be Farm Administrator to be able to run the tool. By [...] <a href="http://blog.libinuko.com/2011/09/17/sharepoint-2010-remotestsadm-powershell-module/">[read more...]</a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>English</p>
<p>The STSADM.exe is command-line tool for administration of Office SharePoint Server (SharePoint 2007, SharePoint 2010). It is installed on the same location as SharePoint Products and Technologies location: %COMMONPROGRAMFILES%\Microsoft Shared\Web Server Extensions\12\bin (for SharePoint 2007) or %COMMONPROGRAMFILES%\Microsoft Shared\Web Server Extensions\14\bin (for SharePoint 2010). You must be Farm Administrator to be able to run the tool.</p>
<p>By default, the STSADM.exe must be executed locally since it will access SharePoint Object Model. It is also necessary for the tools to connect to the SQL Database using credential of the user who executes it. Therefore, normally the Administrator must remote-login to the SharePoint server before he/she can run the tools.</p>
<p>Remote execution of STSADM.exe using PowerShell <em>Invoke-Command </em>cmdlet faces double-hop challenges. This occurs when SQL Database for the farms is installed on different machine than the SharePoint server. The credential in the<em>Invoke-Command </em>session can not pass through to the SQL Database without configuring delegation in the WinRM services.<strong>This module solve double-hop problem without configuring CredSSP</strong>.</p>
<p>Download the module here:   <br /><a title="http://code.msdn.microsoft.com/Remote-StsAdm-in-6fec24b8" href="http://code.msdn.microsoft.com/Remote-StsAdm-in-6fec24b8">http://code.msdn.microsoft.com/Remote-StsAdm-in-6fec24b8</a></p>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://blog.libinuko.com/2011/09/17/sharepoint-2010-remotestsadm-powershell-module/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SharePoint: Writing Custom Web Service for SharePoint in Supported Mode (part-2)</title>
		<link>http://blog.libinuko.com/2011/08/31/sharepoint-writing-custom-web-service-for-sharepoint-in-supported-mode-part-2/</link>
		<comments>http://blog.libinuko.com/2011/08/31/sharepoint-writing-custom-web-service-for-sharepoint-in-supported-mode-part-2/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 15:29:01 +0000</pubDate>
		<dc:creator>cakriwut</dc:creator>
				<category><![CDATA[Office]]></category>
		<category><![CDATA[Office 2010]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.libinuko.com/2011/08/31/sharepoint-writing-custom-web-service-for-sharepoint-in-supported-mode-part-2/</guid>
		<description><![CDATA[English Before we continue, I suggest you read the first part here ; it gives basic idea of how it works. The purpose of part-2 is to make real implementation of Custom Web Service , but it is not the only way to do it. There are some key points that I want to show here: We [...] <a href="http://blog.libinuko.com/2011/08/31/sharepoint-writing-custom-web-service-for-sharepoint-in-supported-mode-part-2/">[read more...]</a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>English</p>
<p>Before we continue, I suggest you read the first part here ; it gives basic idea of how it works. The purpose of part-2 is to make real implementation of Custom Web Service , but it is not the only way to do it. There are some key points that I want to show here:</p>
<ol>
<li>We will put our custom Web Services in a Custom folder under _vti_bin. In this case we will create new folder WSCustom under (12hive/ISAPI for SharePoint 2007 or 14hive/ISAPI for SharePoint 2010)</li>
<li>We will need a helper to read SharePoint context (SPVirtualPath) before passing the request to the real ASMX. In this case we will copy WSDISCO.ASPX&nbsp; and WSWSDL.ASPX from original _VTI_BIN to _VTI_BIN/WSCustom folder</li>
<li>We will need custom SPDisco.aspx for our web services, in this case I will name it WSCustomSPDisco.aspx. This is the file, where we will register our web service. (Note the registration is optional, but it is required for truly SharePoint integration)</li>
<li>We need an interceptor so that request to SPDisco.aspx will return combination between original SPDisco.aspx and WSCustomSPDisco.aspx. In this case, we will create WSCustomHttpHandler that combine XML from the two files.</li>
<li>We need rules to add rules to redirect request to _vti_bin/spdisco.aspx to our WSCustomHttphandler.</li>
</ol>
<p>In the diagram, the scenario will look like this</p>
<p><a href="http://blog.libinuko.com/files/2011/08/image3.png"><img alt="image" border="0" height="340" src="http://blog.libinuko.com/files/2011/08/image_thumb3.png" style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" width="839" /></a></p>
<p>&nbsp;</p>
<ol>
<li>Create ASPNET Web Services using Visual Studio.&nbsp; <br />
		You can follow instruction in MSDN here (<a href="http://msdn.microsoft.com/en-us/library/dd583131(v=office.11).aspx" title="http://msdn.microsoft.com/en-us/library/dd583131(v=office.11).aspx">http://msdn.microsoft.com/en-us/library/dd583131(v=office.11).aspx</a>) and <strong><font style="background-color: rgb(255, 255, 0);">stop until &ldquo;To copy the Web service files to the _vti_bin virtual directory&rdquo;). </p>
<p>		</font></strong></li>
<li>Create custom folder for your project under _vti_bin (for example 12hive/ISAPI/CustomWS for SharePoint 2007 or 14hive/ISAPI/CustomWS for SharePoint 2010). In this custom folder, we will put 3 files for every web service (*.asmx) which are: 
<ul>
<li><strong><em>&lt;service&gt;</em></strong>.asmx , where <em>&lt;service&gt;</em> is your web service file.</li>
<li><strong><em>&lt;serviceDISCO&gt;</em></strong>.aspx , where <em>&lt;serviceDISCO&gt;</em> is corresponding DISCO file of your web service.</li>
<li><strong><em>&lt;serviceWSDL&gt;</em></strong>.aspx , where <em>&lt;serviceWSDL&gt; </em>is corresponding WSDL file of your web service. <br />
				<!--EndFragment--></li>
</ul>
</li>
<li>Copy ISAPI\<font style="background-color: rgb(255, 255, 0);">spdisco.aspx</font> to ISAPI\<font style="background-color: rgb(255, 255, 0);">spdisco.disco.aspx</font> . We need copy of original spdisco.aspx, since we don&rsquo;t want to have infinite loop in our HttpHandler later.</li>
<li>Create ISAPI\customws.spdisco.aspx. In this file, we will register our custom web service. This is important to avoid modifying SharePoint built-in file.</li>
<li>Create HttpHandler to combine content of spdisco.aspx and *.spdisco.aspx.</li>
<li>Register HttpHandler in web.config. We will intercept all _vti_bin/spdisco.aspx with our HttpHandler.</li>
</ol>
<p>&nbsp;</p>
<p><strong><font size="2">More Information</font></strong></p>
<ol>
<li>Tutorial video, Writing Custom Web Services for SharePoint in Supported Mode.<br />
		[See post to watch Flash video]<br />
		&nbsp;</li>
<li>Download source code for this article Visual Studio 2010 + SharePoint 2010 (<a href="http://code.msdn.microsoft.com/Writing-SharePoint-Web-in-cb9de1be" title="http://code.msdn.microsoft.com/Writing-SharePoint-Web-in-cb9de1be">http://code.msdn.microsoft.com/Writing-SharePoint-Web-in-cb9de1be</a>)</li>
</ol>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://blog.libinuko.com/2011/08/31/sharepoint-writing-custom-web-service-for-sharepoint-in-supported-mode-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url="http://blog.libinuko.com/wp-content/videos/Howto Create Custom Web Service for SharePoint in Supported Model.mp4" length="1" type="application/unknown"/>
	</item>
		<item>
		<title>SharePoint: Writing Custom Web Service for SharePoint in Supported Mode (part-1)</title>
		<link>http://blog.libinuko.com/2011/08/27/sharepoint-writing-custom-web-service-for-sharepoint-in-supported-mode-part-1/</link>
		<comments>http://blog.libinuko.com/2011/08/27/sharepoint-writing-custom-web-service-for-sharepoint-in-supported-mode-part-1/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 17:27:56 +0000</pubDate>
		<dc:creator>cakriwut</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.libinuko.com/2011/08/27/sharepoint-writing-custom-web-service-for-sharepoint-in-supported-mode-part-1/</guid>
		<description><![CDATA[English If you have read my comments on the Writing Custom Web Service for SharePont, Is it supported here (http://blog.libinuko.com/2011/02/16/sharepoint-writing-custom-web-service-for-sharepoint-is-it-supported/) ; you may have already created standard ASPNET web services. It is working, but with some limitation: You can not have path virtualization Virtualization is one of SharePoint’s technique provided by SPVirtualPath provider, that enable virtualization of your [...] <a href="http://blog.libinuko.com/2011/08/27/sharepoint-writing-custom-web-service-for-sharepoint-in-supported-mode-part-1/">[read more...]</a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>English</p>
<p>If you have read my comments on the Writing Custom Web Service for SharePont, Is it supported here (<a title="http://blog.libinuko.com/2011/02/16/sharepoint-writing-custom-web-service-for-sharepoint-is-it-supported/" href="http://blog.libinuko.com/2011/02/16/sharepoint-writing-custom-web-service-for-sharepoint-is-it-supported/">http://blog.libinuko.com/2011/02/16/sharepoint-writing-custom-web-service-for-sharepoint-is-it-supported/</a>) ; you may have already created standard ASPNET web services. It is working, but with some limitation:</p>
<ol>
<li>You can not have path virtualization
<p>Virtualization is one of SharePoint’s technique provided by SPVirtualPath provider, that enable virtualization of your web service path. For example, list.asmx will be available for <a href="http://mysite.com/_vti_bin/lists.asmx">http://mysite.com<strong>/_vti_bin/lists.asmx</strong></a> , or <a href="http://mysite.com/sites/myothersitecollection/_vti_bin/lists.asmx">http://mysite.com/sites/myothersitecollection<strong>/_vti_bin/lists.asmx</strong></a>. The site collection has been virtualized by SharePoint.</p>
<p>Without virtualization any web service consumer will have to access to the same path, usually in the root; for example <a href="http://&lt;webapps&gt;/_services/mywebservice.asmx">/_services/mywebservice.asmx&quot;&gt;/_services/mywebservice.asmx&quot;&gt;http://&lt;webapps&gt;/_services/mywebservice.asmx</a></p>
</li>
<li>You can not have SPContext
<p>SPContext is very powerful object in SharePoint development. Using this context, we can retrieve current SharePoint context without having to instantiate it. For example, you can get current SPWeb by calling SPContext.Current.Web – and you don’t need to dispose it (in fact you’re not suppose to dispose it). Still using SPContext you can have direct access to list and everything under SharePoint.</p>
<p>Without having direct access to SPContext, you have to instantiate SPWeb or SPSite using normal constructor with URL as parameter. It means new SPSite/SPWeb thread in the server memory, and you have to dispose it once you’ve done working with it.</p>
</li>
</ol>
<p>So, how can we write custom web service for SharePoint in supported mode?</p>
<p>Before we start, we have to understand SharePoint architecture and how does the processing works for web services. I take following picture from <a href="http://msdn.microsoft.com/en-us/library/bb892189(v=office.12).aspx">SharePoint Architecture</a> in MSDN. It describe how SharePoint process our request. There is SPHttpApplication which has SPRequestModule and any additional ASP.NET Module; and before the request returned back to the user SPHttpHandler is doint the job.</p>
<p><a href="http://blog.libinuko.com/files/2011/08/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.libinuko.com/files/2011/08/image_thumb.png" width="670" height="299" /></a></p>
<p><strong>How SharePoint process web services?</strong></p>
<p>If we dig into into the process on how SharePoint process request to web services in _vti_bin.</p>
<p><a href="http://blog.libinuko.com/files/2011/08/image2.png"><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" border="0" alt="image" src="http://blog.libinuko.com/files/2011/08/image_thumb2.png" width="809" height="282" /></a></p>
<p>There are 3 scenarios of http request to the web services,</p>
<ol>
<li>Disco request, identified by suffix ?DISCO in the web service address. For example, */_vti_bin/list.asmx?Disco </li>
<li>WSDL request, identified by suffix ?WSDL in the web service address. For example, */_vti_bin/list.asmx?Wsdl </li>
<li>Web service post request. For example, */_vti_bin/list.asmx?op=GetListItems </li>
</ol>
<p>Every request will be processed by SPHttpHandler (SharePoint) and ScriptHandlerFactory (system.web.extension), but the SPHttpHandler will be selective only for Disco and Wsdl request.</p>
<p>On disco/wsdl request, SPHttpHandler will transfer the request to wsdisco.aspx or wswsdl.aspx using <strong>Server.Execute</strong> operation. This operation ensure that wsdisco.aspx/wswsdl.aspx is receiving same request object. wsDISCO.aspx or wsWSDL.aspx will then instantiate SharePoint Context object. Any *.aspx will be successfully instantiate SharePoint context object because they are managed by SPHttpApplication and hence it also impacted by SPVirtualPath provider from SharePoint which will activate path virtualization.</p>
<p>Next, wsDISCO.aspx will transfer the request to the &lt;service&gt;DISCO.aspx and wsWSDL.aspx will transfer to the &lt;service&gt;WSDL.aspx – using Server.Execute operation. So here we have seen 2 transfer operation. At the end, the result is correct WSDL/DISCO request. The correct WSDL/DISCO will point to the correct virtual path of the request. <em>(Remember how do you create &lt;service&gt;disco.aspx / &lt;service&gt;wsdl.aspx) </em></p>
<p>When a consumer use the contract and tries to consume it. The SPHttpHandler will no longer intercept the request, but the normal ScriptHandlerFactory from System.Web.Extensions. However with the correct path in disco/wsdl, now the asmx now have the ability to look into current context from SharePoint. And hence you will be able to use SPContext.Current.Web in custom web services.</p>
<p>Part-2 is how to start create custom web services. I will need help from my buddy <a href="http://codebender.denniland.com">Denni</a> , he will code for me. –<img class="wlEmoticon wlEmoticon-openmouthedsmile" alt="Open-mouthed smile" src="http://blog.libinuko.com/files/2011/08/wlEmoticon-openmouthedsmile.png" /></p>
<p>&#160;</p>
<p>References</p>
<p>1. Writing Custom Web Services for SharePoint Products and Technology (<a title="http://msdn.microsoft.com/en-us/library/dd583131(v=office.11).aspx" href="http://msdn.microsoft.com/en-us/library/dd583131(v=office.11).aspx">http://msdn.microsoft.com/en-us/library/dd583131(v=office.11).aspx</a>)</p>
<p>2. SharePoint Architecture (<a title="http://msdn.microsoft.com/en-us/library/bb892189(v=office.12).aspx" href="http://msdn.microsoft.com/en-us/library/bb892189(v=office.12).aspx">http://msdn.microsoft.com/en-us/library/bb892189(v=office.12).aspx</a> )</p>
<p>3. Architectural Overview of Windows SharePoint Services (<a title="http://msdn.microsoft.com/en-us/library/dd583133(v=office.11).aspx" href="http://msdn.microsoft.com/en-us/library/dd583133(v=office.11).aspx">http://msdn.microsoft.com/en-us/library/dd583133(v=office.11).aspx</a>)</p>
<p>4. Modifying Built-In SharePoint Files (<a title="http://msdn.microsoft.com/en-us/library/bb803457(v=office.12).aspx" href="http://msdn.microsoft.com/en-us/library/bb803457(v=office.12).aspx">http://msdn.microsoft.com/en-us/library/bb803457(v=office.12).aspx</a>)</p>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://blog.libinuko.com/2011/08/27/sharepoint-writing-custom-web-service-for-sharepoint-in-supported-mode-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010: Remote StsAdm using PowerShell</title>
		<link>http://blog.libinuko.com/2011/08/24/powershell-remote-stsadm-using-powershell/</link>
		<comments>http://blog.libinuko.com/2011/08/24/powershell-remote-stsadm-using-powershell/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 16:39:45 +0000</pubDate>
		<dc:creator>cakriwut</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[StsAdm]]></category>

		<guid isPermaLink="false">http://blog.libinuko.com/2011/08/24/powershell-remote-stsadm-using-powershell/</guid>
		<description><![CDATA[English In large network, issuing a command to remote server from current terminal is sometimes necessary. Some propose client-server mode; for example Remote StsAdm (http://netstsadm.codeplex.com/) and other propose to use PsExec (http://thingsthatshouldbeeasy.blogspot.com/2009/08/run-stsadm-commands-remotely.html). The client-server mode requires installation of 3rd party tools. This kind of installation sometimes (or most of the time) is forbidden by company security [...] <a href="http://blog.libinuko.com/2011/08/24/powershell-remote-stsadm-using-powershell/">[read more...]</a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p><strong><em>English </em></strong></p>
<p>In large network, issuing a command to remote server from current terminal is sometimes necessary. Some propose client-server mode; for example Remote StsAdm (<a href="http://netstsadm.codeplex.com/">http://netstsadm.codeplex.com/</a>) and other propose to use PsExec (<a href="http://thingsthatshouldbeeasy.blogspot.com/2009/08/run-stsadm-commands-remotely.html">http://thingsthatshouldbeeasy.blogspot.com/2009/08/run-stsadm-commands-remotely.html</a>).</p>
<p>The client-server mode requires installation of 3rd party tools. This kind of installation sometimes (or most of the time) is forbidden by company security policy. <br />
	Second option using PsExec from SysInternal (now part of Microsoft) doesn&#39;t requires installation to SharePoint server and may be the correct approach. However, I am not convince that this tools will be compatible with the future Operating System.</p>
<p><strong>So, what is the option? </strong> <br />
	PowerShell and Remoting!</p>
<p>PowerShell has been introduced during Windows 2008 era. However, Windows 2003 server owner can apply KB968930 (http://support.microsoft.com/kb/968930) to bring PowerShell functionality to their server. PowerShell will replace command.com because of the flexibility &#8211; enabling integration between shell and operating system itself.</p>
<p><strong>Let&#39;s get our job done </strong></p>
<p>1. First enable remoting on the SharePoint Server.</p>
<pre class="brush: ps;  html-script: false">    Enable-PSRemoting -Force</pre>
<p>2.&nbsp; Prepare the stsadm command alias</p>
<pre class="brush: ps; html-script: false"> $executable = &quot;$env:ProgramFiles\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe&quot; </pre>
<p>&nbsp;</p>
<p>3.&nbsp; Remember my previous post about how to avoid double hop problem? (<a href="http://blog.libinuko.com/2011/04/29/powershell-how-to-overcome-double-hop-problem-in-powershell-remoting-2/" title="http://blog.libinuko.com/2011/04/29/powershell-how-to-overcome-double-hop-problem-in-powershell-remoting-2/">http://blog.libinuko.com/2011/04/29/powershell-how-to-overcome-double-hop-problem-in-powershell-remoting-2/</a>) . Now we will create new function that uses Invoke-RemoteCommand. Basically, we will construct commandline parameter for Invoke-RemoteCommand. We also try to provide AS-IF user call stsadm.</p>
<pre class="brush:ps; html-script: false">function StsAdm
{
   param(
      [string] $commandOptions,
      [string] $username,
      [string] $password
   )

   $executable = &quot;$env:ProgramFiles\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe&quot;

   Invoke-RemoteCommand -commandline &quot;&#39;$executable&#39; $commandOptions&quot; -username $username -password $password

}

Usage : StsAdm -commandOptions &quot;-o enumwebs&quot; -username &quot;setup account&quot; -password &quot;setup password&quot;</pre>
<p>And voila, you have remote stsadm function without compromising security policy.</p>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://blog.libinuko.com/2011/08/24/powershell-remote-stsadm-using-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to configure SharePoint List for Visio Diagram data source</title>
		<link>http://blog.libinuko.com/2011/08/20/how-to-configure-sharepoint-list-for-visio-diagram-data-source-2/</link>
		<comments>http://blog.libinuko.com/2011/08/20/how-to-configure-sharepoint-list-for-visio-diagram-data-source-2/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 03:33:00 +0000</pubDate>
		<dc:creator>cakriwut</dc:creator>
				<category><![CDATA[Office]]></category>
		<category><![CDATA[Office 2010]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://blog.libinuko.com/2011/08/20/how-to-configure-sharepoint-list-for-visio-diagram-data-source-2/</guid>
		<description><![CDATA[English: Some of you may be not aware that we can use SharePoint List for Visio Diagram data source. So how can we configure SharePoint List for Visio Diagram data source? Following steps demonstrate how to do it using SharePoint 2010 and Visio 2010, however it also applies to SharePoint 2007 or Visio 2007. Step-by-step Open Visio (.vsd) [...] <a href="http://blog.libinuko.com/2011/08/20/how-to-configure-sharepoint-list-for-visio-diagram-data-source-2/">[read more...]</a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>English:</p>
<p>Some of you may be not aware that we can use SharePoint List for Visio Diagram data source. So how can we configure SharePoint List for Visio Diagram data source? </p>
<p>Following steps demonstrate how to do it using SharePoint 2010 and Visio 2010, however it also applies to SharePoint 2007 or Visio 2007.</p>
<p><strong>Step-by-step</strong></p>
<ol>
<li>Open Visio (.vsd) file. </li>
<li>On <strong>Data</strong> tab, and&#160; <b>Link Data to Shapes</b>.
<p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/3731.SharePoint_5F00_Visio_5F00_Step1.png"><img alt=" " src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/3731.SharePoint_5F00_Visio_5F00_Step1.png" /></a>       </li>
<li>On&#160; <strong>Data Selector</strong> window, choose <b>Microsoft SharePoint Foundation list</b>.
<p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/8306.SharePoint_5F00_Visio_5F00_Step2.png"><img alt=" " src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/8306.SharePoint_5F00_Visio_5F00_Step2.png" width="514" height="412" /></a>       </li>
<li>Type SharePoint website URL
<p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/3108.SharePoint_5F00_Visio_5F00_Step3.png"><img alt=" " src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/3108.SharePoint_5F00_Visio_5F00_Step3.png" width="508" height="405" /></a>       </p>
<p><strong>Note</strong>: Enter username and password combination if necessary.       </p>
<p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/6404.SharePoint_5F00_Visio_5F00_Step4.png"><img alt=" " src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/6404.SharePoint_5F00_Visio_5F00_Step4.png" width="497" height="413" /></a>       </li>
<li>Choose SharePoint list that you want to use, then click <strong>Next</strong> and <strong>Finish</strong>.<b>        <br /></b>      <br /><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/5444.SharePoint_5F00_Visio_5F00_Step7.png"><img alt=" " src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/5444.SharePoint_5F00_Visio_5F00_Step7.png" width="496" height="402" /></a>       </li>
<li>You will return to the main Visio diagram with data table from SharePoint list. Then you can use the table (linked-to-SharePoint List) as data source for your diagram.
<p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/8203.SharePoint_5F00_Visio_5F00_Step6.png"><img alt=" " src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/8203.SharePoint_5F00_Visio_5F00_Step6.png" /></a> </li>
</ol>
<p><strong>Source: </strong><a title="http://social.technet.microsoft.com/wiki/contents/articles/4225.aspx" href="http://social.technet.microsoft.com/wiki/contents/articles/4225.aspx"><strong>http://social.technet.microsoft.com/wiki/contents/articles/4225.aspx</strong></a></p>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://blog.libinuko.com/2011/08/20/how-to-configure-sharepoint-list-for-visio-diagram-data-source-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webcast : Microsoft Project 2010 Solution Starters series</title>
		<link>http://blog.libinuko.com/2011/07/29/webcast-microsoft-project-2010-solution-starters-series/</link>
		<comments>http://blog.libinuko.com/2011/07/29/webcast-microsoft-project-2010-solution-starters-series/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 09:28:00 +0000</pubDate>
		<dc:creator>cakriwut</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Project Server]]></category>

		<guid isPermaLink="false">http://blog.libinuko.com/2011/07/29/webcast-microsoft-project-2010-solution-starters-series/</guid>
		<description><![CDATA[English There are some webcast about Microsoft Project 2010 Solution Starters. It demonstrate the power and extensibility of SharePoint 2010 and Project 2010. Find out yourself on user experience series and code walkthrough here: User experience series: 1. Microsoft Project 2010 Solution Starters &#8211; User Experience #1 2. Microsoft Project 2010 Solution Starters &#8211; User [...] <a href="http://blog.libinuko.com/2011/07/29/webcast-microsoft-project-2010-solution-starters-series/">[read more...]</a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>English</p>
<p>There are some webcast about Microsoft Project 2010 Solution Starters. It demonstrate the power and extensibility of SharePoint 2010 and Project 2010. Find out yourself on user experience series and code walkthrough here:</p>
<p>User experience series:</p>
<p>1. Microsoft Project 2010 Solution Starters &#8211; <a title="http://www.microsoft.com/events/series/epm.aspx?tab=Webcasts&amp;seriesid=51&amp;webcastid=13339" href="http://www.microsoft.com/events/series/epm.aspx?tab=Webcasts&amp;seriesid=51&amp;webcastid=13339">User Experience #1</a>    <br />2. Microsoft Project 2010 Solution Starters &#8211; <a href="http://www.microsoft.com/events/series/epm.aspx?tab=Webcasts&amp;seriesid=51&amp;webcastid=13340">User Experience #2</a></p>
<p>Code walkthrough:</p>
<p>1. <a href="http://www.microsoft.com/events/series/epm.aspx?tab=Webcasts&amp;seriesid=51&amp;webcastid=13341">Microsoft Project 2010 Solution Starters Drilldown &amp; Code Walkthrough</a> #1    <br />2. <a href="http://www.microsoft.com/events/series/epm.aspx?tab=Webcasts&amp;seriesid=51&amp;webcastid=13342">Microsoft Project 2010 Solution Starters Drilldown &amp; Code Walkthrough #2</a>    <br />3. <a href="http://www.microsoft.com/events/series/epm.aspx?tab=Webcasts&amp;seriesid=51&amp;webcastid=13342">Microsoft Project 2010 Solution Starters Drilldown &amp; Code Walkthrough #3</a>    <br />4. <a href="http://www.microsoft.com/events/series/epm.aspx?tab=Webcasts&amp;seriesid=51&amp;webcastid=13343">Microsoft Project 2010 Solution Starters Drilldown &amp; Code Walkthrough #4</a></p>
<p>So , are you dare to take the challenge and move to the new platform?</p>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://blog.libinuko.com/2011/07/29/webcast-microsoft-project-2010-solution-starters-series/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010 Service Packs 1</title>
		<link>http://blog.libinuko.com/2011/07/01/sharepoint-2010-service-packs-1/</link>
		<comments>http://blog.libinuko.com/2011/07/01/sharepoint-2010-service-packs-1/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 08:34:00 +0000</pubDate>
		<dc:creator>cakriwut</dc:creator>
				<category><![CDATA[Office]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Service Packs]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.libinuko.com/2011/07/01/sharepoint-2010-service-packs-1/</guid>
		<description><![CDATA[English A few days ago, Microsoft has released Service Packs 1 for SharePoint 2010. As usual, the installation must follow general rules of installation order: 1. SharePoint Foundation 2. SharePoint Foundation Language Packs 3. SharePoint Server 2010 4. SharePoint Server 2010 Language Packs And if you have SharePoint Server 2010, [...] <a href="http://blog.libinuko.com/2011/07/01/sharepoint-2010-service-packs-1/">[read more...]</a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>English</p>
<p>A few days ago, Microsoft has released Service Packs 1 for SharePoint 2010. As usual, the installation must follow general rules of installation order:</p>
<p>1. SharePoint Foundation   <br />2. SharePoint Foundation Language Packs    <br />3. SharePoint Server 2010    <br />4. SharePoint Server 2010 Language Packs</p>
<p>And if you have SharePoint Server 2010, you can run SharePoint Configuration Wizard after completing installation of all service packs. You can skip SharePoint Configuration Wizard on installation order 1-3.</p>
<p>If you have multiple servers in a farm, make sure that you have perform the installation in all servers before kicking-in SharePoint Configuration Wizard in the server. </p>
<p>More information from the team blog : <a title="http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=984" href="http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=984">http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=984</a></p>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://blog.libinuko.com/2011/07/01/sharepoint-2010-service-packs-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell : Compress files with Windows an improved version</title>
		<link>http://blog.libinuko.com/2011/06/09/powershell-compress-files-with-windows-an-improved-version/</link>
		<comments>http://blog.libinuko.com/2011/06/09/powershell-compress-files-with-windows-an-improved-version/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 14:43:00 +0000</pubDate>
		<dc:creator>cakriwut</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://blog.libinuko.com/?p=666</guid>
		<description><![CDATA[English When I am looking for a way to compress file(s) into Zip, I find a blog from David Aiken here (Compress Files with Windows PowerShell then package a Windows Vista Sidebar Gadget) . I will just focus on Add-Zip function and nothing more. Here is the original code: &#160; function Add-Zip { param([string]$zipfilename) [...] <a href="http://blog.libinuko.com/2011/06/09/powershell-compress-files-with-windows-an-improved-version/">[read more...]</a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>English</p>
<p>When I am looking for a way to compress file(s) into Zip, I find a blog from David Aiken here (<a href="http://blogs.msdn.com/b/daiken/archive/2007/02/12/compress-files-with-windows-powershell-then-package-a-windows-vista-sidebar-gadget.aspx">Compress Files with Windows PowerShell then package a Windows Vista Sidebar Gadget</a>) . I will just focus on Add-Zip function and nothing more.</p>
<p>Here is the original code:</p>
<p>&#160;</p>
<pre class="brush: ps; highlight: [12,16]; html-script: false">function Add-Zip
{
    param([string]$zipfilename) 

    if(-not (test-path($zipfilename)))
    {
           set-content $zipfilename (&quot;PK&quot; + [char]5 + [char]6 + (&quot;$([char]0)&quot; * 18))
           (dir $zipfilename).IsReadOnly = $false
     } 

     $shellApplication = new-object -com shell.application
     $zipPackage = $shellApplication.NameSpace($zipfilename) 

     foreach($file in $input)
     {
            $zipPackage.CopyHere($file.FullName)
            Start-sleep -milliseconds 500
     }
}

usage: dir c:\demo\files\*.* -Recurse | add-Zip c:\demo\myzip.zip</pre>
<p>I am raising two problems with the code:</p>
<p>1. Looking at the usage example, it is clear that the function accept <strong>only fully path filename</strong>. The reason, on line-12 , the $shellApplication.NameSpace parameter is $zipfilename; and this is not possible without giving fully path filename. </p>
<p>2. On line-16, the operation expect that $input array will contains object with FullName properties, that why the usage example uses DIR. What about if you just want to specify a filename?</p>
<p>With the 2 problem above, I am ready to improve that function. In the new improved version, Get-ChildItem will help us to convert any string representation of a file to a fully path filename. It won’t break DIR piping functionality, since actually Get-ChildItem is dir (and extra) functionality.</p>
<p>Here is the improved version:</p>
<pre class="brush: ps; highlight: [5,15,16]; html-script: false">function Add-Zip
{
	param([string]$zipfilename)

    $currFile = $zipfilename | get-childitem
	if(-not (test-path($zipfilename)))
	{
		set-content $currFile.FullName (&quot;PK&quot; + [char]5 + [char]6 + (&quot;$([char]0)&quot; * 18))
		(dir $currFile.FullName).IsReadOnly = $false
	}

	$shellApplication = new-object -com shell.application
	$zipPackage = $shellApplication.NameSpace($currFile.Fullname)

	$input | % {
            $file = $_ | get-childitem
            $zipPackage.CopyHere($file.FullName)
            Start-sleep -milliseconds 500
	}
}

usage: &quot;FileInThisFolder.txt&quot; -Recurse | add-Zip &quot;ZipInThisFolder.zip&quot;
        dir c:\demo\files\*.* -Recurse | add-Zip c:\demo\myzip.zip</pre>
<p>So, I hope you enjoy the improved version.</p>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://blog.libinuko.com/2011/06/09/powershell-compress-files-with-windows-an-improved-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

