Saturday 29 April 2017

Wappalyzer and Sharepoint 2013

Somehow, I am stuck on the issue to hide my server details from the outside world. But there are a lot of browser extensions available out there. I had a humongous argument with my Application security Team for this but till now I am unable to rectify it. Extensions Like wappalyzer which usually reveals almost major of your server details which need not be shown to anyone. Whatsoever changes you do in your Web Application configuration file but it still does not work and reveals almost everything. But, after scratching your head for almost 5 days and after some research I visited the Microsoft website and thought to run the same extension on the Microsoft So after painful of 5 days I confronted that even Microsoft is unable to hide its own server details. So if anyone came across with the same issue as of mine and were able to solve please put it down in the comments.



Solution Till Date :
1. Add in outbound rules of your Web.config
<rule name="Remove Server header">
<match serverVariable="RESPONSE_Server" pattern=".+" />
<action type="Rewrite" value="" />
</rule>

2. Add enableVersionHeader="false" in httpruntine of your web.config

Reference :
Link 1
Link 2

Friday 28 April 2017

Migrate a single list from SharePoint 2007 to 2010 using a list template




1)Save the list as a list template (".stp" file). from List Settings
2)Click on Download Template to "Download the list template"
3)Change the extension to ".cab" and extract the contents
4)Edit the manifest.xml file using Notepad and chang the ProductVersion element from 3 to 4
5)Repackage the STP file using command promt.
   Syntax to package is:
   Makecab <SourceFolder\manifest.xml> <SourceFolder\templateName.stp>
6)Upload the STP file to your SharePoint 2010 site
7)Create a new list using the template.

Path for the Host File

I posted this very simple, because many times when I work on SharePoint.

I usually forgot the path for Host Entry to check.

Path : C:\Windows\System32\Drivers\etc\hosts

Friday 21 April 2017

IIS URL Rewrite HTTP to HTTPS with Port

Rewrite rule port 81/84 to 443 iis

 <rule name="HTTP to HTTPS on different SSL Port" enabled="true" stopProcessing="true">
                <match url="(.*)" ignoreCase="true" />
                <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
                    <add input="{HTTPS}" pattern="off" />
                    <add input="{HTTP_HOST}" pattern="([^/:]*?):[^/]*?" />
                </conditions>
                <action type="Redirect" url="https://{C:1}:443/{R:0}" appendQueryString="false" />
            </rule>
      </rules>

Thursday 20 April 2017

Mask created/modified user name from SharePoint list item forms and views using PowerShell




Note: 

Kindly change URL and List Name where ever required.

1)Mask UserName For Single List

#Get Web and List objects
$web = Get-SPWeb "URL"
$list = $web.Lists["ListName"]

#Disable user from appearing in item dialogs
$list.ShowUser = $false
$list.Update()

#Dispose of Web object
$web.Dispose()

2)Un-Mask UserName For Single List

#Get Web and List objects
$web = Get-SPWeb "URL"
$list = $web.Lists["ListName"]

#Disable user from appearing in item dialogs
$list.ShowUser = $true
$list.Update()

#Dispose of Web object
$web.Dispose()

3)Mask UserName For All List in Sharepoint Web Application

Add-PSSnapin Microsoft.Sharepoint.Powershell
$site = Get-SPSite "URL"
$sitelists = foreach ($web in $site.AllWebs) {
foreach($list in $web.lists){ 
#Disable user from appearing in item dialogs
$list.ShowUser = $false
$list.Update()
 }
}
Remove-PsSnapin Microsoft.SharePoint.PowerShell

4)Un-Mask UserName For All List in Sharepoint Web Application

Add-PSSnapin Microsoft.Sharepoint.Powershell
$site = Get-SPSite "URL"
$sitelists = foreach ($web in $site.AllWebs) {
foreach($list in $web.lists){ 
#Disable user from appearing in item dialogs
$list.ShowUser = $true
$list.Update()
 }
}
Remove-PsSnapin Microsoft.SharePoint.PowerShell

how to debug powershell script

Windows PowerShell ISE:
Windows Powershell ISE tool  come along with the installation of windows server 2012.

Once you click on the Windows Powershell ISE  App, It will open the below screen. Where you can create a new script file by choosing file icon.
I am using the once of scripts which you have seen in this blog for the demo.
To debug the script select the line of code where you want to place the breakpoint and then go to "Debug" menu option and click on "Toggle BreakPoint" or F9. This will add the breakpoint.


