Skip to main content

Posts

Showing posts with the label SharePoint Apps

The XSS Auditor refused to execute a script in http://default.aspx because its source code was found within the request. The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header in SharePoint 2013

The XSS Auditor refused to execute a script in http://default.aspx because its source code was found within the request. The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header in SharePoint 2013 Recent google chrome update may breaks the sharepoint layout pages and other custom development pages due to XSS Auditor. I have added the HTTP Response Header  to the SharePoint Web Front End Servers  and then it worked fine.    

Step by Step for create and deploy a SharePoint 2016 Custom Layout With out using designer or Design Manager

This article is a to ensure how to create a simple SharePoint 2016 Page layout without using Share Point designer Design Manager Before doing anything you need to create the base of the layout. Following placeholders are minimal and commonly used in any template. PlaceHolderAdditionalPageHead PlaceHolderPageTitle PlaceHolderMain Place Holders PlaceHolderAdditionalPageHead This place holder is used to defined additional CSS and other scripts and inline CSS if you have any. We will be using this to register a CSS and register a different CSS for the SharePoint Edit Mode < asp:Content ContentPlaceHolderId = "PlaceHolderAdditionalPageHead" runat = "server" > <!—Your code goes here--> </ asp:Content > PlaceHolderPageTitle This place holder will be mainly for the page title. < asp:Content ContentPlaceHolderId = "PlaceHolderPageTitle" runat = "server" > <!—Your code goes here--> </ asp:Content > PlaceHolderMain Th...

Getting started with NEW Office 365

Getting started with NEW Office 365 As you may already know, Office 365 comes with different subscription models. First you need make you’re your billing address is available in supported countries. You can find the geographical availability by referring below URL. https://products.office.com/en/business/international-availability Once you are confident with your location you can check the available subscription plans. Available Plans:    https://products.office.com/en/business/compare-more-office-365-for-business-plans# There are trial versions and service descriptions are clearly available in above link. Once you are done with the payment you will be redirect to a page with an introduction wizard, where you will be highlighted with main sections in Office 365. I will provide a detailed article later in my post. But for the moment I will summarize the main Highlights.     These screens talking about everyth...

Converting O365 / SharePoint App to SharePoint 2013 on Premises Solution

Generally when you are developing SharePoint Provider hosted apps you can simply user SharePoint Online version to do testing and development. But when it comes to actual deployment you may need it to deploy as SharePoint on premises solution. You can do it by simply adding few additional configuration sections to web.config. This is the default web.config you will have when you are working with O365, SharePoint Online Apps. If you want to convert the same application to host in your premises as a provider hosted application. You just need few entries in your web config. You need to specify Authorization and SSL certificate communication settings. After that you can configure your environment to host the application as High Trust SharePoint Application. <configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> <authorization> <deny users="?...

Default SharePoint 2013 / 2010 System Pages where you should takecare when you go online

There are list of SharePoint System Pages which inheriting view permission by default. If you are going to make public SharePoint site , you might not want to access these pages by anonymous users or by Form Based Authentication User. There are may ways to restrict the users access to these pages that I will explain later in a different post. Below I’m listing down pages ; those are available in each site under layout mapping. Site Collection and Site Level Recycle Bin Urls /_layouts/15/AdminRecycleBin.aspx /_layouts/15/RecycleBin.aspx User , User Info , Site Permission related Urls _layouts/15/permsetup.aspx This is used to create default groups in SharePoint such as visitors, members and owners. /_layouts/15/people.aspx?MembershipGroupId=0 All People Url , This can be even used to delete users from the site collection User Information Hidden List Urls /_catalogs/users/detail.aspx /_catalogs/users/simple.aspx These lists are actually available from previous version of SharePoint...

Office Web Apps Not Showing Review Tab in SharePoint 2013

I’m used to do my developments are testing for SharePoint Apps in SharePoint Online rather than using OnPrem deployment singe its easy. But I suddenly found out Office Web Apps on my On Premise environment not showing Review tab on Word Documents which SharePoint Online does. When I searched through the root cause, I have found out OnPrem updates are little bit behind the O365 updates. Apart from Review tab there are few other functionalities missing in OnPrem version. Following list down the current available updates for Office Web Apps. 15.0.4420.1007 RTM  15.0.4481.1005 March 2013 PU         KB2760445 15.0.4481.1508 April 2013 CU         KB2810007 15.0.4505.1001 April 2013 Hotfix     KB2799821 15.0.4517.1003 June 2013 CU         KB2817350 15.0.4535.1000 August 2013 CU         KB2817521 15.0.4551.1003 ...

How to filter SharePoint list Based in Date Time related functions in SharePoint 2013 using REST/ODATA

REST queries are quiet familiar when you are working with SharePoint Apps and SharePoint development. I have found quiet difficult to pass the Date Time parameter to REST and took few minutes to figure that out. There are two ways to end points to access list data. http://<SharePoint Url>/_api/web/lists/getbytitle('Pages')/items? http:// <SharePoint Url>/_vti_bin/listdata.svc And these functions are working only on listdata.svc These are few example of REST queries which uses Created Column as a sample field.   Filter using day () function http:// <SharePoint Url>/_vti_bin/listdata.svc/<listname>?$filter = day(Created) eq 2   Filter using month () function http:// <SharePoint Url>/_vti_bin/listdata.svc/<listname>?$filter = month (Created) eq 2   Filter using year () function http:// <SharePoint Url>/_vti_bin/listdata.svc/<listname>?$filter = year (Created) eq 2   Filter using hour () function http:// <...

