Posted on:
Categories: Azure
Description:
​When working with multiple developers on a project there’s always the potential of stepping on each other’s toes unintentionally. When a configuration setting is changed, or maybe a package for the project is updated it could cause havoc for the other developers without anyone knowing what caused the issues.Think of Source Control Internally we use Team Foundation Server (TFS) for our source control with our projects. When developing web applications using Visual Studio and ASP.Net you can use NuGet to grab packages for your projects. This is very useful as it enables easier management for adding in references and components required for your solutions. Such as adding in the SharePointOnline CSOM or jQuery. The issue that can arise from using NuGet and TFS, is that by default TFS will add all the files to source control. This can become a headache especially if developers are updating the NuGet packages at different times which can cause issues checking in changes as well as compiling your solutions. To get TFS to ignore NuGet packages Add a file named .tfignore to the solution folder with the following content (This will tell TFS to ignore all the NuGet package files) \packages Now create a folder under the solution folder named .nuget In the .nuget folder create a text file named NuGet.config and add the following content <?xml version="1.0" encoding="utf-8"?> <configuration> <solution> <add key="disableSourceControlIntegration" value="true" /> </solution> </configuration> Now once you add your solution to TFS you won't have the future headaches related to NuGet packages!Multiple Web Configs and Build Configs By default, a web application project already has a couple build configurations set up with their own web configuration transforms created (Web.Debug.config and Web.Release.config). As we were building a SharePoint provider hosted Add-in with Azure hosting the web application there was a number of configuration settings required that were unique for each developer. To simplify this a new build configuration was created for each developer for use during the development of the web application. To go along with these build configurations a new web configuration transform was added to the solution for each developer (e.g. Web.Dev1.config). This enabled us to have all our unique settings configured separately, as well, these web configuration transforms could be excluded from checking in to TFS to ensure security of all our own Azure applications. For example, the following web configuration transform enabled me to target my own Azure Redis cache, as well, store the client secrets for my SharePoint Add-in separately from the other developers.<?xml version="1.0" encoding="utf-8"?> <configuration xmlnsxdt="http//schemas.microsoft.com/XML-Document-Transform"> <!-- My App settings --> <appSettings> <add key="ClientId" value="GUID" xdtTransform="SetAttributes" xdtLocator="Match(key)"/> <add key="ClientSecret" value="Shared Secret" xdtTransform="SetAttributes" xdtLocator="Match(key)" /> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> </appSettings> <system.web> <customErrors mode="Off" xdtTransform="Insert" /> <sessionState mode="Custom" customProvider="RedisSessionProvider" xdtTransform="Replace"> <providers> <add name="RedisSessionProvider" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="my host.redis.cache.windows.net" port="6380" accessKey="my key" ssl="true" xdtTransform="Replace" /> </providers> </sessionState> </system.web> </configuration> A good walkthrough on how to set up build configurations can be found here https//msdn.microsoft.com/en-us/vs2010trainingcourse_webdevelopment_topic4.aspx Publishing Profiles Last but not least was managing the publishing of our web application to our personal Azure App Services. By accessing the Azure portal and navigating to the App Service that is hosting the developing web application you can download the publishing profile directly from the …More menu in the Overview tab. In Visual Studio, when you go to publish an Azure web application, you get prompted with a Publish Web dialog that allows you to import a new publishing profile. If you Right click your solution and select Publish you will get the Publish Web dialog Select Profile on the left of the dialog Now you can select Import under the Select a publish target menu Just browse and select your publishing profile file and click OK You will now be able to select that profile for publishing your web application to the target app service To further ensure security, the publishing profiles for each developer can be excluded from TFS. These files are located under the ProjectFolder\Properties\PublishProfiles.Final Thoughts By setting up the Visual Studio Solution and Azure Web Application project as described, we eliminated a lot of the headaches that can happen collaborating with multiple developers. This enabled each developer to just select their own Build Profile and then publish their web application with their own Publishing Profile easily.