When you execute the script by pressing F5 keyword, once it hits the breakpoint you can debug the scripts. See the below screenshot where we are finding the value of "$webapp" which webapplication value.


  

How to get list of site-collections in a particular web application using Powershell in a text file



get-spsite -limit all -WebApplication http://yourWebapplicationUrl | Out-File -FilePath "C:\Users\YourUserName\Documents\spSites.txt"

Extract all list names from sharepoint site to csv

A PowerShell script that loop through a site collection and list down all the list title in excel format


Add-PSSnapin Microsoft.Sharepoint.Powershell
$site = Get-SPSite "SiteURL"
$sitelists = foreach ($web in $site.AllWebs) {
foreach($list in $web.lists){ $list }}
$sitelists |select Title | Export-CSV C:\liststitles.csv
Remove-PsSnapin Microsoft.SharePoint.PowerShell 

Tuesday 18 April 2017

sharepoint 2013 url rewrite https

1. Download

https://www.iis.net/downloads/microsoft/url-rewrite

2. Go To Link

how to insert a data table into sql server database table

1 .Create a User-Defined TableType in your database:

CREATE TYPE [dbo].[MyTableType] AS TABLE(
    [Id] int NOT NULL,
    [Name] [nvarchar](128) NULL
)

2. Define a parameter in your Stored Procedure:

CREATE PROCEDURE [dbo].[InsertTable]
    @myTableType MyTableType readonly
AS
BEGIN
    insert into [dbo].Records select * from @myTableType 
END

3. send your DataTable directly to sql server:

using (var command = new SqlCommand("InsertTable") {CommandType = CommandType.StoredProcedure})
{
    var dt = new DataTable(); //create your own data table
    command.Parameters.Add(new SqlParameter("@myTableType", dt));
    SqlHelper.Exec(command);
}

Note: To edit the values inside stored-procedure, you can declare a local variable with the same type and insert input table into it:

DECLARE @modifiableTableType MyTableType 
INSERT INTO @modifiableTableType SELECT * FROM @myTableType
Then, you can edit @modifiableTableType:

UPDATE @modifiableTableType SET [Name] = 'new value'

Wednesday 12 April 2017

Deny Access to _vti_bin SharePoint 2010

Case Study :
Dears,
we have implemented a SharePoint 2010 portal that is published for both Anonymous and "Windows" Authenticated users, this was by creating an extension from the "Windows Authenticated" site and configuring the security for the extension to allow anonymous users.
We have received a security test results from the host of the published site requiring us to prevent access to _vti_bin folder, we applied all the configurations recommended by Microsoft and Microsoft users (adding authorization rules to web.config) but yet the _vti_bin folder still accessible.
Please advise if accessing the _vti_bin folder is a security issue or not, and if yes how can we solve it in our case.
Solution:
No, it should not be a security issue.



Limited Access not enough permissions to Folder

To check if the feature is already activated enter the following command:

get-spfeature -site http://sitecollectionURL

To enable the feature use the following command:

enable-spfeature viewformpageslockdown -url http://sitecollectionURL

Increase maximum size of List Template SharePoint 2013

Error : The list is too large to save as a template.

Note : There is a hard limit of 500MB. By default it is 10 MB.

Step 1.
If you try to save a list as a list template, you may see the following error due to the list being too large:

The list is too large to save as a template. The size of a template cannot exceed 10485760 bytes.

You can increase the maximum size of a list / site template by running the following command (note that 500mb is the largest you can go):

stsadm -o setproperty -propertyname max-template-document-size -propertyvalue 50000000

Step 2.
1)Go to Application Management
2)Go to Manage Web Application
3)Select Web Application
4)Select General Settings drop down from ribbon
5)From the drop down menu select Resource Throttling
6)Go to List View Threshold and change the value upto 100000(as per your need)

Tuesday 11 April 2017

Unable to deploy the feature

1)Unable to deploy the feature from visual studio after renaming it

2)What is causing a "Cannot find a Feature" error when uninstalling a solution?

3)Remove feature using id force

4)Uninstalling feature with force command doesn't work

5)Feature with ID 15/.. has already been installed. Use the force attribute to explicitly re-install the feature

Solution :

Finally  I was able to deploy the solution.

Following below PowerShell's

1)"Uninstall-SPFeature<Guid> -force" will not work.