How to filter SharePoint list Based in Date Time in SharePoint 2013 using REST/ODATA

REST queries are quiet familiar when you are working with SharePoint Apps and SharePoint development. I have found quiet difficult to pass the Date Time parameter to REST and took few minutes to figure that out. These are few example of REST queries which uses Created Column as a sample field. Filter Greater than Date http://<sharepointurl>/_api/web/lists/getbytitle('Pages')/items?$filter=Created gt dateTime '2017-03-03T00:00:00Z' Filter Less than Date http://<sharepointurl>/_api/web/lists/getbytitle('Pages')/items?$filter=Created lt dateTime '2017-03-03T00:00:00Z' Filter Equal Date http:// <sharepointurl>/_api/web/lists/getbytitle('Pages')/items?$filter=Created eq dateTime '2017-03-03T00:00:00Z' Filter Between Dates http:// <sharepointurl>/_api/web/lists/getbytitle('Pages')/items? $filter=( Created gt dateTime '2016-03-03T00:00:00Z' and Created lt dateTime'2017-03-03T00:00:00Z...

System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object ‘xp_sqlagent_notify’, database ‘mssqlsystemresource’, schema ‘sys’.

  This error occured to me when im trying to access the Manage Processing Oprions in SharePoint SSRS. “ An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. —> Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: An error occurred within the report server database.  This may be due to a connection failure, timeout or low disk condition within the database. —> System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object ‘xp_sqlagent_notify’, database ‘mssqlsystemresource’, schema ‘sys’ .” Cause is configurations isses and provisioning issues of Reporting Server User on Related Databases (Master , SSRS) You can resolve the issue by re run the script on your database server. For that you can downlod the report from the Central Admin by Application Management  ->  Manage service applications Then go to Repo...

System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

  This error occured to me when i triyng to connect to a SQL database from SharePoint App which is use Entity Framework. This is a timeout issue when app is trying to connect to a SQL database and connection was expired before execution. I simply connected it adding a Coonection Timeout to the connection string. <add name="dbtemponeEntities" connectionString="metadata=res://*/DataModels.dbtempone.csdl|res://*/DataModels.dbtempone.ssdl|res://*/DataModels.dbtempone.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=ASQL;initial catalog=dbtempone;persist security info=True; Connection Timeout=120 ;user id=SQLAdmin;password=*****$so;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

SharePoint 2013 List Operations in REST– Retrieve List Fields Basics

How to make a REST call in SharePoint App and SharePoint Provider Hosted App – Part 1 SharePoint 2013 List Operations in REST– Retrieve List  Fields Basics – Part 2 You can use the function specified in the first post to call the REST URLs. You can use the appropriate function depending on the App type you are developing. Get selected fields in SharePoint List using SELECT REST operation. Getting single value fields /* List Name : listname Columns: Title => Text , ID => Number */   var url = "/_api/web/lists/getbytitle('listname')/items?$select=Title,ID" ;   function s(data){   // get the data and convert to JSON Objects var d = JSON.parse(data.body).d.results[0]; alert(d.ID); alert(d.Title); }   function f(data){ alert(data); }   getREST(url,s,f); Getting Single value Lookup fields /* List Name : listname Columns: ID => Number , CountryLookup => List LooukUp */   var url = "/_api/web/lists/get...

JSOM List Operations in SharePoint Apps in a proper way (Provider Hosted and SharePoint Hosted) – Search

In my previous post (JSOM List Operations in SharePoint Apps in a proper way (Provider Hosted and SharePoint Hosted)–CRUD) I have explained how to work with basic list operations.  Here I’m explaining the CAML and search options that we can perform. (function (spa, $, undefined) { window._sa = spa; _sa.ctx = null; _sa.web = null; // this should be initialised _sa.configs = { SPHostUrl: "", SPAppWebtUrl: "", isCrossDomain: false }; // init(); utils.log(_sa.configs.SPHostUrl); utils.log(_sa.configs.SPWebtUrl); function init() { if (!_sa.configs.SPAppWebtUrl) { alert("Please initialize _sa.configs"); } if (_sa.configs.isCrossDomain) { _sa.ctx = new SP.ClientContext(_sa.configs.SPAppWebtUrl); var factory = new SP.ProxyWebRequestExecutorFactory(_sa.configs.SPAppWebtUrl); _sa.ctx.set_webRequestExecutorFactory(factory); ...

How to Send Email in SharePoint Provider Hosted Apps

There are few methods that we can use to send Emails in SharePoint Provider Hosted apps. Using general Email Sending method Using SharePoint Client Object Model (CSOM) Using SharePoint JavaScript Model (JSOM) Using general Email Sending method This is the general method we are using for sending email for asp.net. This is method has advantages over other two methods. this method has few advantages over other methods, Send attachments to the recipients Send emails to external users (SharePoint 2013 email function can not be used to send emails to external users)  There are many articles in available for this , I’m describing a sample code below. MailMessage mail = new MailMessage( "from@mail.com" , "to@mail.com" ); SmtpClient client = new SmtpClient(); client.Port = 25; client.DeliveryMethod = SmtpDeliveryMethod.Network; client.UseDefaultCredentials = false ; client.Host = "smtp.google.com" ; mail.Subject = "this is a test email." ; m...