How to Execute an EXE stored in a Document Library directly in Client’s Machine in SharePoint 2013

Consider, there are certain tools (utilities/EXE’s) were there, which were stored on the Document Libraries. When the End User clicks on those links, they are asking for the default SAVE, SAVE AS Options alone. As shown in the figure below.

image

There is no Run Option. i.e., if the user is a frequent user, then the download is happening whenever he clicks on the link. To avoid this, and to make a User friendly approach, on click, directly it should Run. It will ask for your permission. That we cannot avoid. But, the download will not happen frequently.

To achieve, this again, let us go by step by step. In my Previous article, we saw how to upload the EXE files into SharePoint Document Library.

1. Go to Central Administration.

image

2. Go to Manage Web Applications.

image

3. Select the Web Application and Click on General Settings.

image

4. On the Browse file Handling Section, select Permissive. By default, it will be Strict.

5. Click OK and come back.

6. Click on the EXE from your document library.

7. We will get the third option called Run.

image

HAPPY LEARNING!!!!

How to Upload the EXE, MSI Files into SharePoint 2013 Document Library

After a long time, I thought of sharing this simple steps to the community. The title will tell the requirement. i.e., by default, SharePoint does not allow the end user to Upload the Executable into SharePoint Document Library. We need to make a small settings change in the Central Administration level.

Let see that step by step.

1. Go To Central Administration.

image

2. Select the Security Tab.

image

3. Under General Security, Click on the “Define Blocked file Types”.

image

4. The screen comprises the Change Web Application option and the list of files listed on a list box. Select the web application appropriately.

5. Then in the List Items, delete the EXE and MSI Files (Here each file extension is separated/listed in each lines).

6. Let me remove the EXE and MSI.

7. Click on OK.

8. That’s it. Now, if we try upload EXE in the Web Application, your system will allow you to upload.

The default other blocked file extensions are

ade

adp

asa

ashx

asmx

asp

bas

bat

cdx

cer

chm

class

cmd

cnt

com

config

cpl

crt

csh

der

dll

fxp

gadget

grp

hlp

hpj

hta

htr

htw

ida

idc

idq

ins

isp

its

jse

json

ksh

lnk

mad

maf

mag

mam

maq

mar

mas

mat

mau

mav

maw

mcf

mda

mdb

mde

mdt

mdw

mdz

msc

msh

msh1

msh1xml

msh2

msh2xml

mshxml

msi

ms-one-stub

msp

mst

ops

pcd

pif

pl

prf

prg

printer

ps1

ps1xml

ps2

ps2xml

psc1

psc2

pst

reg

rem

scf

scr

sct

shb

shs

shtm

shtml

soap

stm

svc

url

vb

vbe

vbs

vsix

ws

wsc

wsf

wsh

xamlx

The above steps are common for the WebApplication. There is no option, that a single document library can accept this. This is a generic settings.

HAPPY LEARNING. 🙂

SharePoint 2013 Minimal Download Strategy

In this post we will discuss what is Minimal Download Strategy in SharePoint 2013 and how to enable or disable Minimal Download Strategy in SharePoint 2013.

In the web application concept where user send a request and got a response back, the whole web page will be reloaded even if you update the whole page or a part in the page.  And this causes some performance issue for the end user like page loading time etc.

SharePoint 2013 introduced a new feature known as “Minimal Download Strategy (MDS)”.  This Feature allows for partial page download which basically speedup page rendering. MDS alls
When MDS is enabled all pages for that site is rendered through the /_layouts/15/start.aspx page like when you request the home page or any other page then it will be like below:
URL when MDS is NOT enabled: http://site/SitePages/Home.aspx
URL when MDS is enabled: http://site/_layouts/15/start.aspx#/SitePages/Home.aspx
Internally the the start.aspx page has a specific JavaScript object asyncDeltaManager which is responsible for this activity.

How to Enable/Disable Minimal Download Strategy (MDS) Feature:
By default this Feature is enabled on Team sites, community sites etc in SharePoint 2013. Remmber if you Deactivate the feature to disable Minimal Download Strategy (MDS) then you will loose the benifit of caching.

To enable or disable MDS feature Open SharePoint site, then from the Settings icon click on Site Setting. This will open the Site Settings page, Click on Manage site features under Site Actions. Then in the Site Features page, search for “Minimal Download Strategy” featue. Then click on Activate (if you want to enable MDS) or DeActivate (if you want to disable MDS).

Find Last Date Time Updated for Any Table in SQL Server.

If a user wants to finds out when was the last table updated he can query dynamic management view (dmv) – sys.dm_db_index_usage_stats and easily figure out when was the table updated last.

SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,*
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( ‘AdventureWorks’)
AND OBJECT_ID=OBJECT_ID(‘test’)

Running query provides accurate details of when was  the table last updated. If WHERE condition is entirely removed it will provide details of the entire database.

Visual Studio Short cuts.

General:

Shortcut keys Description
Ctrl+S Save current file.
Ctrl+Shift+S Save all files.
Ctrl+Shift+N New project.
Shift+Alt+N New website.
Ctrl+N New file.
Ctrl+Shift+O Open project/solution.
Shift+Alt+O Open website.
Ctrl+O Open file.
Ctrl+P Print
Alt+F4 Exit
Ctrl+Z Undo
Ctrl+Y Redo
Ctrl+X Cut
Ctrl+C Copy
Ctrl+V Paste
Ctrl+Shift+V Cycle Clipboard Ring
Del Delete
Ctrl+A Select All
Ctrl+F Quick Find
Ctrl+H Quick Replace
Ctrl+Shift+F Find in Files
Ctrl+Shift+H Replace in Files
Alt+F12 Find Symbol
Ctrl+G Go To
Ctrl+, Navigate To

Advanced:

Shortcut keys Description
Ctrl+E,D Format Document
Ctrl+E,F Format Selection
Ctrl+U Make Lowercase
Ctrl+E,\ Delete Horizontal White Space
Ctrl+E,S View White Space
Ctrl+E,W Word Wrap
Ctrl+E,W Word Wrap
Ctrl+I Incremental search
Ctrl+E,C Comment Selection
Ctrl+E,U Uncomment Selection

Set value for SQL Server database table auto increment field

SET IDENTITY_INSERT dbo.YourTable ON

INSERT INTO dbo.YourTAble(AutoIncID, ...other columns....)
VALUES(100, ......)

SET IDENTITY_INSERT dbo.YourTable OFF

By using the SET IDENTITY_INSERT ... ON you enable the explicit insertion of values into an IDENTITY column. Don’t forget to turn that off, though! And in your connection to SQL Server, only one table at a time can have this setting ON

Also once you’ve done this, now your current IDENTITY value will be 100, so the next row you insert in a normal fashion (without SET IDENTITY_INSERT ON active) will get the identity value of 101, then 102 and so on.

Enjoy… 🙂