You should use "stsadm-o uninstallfeature -id <Guid> -force" instead.

2)The solution cannot be deployed.  The feature  uses the directory  in the solution. However, it is currently installed in the farm to the directory

The reason why they don't show up in PowerShell is the missing Scope, those feature are orphaned, indeed. We cannot use -Site parameter. What you can do is to list it in PowerShell without -Site parameter and filter out those without Scope:

Get-SPFeature | ? { $_.Scope -eq $null }

This will give you a complete list of orphaned features.

The workaround is to use the DisplayName to get the spfeature (actually SPFeatureDefinition) and then delete it.

$feature = Get-SPFeature | ? { $_.DisplayName -eq "My_Orphane_Feature" }
$feature.Delete()

I have tested this code and it has worked for me.

You can even use this code to clean all the orphaned features:

Get-SPFeature | ? { !$_.Scope } | % { $_.Delete() }

Site Map Web Part (SharePoint 2013)



Introduction

Site Map Web Part displays structure of a Microsoft SharePoint Server 2013 site in a hierarchical tree that is expandable and collapsible. This web part is adapted from my SharePoint Server 2010 version.

Description

This Web Part uses a SiteMapProvider to render the site structure in a hierarchical tree that is expandable and collapsible. The SiteMapProvider is referenced from the site's web.config and is defaulted to be CurrentNavigationSwitchableProvider, which supports both Managed and Structural navigation. In a publishing site, options to show subsites and/or pages are defined by each web's Navigation setting.
It has several public properties:
  • SiteMapProvider - (Site Map Provider) A site map provider that inherits from type SiteMapProviderdefined in web.config. Default is CurrentNavigationSwitchableProvider.
  • StartNodeKey - (Starting Site URL) Server-relative URL for a starting sub-site.
    For example: /PressReleases/2013. Default is /, the root site. If set to blank, starting sub-site will be the current site.
  • ExpandMap - (Expand Map?) Expand all nodes on page load. Default is true.
  • MaxLevels - (Maximum levels) Maximum number of node levels. Default is 0 for unlimited.
  • ListCssClass - CSS class name for the outermost <ul> tag. Default is smwp-list.
  • CurrentNodeCssClass - CSS class name for the current node. Default is smwp-current-node.
The Web Part uses a resource file to store all messages and property attribute UI strings. It demonstrates how to develop a custom class that inherits WebDescriptionAttributeWebDisplayNameAttribute or CategoryAttribute and returns a localized string from your own Resource Manager.
The supplied Visual Studio 2013 solution includes all the support files you need to build and deploy this Web Part, minus the strong name key file. It makes full use of the built-in SharePoint integration. No more third party tools or custom pre and post build scripts are needed to build the SharePoint solution file.

Installation

Open SharePoint 2013 Management Shell, add solution file QuestechSystems.SharePoint.SiteMapWebPart.wsp using Add-SPSolution like
Add-SPSolution "C:\_deployment\QuestechSystems.SharePoint.SiteMapWebPart.wsp"

Go to SharePoint 2013 Central Administration/System Settings/Manage farm solutions. Deploy the installed solution to selected web applications. In the site collection where the solution is deployed, activate the Site Collection Feature Questech Systems Site Map Web Part. After that, the Site Map Web Part (listed under Questech Systems) should be available for you to add to pages.


Download Site Map SharePoint 2013

Reference : https://www.codeproject.com/Articles/775248/Site-Map-Web-Part-SharePoint

Monday 10 April 2017

How To: Use Regular Expressions to Constrain Input in ASP.NET / Sharepoint

CompareValidator Datecpv = new CompareValidator();
Datecpv.ID = "Datecpv" ;
Datecpv.Text = "Date should not be greater than current date";
Datecpv.ControlToValidate = "";
Datecpv.Type = ValidationDataType.Date;
Datecpv.Operator = ValidationCompareOperator.LessThan;
Datecpv.ValueToCompare = DateTime.Today.ToShortDateString();

RegularExpressionValidator regDOB = new RegularExpressionValidator();
regDOB.ID = "regDOB";
regDOB.Text = "<br/>Please enter a valid Date of Birth dd/mm/yyyy.";
regDOB.ControlToValidate = "";
regDOB.ValidationExpression = @"^([0-9]{1,2})[/]+([0-9]{1,2})[/]+([0-9]{2}|[0-9]{4})$";                 regDOB.Attributes.Add("style", "font-weight: bold;color:red;");
newRow.Controls.Add(regDOB);