Posted on:
Categories: Office 365;SharePoint
Description:
​I’m currently working on a provider hosted SharePoint Add-in for a client and I ran into an issue creating list item attachments through our custom code. This issue was related to attaching large files as attachments to the list item via CSOM. The issue I encountered was that if it was a large file I needed to attach I needed to have the attachments folder already created before I could upload the large files. I created something similar to the large file upload solution that is posted in the Office Dev Patterns and Practices samples (https//github.com/OfficeDev/PnP/tree/master/Samples/Core.LargeFileUpload). This enables you to add files larger than 2 MB in pieces (Option 3). Using this method requires that the attachments folder for the list item already exists, if not it will fail and throw an error. After trying a few ways of creating a folder for the list item, such as getting the list and trying to add a folder directly via CSOM which throws an error. I did some research and found some workarounds using the lists.asmx web service to create the folders. Since the older web services are going to be phased out in favour of the newer REST services I decided that wasn’t the best option for a long term solution. Since the issue was only related to adding large files, I decided that adding a small temporary file as an attachment first. This would then create the folder for me, and then I could delete the temporary file and move onto uploading my large attachment.//get the list item and the list's root folder with subfolders var list = clientContext.Web.Lists.GetByTitle(listName); var item = list.GetItemById(listItemId); clientContext.Load(item); clientContext.Load(list.RootFolder.Folders); clientContext.ExecuteQuery(); //get the attachments folder for the list var rootFolder = Enumerable.FirstOrDefault(list.RootFolder.Folders, folder => folder.Name == "Attachments"); clientContext.Load(rootFolder, rf => rf.Folders); clientContext.ExecuteQuery(); var attachmentFolder = Enumerable.FirstOrDefault(rootFolder.Folders, folder => folder.Name == listItemId.ToString()); // if the list item doesn't have an subfolder under the attachments folder, then add a temp file to create the folder if (attachmentFolder == null) //create dummy attachment to force creation of the attachment folder for the list item //note this is needed due to limitations in CSOM and creating folders using ( var dummyFileStream = new FileStream(HostingEnvironment.MapPath(“path to dummy file”), FileMode.Open)) var fileInfo = new AttachmentCreationInformation ContentStream = dummyFileStream, FileName = "tempfile.txt" ; var tempUploadFile = item.AttachmentFiles.Add(fileInfo); clientContext.Load(tempUploadFile); clientContext.ExecuteQuery(); //delete temp file tempUploadFile.DeleteObject(); clientContext.ExecuteQuery(); At this point the folder for the item’s attachments is now created, and I can proceed to upload the large attachment.




Posted on:
Categories: Office 365;SharePoint
Description:
​The term Software as a Service (SaaS) means that software is not installed locally anymore. Instead, software is installed to the cloud (like Windows Azure) and made available through the internet. One prominent example of this new approach is Office 365. Software as a Service does not only have advantages for the users as consumers of the software but also for the service providers – like Microsoft as the service provider for Office 365. Because Office 365 is provided as cloud software, Microsoft can publish updates very easily in a centralized manner, and one of the recent updates caught my attraction. I'm talking about the new look for lists and libraries. The following screenshot shows this new look and feel The above screenshot shows a document library with the new look and feel which Microsoft is referring to as New Experience – in contrast to the Classic Experience. The following screenshot shows the same document library, but with the Classic Experience. I think the New Experience looks very tidy and less cluttered. It helps users to focus on the documents and list items and does not sidetrack users by showing too many available actions that can be triggered. With the New Experience, the items which are shown in the gear menu changed as well. As you can see in the following screenshot, the library settings are also shown in this menu now. Compared to the gear menu which is shown in the Classic Experience, the new gear menu is less extensive and focuses on the actions that are most important for users. To switch between the Classic Experience and the New Experience, users have several options. If the New Experience is active, users can click on the link Return to classic SharePoint which is shown in the lower left corner (see first screenshot). If a user clicks on this link, the Classic Experience becomes active immediately. If the default experience is set to New Experience, the new look becomes active again the next time the user opens a browser and navigates to that library. For each library, site-owners can choose which look to use as a default by navigating to the Advanced Settings of a list or a library. Here a site-owner can select whether to use the Classic Experience or the New Experienced for a library or list. To ensure a consistent look and feel of a whole SharePoint farm, a SharePoint administrator can provide a primary setting. This is done in the SharePoint administration of Office 365. Sometimes the switching between the Classic Experience and the New Experience does not work properly. In those cases, I was able to reactivate the New Experience by closing the browser and reopening the browser again. It looks like the information with experience to use is saved to session state objects. Besides the new look and feel of the New Experience, there is another cool new feature documents can also be displayed as tiles with a small preview image just like images with previews in image galleries. Sometimes it can be helpful for users to pin important documents to the top of a SharePoint library – just like important threads in discussions or forums. By using the New Experience, this can be done with SharePoint documents as well. A maximum of three documents can be pinned to the top area. The New Experience is offering an improved version of in-place-editing called the Details Pane. To activate the Details Pane you simply need to select a document or a list item, open its context menu and select Details. With the new Details Pane, users can edit metadata of documents or list items without changing the current view. The following screenshot shows the Details Pane Accessing data on mobile devices has become a mandatory request of enterprises. To meet these requirements, the New Experience is also providing a great mobile view. The following screenshots were taken on a Windows 10 smartphone to show how the New Experience looks like on a mobile device.​​​ Currently, Microsoft is rolling out the New Experience feature to more and more tenants and for some time both experiences will be available. But, you should keep in mind that the Classic Experience might not last for long. Do you like the New Experience look? Let us know what you think.




Posted on:
Categories: Azure;Business;Office 365;SharePoint;Skype for Business
Description: Moving to Office365 or deploying Microsoft's Enterprise Mobility Suite? Your organization may be qualified for funding to help you save costs. Find out how!
With the two Canadian Microsoft data centers in full effect for Canadian public and private sector businesses, the momentum to move to the cloud through Office 365, Cloud PBX (Skype for Business) and Azure are rampant. At Softlanding, we're seeing demand from public sector industries including school districts, government and finance to migrate their workloads to the cloud utilizing complimentary funds allocated through Microsoft under a tool called Fast Track. So what is Fast Track?​Fast Track is a customer-success service designed to help customers move to Office 365 with the assistance of qualified Microsoft partners to road-map and carry out engagements faster and more cost-effectively. Available for organizations with 50 or more seats of Office 365 Business, Business Essentials and Business Premium SKUs purchased within September 2015 to June 30, 2016 - Fast Track offersFunding ​​To help deliver value and drive adoption, Fast Track funding for ​Office 365, Cloud PBX and Enterprise Mobility Suite (EMS) are available for organizations looking to create a new tenant in Office 365. Funding can range up to $60,000 USD per eligible organization. ​Data Migration All qualifying customers are eligible to use the remote services to migrate their files to One Drive for Business and SharePoint Team Sites from file shares or Google Drive as well as Exchange Online as a complimentary service. Onboarding and Adoption Assistance ​​​Receive onboarding assistance with Microsoft's Enterprise Mobility Suite of products including Intune, Active Directory Premium and Azure Rights Management as well as the Onboarding and Adoption planning for Office 365 (Exchange Online, SharePoint Online, Skype for Business, One Drive for Business, Office 365 Pro Plus and Yammer Enterprise). Sandboxing in Office 365 ​Trial a Sandbox environment to see the experiences and the value that Office 365 can deliver. This trial tenant available for up to 250 users for 90 days allows organizations to try Enterprise E5 licenses with PSTN conferencing capabilities.​ ​Are you Eligible?​​ Fast Track funding are enabled through engaging with Microsoft Gold Partners, like Softlanding, to carry out engagements related to Office 365, Cloud PBX and Azure. Softlanding can assist in migrations and drive adoption working alongside Fast Track services to reduce costs. If you would like to explore the opportunities available with Fast Track, but are unsure whether your organization qualifies for funding and for how much, contact us​ to find out.​