Wednesday, February 22, 2017

size of sitecollection

 $site = get-spsite sitecollection
 $site.Usage.Storage/1024/1024/1024

Thursday, February 16, 2017

Block files from uploading them in SharePoint

Goto Central Admin -> Security -> Define Blocked File types
and add the extension of the file type that you want blocked.
this needs to be done for each web application.

If you have multiple web applications, you can use following code

$wApps = Get-SpWebApplication
foreach ($wApp in $wApps) {
>> $Extensions = $wApp.BlockedFileExtensions
>> $Extensions.Add(".Msg")
>> $wApp.Update()
>> }


Thursday, December 11, 2014

Image does not show up on webapplication when I published it to IIS 7

I have published my webapplication to IIS7 on windows 2008R2 server.
The images were not showing up on the page, everything else seems to be working

I checked the handler mapping on the web site
Sites-> Default Web Site

double Click on Handler Mappings

Static File is missing



Goto Windows Features 
Enable  "Static Content" feature WWW services-> Common HTTP Features

Wednesday, December 10, 2014

Copying file bin\WebApplication .dll to obj\Release\AspnetCompileMerge\Source\bin\WebApplication .dll failed. Could not find file 'bin\WebApplication .dll'

If you get the following error while publishing
Error 9 Copying file bin\WebApplication3.dll to obj\Release\AspnetCompileMerge\Source\bin\WebApplication3.dll failed. Could not find file 'bin\WebApplication3.dll'. 0

open application.csproj file in notepad
and see if you have Webapplication#.dll and .pdb file in the csproj file
remove them from the csproj

<ItemGroup>
    <Content Include="bin\ProjectName.dll" />
    <Content Include="bin\ProjectName.pdb" />
    <Content Include="bin\WebApplication3.dll" />

    <Content Include="bin\WebApplication3.pdb" />

   <Content Include="bin\WebApplication3.dll.config" />


we can publish it now

Wednesday, December 3, 2014

edmx compilation issues

In visual Studio 2013, I have added ADO.Net Entity Data Model.
After rebuilding the project, I could not use the entity data connection in my entity data source.
The error I was getting was
The metadata specified in the connection string could not be loaded. Consider rebuilding the web project to build assemblies that may contain metadata

to resolve it,  open the newly created xyzentities.edmx file in notepad and change the Provider


      <Schema Namespace="xyzMapEntitiesModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">


<Schema Namespace="xyzMapEntitiesModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2008" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">

Monday, June 23, 2014

Finding out the process template for a project in TFS 2013

Go to the project collection in which the project is located
Find the project ID using the

select * from tbl_Projects where project_name like '%XXXXXXXX%'
PartitionId  project_id  project_name  state last_update
    1 F4C0DF3A-A3BD-458E-9356-8D071897D1C8 XXXXXXX WellFormed 2014-04-09 13:49:28.513


        select * from tbl_project_properties where project_id = 'F4C0DF3A-A3BD-458E-9356-8D071897D1C8'

            PartitionId project_id name value
              1 48833EE1-8CBE-43A6-8653-4CF16E10FD56 Microsoft.TeamFoundation.Team.Default 60004022-0dfe-4225-a358-ec942aab72bd
                1 48833EE1-8CBE-43A6-8653-4CF16E10FD56 MSPROJ <?xml version="1.0" encoding="utf-8"?>
                  <MSProject>
                      <Mappings>
                          <Mapping WorkItemTrackingFieldReferenceName="System.AreaPath" ProjectField="pjTaskOutlineCode9" />
                            <Mapping WorkItemTrackingFieldReferenceName="System.AssignedTo" ProjectField="pjTaskResourceNames" />
                              <Mapping WorkItemTrackingFieldReferenceName="System.Id" ProjectField="pjTaskText10" ProjectName="Work Item ID" />
                                <Mapping WorkItemTrackingFieldReferenceName="System.IterationPath" ProjectField="pjTaskOutlineCode10" ProjectName="Sprint" />
                                  <Mapping WorkItemTrackingFieldReferenceName="System.Reason" ProjectField="pjTaskText14" />
                                    <Mapping WorkItemTrackingFieldReferenceName="System.Rev" ProjectField="pjTaskText23" />
                                      <Mapping WorkItemTrackingFieldReferenceName="System.State" ProjectField="pjTaskText13" ProjectName="State" />
                                        <Mapping WorkItemTrackingFieldReferenceName="System.Title" ProjectField="pjTaskName" />
                                          <Mapping WorkItemTrackingFieldReferenceName="System.WorkItemType" ProjectField="pjTaskText24" />
                                            <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.BacklogPriority" ProjectField="pjTaskNumber1" ProjectName="Backlog Priority" />
                                              <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.RemainingWork" ProjectField="pjTaskRemainingWork" ProjectUnits="pjHour" IfSummaryRefreshOnly="true" />
                                                <LinksField ProjectField="pjTaskText26" />
                                                  <SyncField ProjectField="pjTaskText25" />
                                                  </Mappings>
                                                  </MSProject>
                                                    1 F4C0DF3A-A3BD-458E-9356-8D071897D1C8 Process Template Microsoft Visual Studio Scrum 2013


                                                    Monday, June 2, 2014

                                                    Configuring OLAP on Project Server 2013

                                                    ·         Central Admin, Application management select manage service applications.  
                                                            Click on Project service application
                                                                   Point to Proj Web App instance (PWA) and click on Manage



                                                    ·         Click on OLAP Database Management


                                                    ·         On the OLAP Database Management page, click New and Configure the OLAP Database build settings page
                                                    ·         If you get the following error

                                                    ·         Download  SSAS Management objects SQLSERVER2008_ASAMO10_amd64.msi  from
                                                    and install it on all the servers where Project Server 2013 is installed.

                                                    ·         If you get following error
                                                    ·         Failed to build the OLAP cubes. Error: Failed to create the Olap database: ProjectServerPWA. Error: Cannot set StorageEngineMode property of database 'ProjectServerPWA' to 'Traditional' because Analysis Services is in Tabular mode.
                                                    ·         Change the C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Config\msmdsrv.ini file
                                                    ·         You cant directly edit it, copy it over to desktop . modify it and overwrite the original file
                                                    ·         Restart SSAS service
                                                    ·