RegularExpressionValidator regCountry = new RegularExpressionValidator();                                       regCountry.ID = "reg_STD";
regCountry.Text = "Please enter a valid country code.";
regCountry.ControlToValidate = "";
regCountry.ValidationExpression = @"^\+[0-9]{1,2}$";
regCountry.Attributes.Add("style", "font-weight: bold;color:red;");
newRow.Controls.Add(regCountry);

RegularExpressionValidator regSTD = new RegularExpressionValidator();
regSTD.ID = "reg_STD";
regSTD.Text = "Please enter a valid STD code.";
regSTD.ControlToValidate = "";
regSTD.ValidationExpression = @"^[0-9]{1,6}$";
regSTD.Attributes.Add("style", "font-weight: bold;color:red;");
newRow.Controls.Add(regSTD);

RegularExpressionValidator regPhNumber = new RegularExpressionValidator();
regPhNumber.ID = "reg_PhNumber";
regPhNumber.Text = "Please enter a valid Phone number.";
regPhNumber.ControlToValidate = "";
regPhNumber.ValidationExpression = @"^[0-9]{1,12}$";
regPhNumber.Attributes.Add("style", "font-weight: bold;color:red;");
newRow.Controls.Add(regPhNumber);

Security: Protecting SharePoint Server Applications / FrontPage Server Extensions vulnerable

1) SharePoint and FrontPage Server Extensions in security scanner results

https://ipsec.pl/pentest/2013/sharepoint-and-frontpage-server-extensions-security-scanner-results.html

2) Is FrontPage Server Extensions vulnerable in SharePoint 2013?

http://thuansoldier.net/?p=4298

<location path="_vti_inf.html">
  <system.web>
    <authorization>
       <deny users= "?" />
       <allow users = ”*” />
    </authorization>
  </system.web>
</location>

The asterisk mark (*) represents authenticated user and the question mark (?) represents anonymous user.

3) Security: Protecting SharePoint Server Applications

https://blogs.msdn.microsoft.com/fabdulwahab/2015/08/15/security-protecting-sharepoint-server-applications/

SharePoint: Browser File Handling Deep Dive

#URL for Browser file handling DEEP DIVE :  https://social.technet.microsoft.com/wiki/contents/articles/8073.sharepoint-browser-file-handling-deep-dive.aspx
#URL for MIME Types : http://stackoverflow.com/questions/4212861/what-is-a-correct-mime-type-for-docx-pptx-etc
#URL for HTML :https://sharepointobservations.wordpress.com/2014/05/15/sharepoint-2013-enable-browser-handling-for-specific-file-types/

#General Settings has to be strict

#HTML

#ADD

$webApplication = Get-SPWebApplication "URL"
$webApplication.AllowedInlineDownloadedMimeTypes.Add("text/html")
$webApplication.Update()

#REMOVE

$webApplication = Get-SPWebApplication "URL"
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("text/html")
$webApplication.Update()

#EXCEL/PDF/WORD

#REMOVE WILL GIVE OPTION FOR SAVE AND CANCEL IN IE

$webApplication = Get-SPWebApplication "URL"
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/vnd.openxmlformats-officedocument.wordprocessingml.document") 
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/msword")
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/vnd.ms-word.document.12") 
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") 
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/vnd.ms-excel")
$webApplication.Update()

#ADD WILL GIVE OPTION FOR OPEN AND CANCEL IN IE

$webApplication = Get-SPWebApplication "URL"
$webApplication.AllowedInlineDownloadedMimeTypes.Add("application/vnd.openxmlformats-officedocument.wordprocessingml.document") 
$webApplication.AllowedInlineDownloadedMimeTypes.Add("application/msword")
$webApplication.AllowedInlineDownloadedMimeTypes.Add("application/vnd.ms-word.document.12") 
$webApplication.AllowedInlineDownloadedMimeTypes.Add("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") 
$webApplication.AllowedInlineDownloadedMimeTypes.Add("application/vnd.ms-excel")
$webApplication.Update()

Tuesday 4 April 2017

Famous SharePoint URLs & Locations


As most of SharePoint Professionals, I have been keeping the list of handy URLs to navigate through my day to day tasks. 
(Remember for SharePoint 2013, 2016 you might want to add “15”, “16” respectively after “/_layouts/” but if you don’t SharePoint will take care of that for you) .. Also some of these are turned off on Office 365 SharePoint online.

Site collection level recycle bin:
/_layouts/15/AdminRecycleBin.aspx

Site level recycle bin:
/_layouts/RecycleBin.aspx

Recreate default site sp groups:
_layouts/15/permsetup.aspx

Load document tab initial 
?InitialTabId=Ribbon.Document

Delete user from Site collection (on-premises):
/_layouts/15/people.aspx?MembershipGroupId=0

Display list in grid view. ‘True’ is case sensitive:
?ShowInGrid=True

Quick Launch settings page:
/_layouts/quiklnch.aspx

Navigation Settings page:
/_layouts/15/AreaNavigationSettings.aspx

Sandboxed Solution Gallery:
/_catalogs/solutions/Forms/AllItems.aspx

Workflow history hidden list:
/lists/Workflow History

Filter toolbar for Lists and libraries:
?Filter=1
Site usage page:
/_layouts/usage.aspx

Site content and structure  page:
/_layouts/sitemanager.aspx

Site settings page:
/_layouts/settings.aspx

View all site content page (Site content):
/_layouts/viewlsts.aspx

Manage site collection features – CASE SENSITIVE :
/_layouts/ManageFeatures.aspx?Scope=Site

Manage site features:
/_layouts/ManageFeatures.aspx

 Get the version of the SharePoint server (Patch level):
 /_vti_pvt/Service.cnf

Web Part Maintenance Page:
?Contents=1

Show Page in Dialog View:
?isdlg=1

Application page for registering SharePoint apps
/_layouts/15/appregnew.aspx

Save Site as a template
/_layouts/savetmpl.aspx

Sign in as a different user
/_layouts/closeConnection.aspx?loginasanotheruser=true

Enable SharePoint designer
/_layouts/SharePointDesignerSettings.aspx

Welcome Page (Default page settings)
/_layouts/AreaWelcomePage.aspx

Change Site Master Page
/_layouts/ChangeSiteMasterPage.aspx

Page Layouts and Site Templates
/_Layouts/AreaTemplateSettings.aspx

Master Pages library
/_catalogs/masterpage/Forms/AllItems.aspx

Quick Deploy List
Quick%20Deploy%20Items/AllItems.aspx
Open Page in Edit Mode
?ToolPaneView=2

Taxonomy Hidden List (MMS)
Lists/TaxonomyHiddenList/AllItems.aspx

User Information List:
 _catalogs/users
_catalogs/users/simple.aspx

Force displaying the user profile in the site
collection:
/_layouts/userdisp.aspx?id={UserID}&Force=True

Site hierarchy page (lists of sub sites) :
/_layouts/vsubwebs.aspx
/_layouts/1033/vsubwebs.aspx

Some of these URLs are specific to a SharePoint version or to a site collection template.

How To Upload MasterPages, Display Templates Into SharePoint 2013 Using PowerShell

1. You can upload master pages as well as Blank-web-part 
2. Just create a folder in c drive and rename the folder to Docs and paste the master page or blank web part page in the folder
3. Run the command in power shell 
4. The command will upload, publish and approve the files which are under Docs folder.

Note: Do not forget to change the url. 

$webAppUrl = "http://c4968397007/" # Web Application URL
  
 [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint")
 [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Sharepoint.Administration")
  
 $checkInComment="Check In by PowerShell"
 $publishComment="published by PowerShell"
 $approveComment="Approved by PowerShell"
  
 $logfile = "UploadMasterPage_$(get-date -f yyyyMMdd_hhmmss).log"
 $spsite = new-object Microsoft.Sharepoint.SPSite($webAppUrl);
 $web = $spsite.RootWeb;
   
 $masterPageList = ($web).GetFolder("Content Web Parts")
  
 # Get file system path
 $masterPageLocalDir = "C:\Docs"
  
 #For upload all files in document library from file system
 foreach ($file in Get-ChildItem $masterPageLocalDir)
     {
         $web.AllowUnsafeUpdates=$true;
         try
         {
             if ([Microsoft.SharePoint.Publishing.PublishingSite]::IsPublishingSite($spsite)) 
             {      
                 $stream = [IO.File]::OpenRead($file.fullname)
                 $destUrl = $web.Url + "/_catalogs/masterpage/Display Templates/Content Web Parts/" + $file.Name;
                 $masterPageFile=$web.GetFile($destUrl)
                  
                 if($masterPageFile.CheckOutStatus -ne "None")
                 {                  
                     $web.AllowUnsafeUpdates  = $true;
                     $masterPageList.files.Add($destUrl,$stream,$true)
                     $stream.close()                        
                     $masterPageFile.CheckIn($checkInComment);                        
                     $masterPageFile.Publish($publishComment);                
                     $masterPageFile.Approve($approveComment);
                     $masterPageFile.Update();         
                     $web.Update();
                     $web.AllowUnsafeUpdates  = $false;
                     $outputText = $file.Name+ " Master Page uploaded on $web site"
                     write-output $outputText
                     write-output $outputText |  out-File $logfile -Append
                 }
                 else
                 {
                     $masterPageFile.CheckOut();
                     try{
                     $masterPageList.Files.Add($destUrl,$stream,$true)
                     }
                     catch
                     {
                     write-Output $_
                     }
                     $stream.close()                              
                     $masterPageFile.CheckIn($checkInComment);                          
                     $masterPageFile.Publish($publishComment);                          
                     $masterPageFile.Approve($approveComment);
                     $masterPageFile.Update();         
                     $web.Update();
                     $web.AllowUnsafeUpdates  = $false;
                     $outputText = $file.Name +  " Master Page uploaded on $web site"
                     write-output $outputText
                     write-output $outputText |  out-File $logfile -Append
                 }
             }      
             else
             {      
                 $stream = [IO.File]::OpenRead($file.fullname)
                 $destUrl = $web.Url + "/_catalogs/masterpage/Display Templates/Content Web Parts/" +$file.Name
                 $masterPageFile=$web.GetFile($destUrl)
                 if($masterPageFile.CheckOutStatus -ne "None")
                 {
                     $masterPageList.Files.Add($destUrl,$stream,$true)
                     $stream.close()                        
                     $masterPageFile.CheckIn($checkInComment);                        
                     $masterPageFile.Publish($publishComment);                
                     $masterPageFile.Approve($approveComment);
                     $masterPageFile.Update();         
                     $web.Update();
                     $web.AllowUnsafeUpdates  = $false;
                     $outputText = $file.Name +  "Master Page uploaded on $web site"
                     write-output $outputText
                     write-output $outputText |  out-File $logfile -Append
                 }
                 else
                 {
                     $masterPageFile.CheckOut();
                     $masterPageList.Files.Add($destUrl,$stream,$true)
                     $stream.close()                              
                     $masterPageFile.CheckIn($checkInComment);                          
                     $masterPageFile.Publish($publishComment);                          
                     $masterPageFile.Approve($approveComment);
                     $masterPageFile.Update();         
                     $web.Update();
                     $web.AllowUnsafeUpdates  = $false;
                     $outputText = $file.Name+ "Master Page uploaded on $web site"
                     write-output $outputText
                     write-output $outputText |  out-File $logfile -Append
                 }
             }      
         }
         catch
         {
             write-Output $_ | out-File $logfile -Append
         }     
     }  
 $web.dispose();
 $spsite.dispose();

Reporting Services Add in for SharePoint - Installation Interrupted

I was trying to install the 'Reporting Services Add-In for SharePoint'. And for some strange reason, it's rolling back the installation at the last step and showing me the message saying 'The Reporting Services Add-in set up was interrupted. Your system was not modified, please run the setup again'. I tried googling for any solutions, but everyone is saying I should look in the 'Documents and Settings -> temp' folder for the installation log file which would tell me the cause of the error, but as luck would have it, I'm not able to find that file as well (there are no files in temp, and the log is not getting created there).. I tried the 'msiexec *i' option but was not able to find anything useful there.

Solution:


What you need to solve this is to first run the installer from the command line without enabling the Custom Actions and then go ahead and run the custom actions tool separately. 
Follow the steps given below.
 1. Open the command window (Start>Run type cmd and press enter)
2. Navigate to the path where the installer (SharePointRS.msi) is stored
3. Execute SharePointRS.msi SKIPCA=1  This will do a files-only installation of Reporting Services Plug-In
4. CD to %temp%
5. Execute rsCustomAction.exe /i  to auto-configure the installed files.

PS: If even this fails, check if your web config file is write protected, remove the write protection if it is enabled.