deploy.jpg

Deploy an Azure Function App using Azure ARM Templates

Pete is a Director of Technology at ThreeWill. Pete’s primary role is driving the overall technology strategy and roadmap for ThreeWill. Pete also serves as ThreeWill’s Hiring Manager and is constantly looking for new talent to join the ThreeWill family.

“About a month ago, the Azure Functions for SharePoint (AFSP) open source project was introduced. The project’s goal is to provide a set of common functions for scenarios shared by most SharePoint provider hosted add-ins implemented as Azure Functions. Azure Functions is a compelling service from Azure and the Azure Functions for SharePoint pattern is promoting an equally compelling use of Azure Functions in the Office and SharePoint space and I wanted to get involved with the project.  One of the goals of the project is to enable people to make the use of the pattern and Azure Functions quickly and easily. While there is a Client Configuration Guide to manually configure the Azure resources required to start using the Azure Functions for SharePoint, we thought minimizing the friction of getting started by providing a scripted configuration of the Azure Resources required would be very helpful.

Read about how to use an ARM Template to deploy all the resources to get started with the Azure Functions for SharePoint.“

read more
Pete SkellyDeploy an Azure Function App using Azure ARM Templates
3d-printing.jpg

3D Printing and Provisioning SharePoint Solutions

Lane is a Senior Software Engineer for ThreeWill. He is a strong technology expert with a focus on programming, network and hardware design, and requirements and capacity planning. He has an exceptional combination of technical and communication skills.

Danny:                    Hello, this is Danny Ryan and welcome to the ThreeWill podcast. Picking up with my conversation that I had with Tommy. Our topics are going to be on people, process, and technology. This specific episode we’re going to focus in on a certain person and that person is Lane Goolsby. Lane, thanks for joining me.

Lane:                        How you doing?

Danny:                    Doing great. Doing great. This one, we’re going to cover a couple of different topics. One sort of picking back up with some personal stuff, if you don’t mind.

Lane:                        Not at all.

Danny:                    Then, maybe a quick overview of some of the stuff you’ve been working on project wise and some of the things that you’ve been learning recently. We’ll call this one catching up with Lane.

Lane:                        I’m sure the world is thrilled.

Danny:                    Angela can listen to it and say, “Oh, what’s he been up to?” Well, let’s just get this kicked off. I know you had mentioned that you’re starting to do some stuff with 3D printing. With 3D printing. Give me a little bit of back story on that. How did you get into that? Where are you right now? What are u doing with 3D printing?

Lane:                        The 3D printing story started off with me coming outside one evening and catching somebody trying to break into my wife’s truck. I’m a bit of a paranoid kind of guy, so the idea of having a third party home monitoring alarm system just doesn’t do a whole lot for me. I decided that I was going to roll my own. I went off and picked up a couple Raspberry Pi with some no infrared filtered cameras and Bluetooth and WiFi adapters and things like that. I’ve built this up with a Linux machine that’s running mosquito and some other cool little technology. These Raspberry Pi, when they’re sitting and powered on they’re using motion detection to detect when anything is going on in the hour or outside the house eventually. They’re recording and sending things to the Linux NAS server.

Then, the NAS server is either just keeping the logs locally, or if we’re not home, it’s shipping those out to Dropbox or some equivalent cloud based service. I haven’t quite decided on which one yet. I got into 3D printing because I was looking for enclosures for these raspberry Pi. Most of the enclosures I was finding had open ports for the GPIO sockets and the HDMI cards and things like that. They’re not really conducive to being outside in the elements.

I got to look at what it would take to make my own 3D printed enclosure that met those specifications that I wanted. I found ways to design and things like that and then send it out to third parties for printing. Then, I got to looking at the cost. It was about a hundred dollars more expensive just to buy my own 3D printer, then I’d have my own printer. It’s like when I go into the car dealership. I walk in looking at the base model Civic and the next thing I know I’m walking out with a high end Acura, which is pretty much what I did.

Danny:                    You fell to the up-sell.

Lane:                        Yes. I managed to reel it back a little bit. I didn’t quite go for the nine thousand dollar filament. Base ones are based off of UV light and things like that.

Danny:                    I can just see you talking to Angela. Angela, it’s for your safety sweetheart. I’m doing this for you. This is how much I love you.

Lane:                        You can never argue safety.

Danny:                    I’m investing in your safety. That’s what I’m doing.

Lane:                        You can never argue against safety. That’s right.

Danny:                    It’s to keep your wife safe.

Lane:                        Exactly.

Danny:                    I love it. I love it. You must love her a lot.

Lane:                        I do. I do.

Danny:                    You ended up with, I guess, the higher end, not the highest end. The higher end model.

Lane:                        Yeah. It’s a MakerBot clone. The MakerBot, you know everybody knows the MakerBot 3D printing, they’re kind of like, I don’t want to quite say the highest end, but they’re pretty high up there, but all of their hardware and software, for the most part, is open sourced. They open up for other people to do cloning off of them. This is the one I’ve got. It’s basically a MakerBot clone. It’s from a company called Flash Forge. I’ve been really happy with the printer so far. Only about a week into so far and most of the stuff that I’ve been printing has actually been things for the printer itself.

Danny:                    How meta.

Lane:                        Exactly. It’s quite meta. Just little things that make it just print a little bit better, but have done a couple of fairly complicated prints. We did an articulated robot. The first thing one we tried, it didn’t quite work out so well. My wife and I have actually named him slumpy because he-

Danny:                    I’ve seen pictures of slumpy and slumpy does slump.

Lane:                        Yes, he’s a little special, but he’s worked his way into our hearts as far as a piece of ABS plastic can.

Danny:                    Nice. Nice. That’s such a heartwarming story about a piece of plastic.

Lane:                        On a cold day with snow it’s good to have heartwarming stories, isn’t it?

Danny:                    Yeah. I know you guys can’t see this, but it’s snowing outside. I guess, in Atlanta, Georgia that’s a big deal. They haven’t shut down everything yet.

Lane:                        Not yet, but the day is early.

Danny:                    Yeah, the day is early, so who knows what’s going to happen from here.

Lane:                        That’s kind of where I am. Like I said, I’m only about a week into it right now, but I think this is one of those. You’ve heard about 3D printing for awhile now and a lot of people talked about it as the new wave. How everything is going to come to a point where instead of going to the store to buy something you’re going to just download a file, and send it to your printer, and it’s going to just print it right there. I don’t think the technology is quite there yet. I think it’s, the technology itself is pretty good. I’ve been impressed by how well it actually works right out of the box. I think it’s a matter of just finding ways to get the filaments. They’ve got filaments that have embedded stainless steel, and bronze, and wood. Even filaments that are like soft rubber, so you can take it. I’ve seen guys take them and squish them between their hands, so their hands are completely flat, and then open them back up and the thing just pops back into the same shape it was.

Danny:                    Cool.

Lane:                        Really cool, but it’s still, I don’t want to say it’s in it’s infancy. It’s far from it’s infancy, but it’s definitely not quite prime time just yet, but as the filaments start to mature and they start to get more productive or versatile, absolutely. I think it’s going to be really slick what they can do with these someday.

Danny:                    You haven’t used it for your home brewing?

Lane:                        Not yet. I guess-

Danny:                    Do you see any places where it would help? I guess maybe spare parts.

Lane:                        Oh, absolutely. Things like clips for holding hoses in place or mounting sparge arms and things like that. Absolutely, I could use it. The ABS has a fairly high temperature range, but I don’t know how well it’s going to work standing over a the side of a boiling pot when you’re extruding the filaments. The ABS plastic, you’re extruding it somewhere around two hundred and thirty degrees Celsius, so it’s twice the boiling point, but I’m sure if it’s at over something hot enough long enough it would probably start to be more slumpy then.

Danny:                    Maybe slumpy can keep your beer cool or something. Make a little larger slumpy with his arms around in a hug and it can hug your beer.

Lane:                        There you go, there you go. Make like a little coozie out of him.

Danny:                    The slumpy coozie. It works. It works. Very cool. You said you don’t have any updates or you haven’t had any. You’ve been working on the 3D printer and nothing with the home brewing stuff recently.

Lane:                        Yeah, the 3D printer has kind of swirled me away from the home brewing now. I guess I’m now twelve weeks away from being complete.

Danny:                    Very nice. Give me an update. We’ll sort of switch over from the fun stuff to the not so fun stuff. No, to the project wise. What have you been working on recently? What’s, I guess, has been keeping you up at night recently? Just at a high level. What’s have you learned recently? Some of the things that you’re up to?

Lane:                        The project I’ve been working on recently, a company engaged us to take a product that they had been developing in SharePoint and find a way to package it so that it would be deploy-able in customer environments with the intention of using it like a product. Where you can download something, or get a CD from a company, click install and follow the bouncing ball. Then, it’s you got this product installed in SharePoint. I think one of the challenges that we’ve been facing with that is, and we’ve all fell trap to this. Every SharePoint developer has fallen trap to this at some point in their career if they’ve done it long enough. You got this rapid prototyping and rapid development model using SharePoint designer and tools like that, but then when it comes time to take it from a lower environment like a development environment or a QA environment, then trying to get that pushed through either just a company’s four stage environment of development staging QA development or like in a more complicated scenario, like with this customer, going through not only the lower stage environments to the point of getting to production, but also then having to deploy it in all the different customer environments.

That opens up for a lot of really unique challenges. You got to have a good solid process in place of doing the day to day development, and then getting that into some kind of environment where there’s source control or a TFS source control, or GitHub, or whatever the case, whatever your flavor of source control is, and getting that into a state from having it in that source controlled audited reputable environment. Then, getting it from there through the stages of testing and unit testing and whatnot. Then, getting it to also having it into a stage where you can deploy it in customer environments, which are completely different from what you’re local environments are going to be.

You can just count on that. You’ve got this particular service pack, with this particular cumulative update on your SharePoint forums. Then, you get to a customer environment and they may have something that’s drastically older or drastically newer. That causes additional issues. It causes heartburn. Then, you start talking about throwing into cloud environments, like Office 365, or one of the many other third party hosting environments like, I’m not going to name names, but they’re using a cloud based services that specifies predominantly in project server, which is based on SharePoint. It does work, but it opens up unique challenges with trying to get that applied into the project server environment on top of the SharePoint stuff.

Danny:                    How does it work because a lot of people are using a JavaScript frameworks or different versions of frameworks. It seems like there could be some overlap in what you’re using.

Lane:                        Oh, absolutely.

Danny:                    It seems like it could end up being a real mess.

Lane:                        This particular one, it had five different components. Three of those components have a little over, I think they’re a little over thirteen hundred files each.

Danny:                    Wow. They’re like JavaScript frameworks or they’re-

Lane:                        JavaScript files. They’re mostly using Angular, but it’s plug ins for Angular doing different things, like handling file uploads, like Word documents and Excel documents. It’s a really complicated application. The little bit I’ve played it it, I’ve actually been really impressed with the tool. It’s really quite cool. Having spent a fair amount of time around here being the Angular advocate I guess, they’ve done some really slick stuff with that. Last time I looked, which was yesterday, grand total the entire deployment folder including the installers and everything else, we’re looking at a little over forty-six hundred files. I think it was forty-six hundred and two files.

Danny:                    Wow.

Lane:                        We’re using the office dev PNP provisioning engine for the bulk of the provisioning work. The template file that has all five different site templates on it has just under sixty-five thousand lines of XML, so it’s massive. It is huge. Trying to keep all of that straight and trying to keep all of that in line and in the proper paths and everything else by hand is, it’s a super human task. I mean, there’s no way a single person or a team of people can keep all of that straight on a day to day basis. That’s why having, and this kind of goes with the people, process, technology. You can have all the technology you want, but if you don’t have a good process in place, you’re going to have a lot of heartburn and you’re going to have to buy stock in Tylenol because you’re going to take a lot of Aspirin.

Danny:                    Yeah, yeah.

Lane:                        That’s kind of the situation that this customer was in. They’ve got this big, massive application that, it’s well contained, but within it’s container it’s got a fair amount of sprawl to it and it’s got a lot of one off cases. It’s been a challenge to try to get the process defined around it that’s conducive to a day to day development using a SharePoint designer or whatever tool that they’re actually using. Then, trying to get all of that integrated into a pattern that’s repeatable and follows patterns and practices within the SharePoint world because we all know SharePoint’s got it idiosyncrasies. A lot of these guys on these teams are pure web developers. Some of them have only seen SharePoint. This is the first time they’ve used SharePoint. That’s been a challenge as well, is trying to get them to understand that when you work in the SharePoint world, for the most part it’s translatable, but there are definite idiosyncrasies that do not translate to the stage of web development world at all. It’s been eye opening I think for some of them just how the SharePoint world is unique and works.

Danny:                    Is this your first experience with the PNP stuff, or is this … Bad host. Bad host. Now, watch this, all of them. You got to listen to that. Everybody’s going, “What is that?” Okay, cut. All right. I’m going to slap my hand. Should’ve turned that off. Is it a first experience with PNP?

Lane:                        This is my second in depth experience with PNP. I think I’ve probably pushed it to the boundaries of what it can do.

Danny:                    You’ve seen the cliffs of the PNP.

Lane:                        I have seen the cliffs and I’ve actually had to scale a couple of them and fix them. There’s a couple of minor commits that I made out on the GitHub project to fix some of the bugs that I found.

Danny:                    Giving back.

Lane:                        Yeah. Sharing is caring.

Danny:                    Sharing is caring.

Lane:                        It’s been, like I said, it’s a sixty-five thousand line XML file that’s the template. Its got a ton of stuff in there. For the most part it’s just files that we’re uploading in there, but we’re doing other things with page layouts. We’re doing other things with activating features. One of the sites uses the publishing feature. That’s proved to be a bit problematic because the PNP engine doesn’t support publishing pages, at least not the version that I have. I’ve seen that it is coming. I’ve been watching the GitHub repository and I’ve seen that some of the work has been done on that within the last couple weeks. It wasn’t quite there yet. Since I’m still using the forked version of the core because of those bugs that I’ve faced I haven’t had a chance to go back and get it back onto the nougat latest stable yet. My bugs haven’t rolled into the main branch. I could if I had time.

Danny:                    If you weren’t doing podcasts with me you would have plenty of time to do it.

Lane:                        If I wasn’t doing podcasts and making malformed pieces of ABS plastic.

Danny:                    Yes. That’s also something else slowing you down. Hopefully the weather won’t slow you down today either.

Lane:                        Hopefully not.

Danny:                    You won’t be stuck in some place.

Lane:                        Luckily, I’ll be in a hotel room that’s about a block from here. I’ve got four wheel drive now, so I should be okay.

Danny:                    You should be just fine. Just fine.

Lane:                        After making it through a Michigan blizzard a couple months back, I think I can handle this.

Danny:                    Well, I’ll stop slowing you down now. I appreciate you taking the time just to share what’s going on. It’s always interesting to find out what your latest explorations are into. We’ll see what’s next.

Lane:                        Sounds good.

Danny:                    We’ll see what’s next. You almost have to have a, this is our quarterly update of what Lane is up to. What’s he got his hands into?

Lane:                        What kind of squirrel is Lane chasing up a tree now?

Danny:                    Okay, and you have to send me you’re, the picture of what’s it, squishy?

Lane:                        Slumpy.

Danny:                    Slumpy. You’ll have to send me a picture of slumpy and I’ll put it up on the blog so people can actually see a picture of slumpy. Well, that’s it for now. I’m done slowing the man down. Folks want to come to ThreeWill.com, we’ll have the full transcript, and some show notes, and pictures of slumpy. Drop by there. Thank you everyone. Thank you Lane for taking the time to do this.

Lane:                        You’re welcome.

Danny:                    Thank you everybody for listening. Have a great day. Thanks so much. Bye bye.

read more
Lane Goolsby3D Printing and Provisioning SharePoint Solutions
sand.jpg

Exceeding Quotas in a Sandboxed Solution

John Underwood is a Technical Evangelist at ThreeWill. He has nearly thirty years of software development experience. He is an experienced technical instructor with superior presentation skills and is proficient in delivering standard curriculum as well as developing and delivering custom curriculum.

As you work with and develop sandboxed solutions, you may find the need to intentionally exceed a solution’s quota for testing or demonstration purposes. Here’s a little insight on a demo I recently created that does that very thing.

Rewarded For Doing the Wrong Thing?

Usually developers don’t get rewarded for writing code that blows up, but in this case that’s precisely what I wanted to do. I wanted to create a simple sandboxed solution that could easily and predictably exceed a resource quota so that I could demonstrate what happens when an errant sandboxed solution gets “locked up” for the day. To accomplish this, I created an Empty SharePoint Project using Visual Studio 2010, and then I wrote a simple web part (not a visual web part, mind you) that would throw an exception in its OnLoad() method as follows:

A Web Part That’s Guaranteed to Fail!

From there, I deployed the solution to the site, created a new page in the Site Pages library, and added my web part to the page. Obviously, from this point forward any time the page loads, the web part will generate an unhandled exception.

Setting The Bar Low

Next, I set artificially low quotas so that I could reach my quota limit very quickly. This involved the following steps:

  • Navigate to Central Administration | Application Management | Specify quota templates
  • Create a new template named “Small Sandbox” with the following settings:

Creating the Quota Template

  • Click OK to save changes.

Once the quota template is created, we’ll need to use it:

  • Navigate to Central Administration | Application Management | Configure quotas and locks
  • Select the correct web application and then apply the previously created template as follows:

Selecting the Quota Template

  • Click OK to save changes.

 It’s All in the Timing

Now that we’ve configured the quota limit at a single point, one would assume that we could simply request the page with the errant web part a sufficient number of times and immediately exceed the quota. However, there’s one problem: the statistics used to measure quotas do not update instantly, but instead wait on the following timer jobs:

  • Solution Resource Usage Log Processing (runs every 5 minutes by default)
  • Solution Resource Usage Update (runs every 15 minutes by default)

In order to actually get to the point where I’d exceed the daily quota I could have done any of the following:

  • Sit around and wait on the timer jobs (boring, and a time-waster)
  • Interactively choose to run the jobs from Central Administration (useful, but a bit tedious after a while)
  • Run them from PowerShell (yes!)

Now, if the timer job is named “Solution Resource Usage Log Processing” then one would assume that’s the name we’d use in PowerShell, amirite? Well, not so fast… there’s a completely different name that must be used from PowerShell and, as far as I can tell, these alternate names aren’t documented on the Microsoft site (if anyone does have a link, I’ll take it). So, I used the following PowerShell script to list all of the timer jobs for my web application:

List Available Timer Jobs for Web Application

Using the output from the PowerShell script (and a few Google searches), I deduced that I needed the following jobs:

  • job-solution-resource-usage-log
  • job-solution-resource-usage-update

The completed PowerShell script exercises the errant web part by repeatedly requesting the page that hosts it, and then kicks off the correct time jobs. Remember, the PowerShell script simply kicks off the jobs – it doesn’t wait until they finish! Because of this there still might be a short lag time between the running of the job and the updating of the statistics.

Exceeding the Quotas and Updating the Results

All Locked Up

To show the current quota usage, do the following:

  • Click Site Actions | Site Settings
  • On the Site Settings page click Solutions (in the Galleries section)

Once the quota is exceeded the following information is presented:

Daily Quota Exceeded

Upon returning to my page I get a different error message indicating that the daily quota has been exceeded:

Web Part Throws a Different Exception

Hitting the Reset Button

Presumably, one would want to be able to reset the quota once the demo or test was complete. Again, the key lies with a timer job. In this case it is the “Solution Daily Resource Usage Update” job that resets the daily quota count back to zero. Using the name “job-solution-daily-resource-usage” I was able to kick off the timer job from PowerShell as follows:

Resetting the Locked Solution

Other Ways to Fail

If you wish to stress test other aspects of the quota points calculation, the following articles may be of interest:

Have Fun Playing in the Sandbox!

Download sample code and PowerShell scripts

read more
John UnderwoodExceeding Quotas in a Sandboxed Solution
cd.jpg

Deploying SharePoint Features

Eric Bowden has over 19 years of software development experience around enterprise and departmental business productivity applications.

SharePoint applications are made up of goodies such as custom web parts, lists,  list event handlers, site definitions, site pages, application pages, and on and on. We package our SharePoint applications as features in order to maximize  reusability and ease deployment. Then we add more deployment-ease by packaging  our features and their resources as SharePoint solution (.wsp) files. The SharePoint Solution Installer provides the final touch by providing a nice wizard-based  interface for solution deployment. Once our SharePoint administrators complete the SharePoint Solution Installer wizard (or use the equivalent STSADM commands), our features are “deployed”.  All is good.

But wait…. What does it mean to “deploy” a feature in a solution package?

Simply put, the feature is installed to the *farm* at the scope specified for the feature in the feature.xml.

This means that the feature(s) within the solution will appear in the list of  features available for activation in all cases of that scope. For example, if  the feature is scoped to “web”, it will appear for activation in all sites for all site collections across all web applications on your farm.

The code which displays the list of features, for example, on the Site Features page, iterates over the SPFeatureDefinitions held in  SPFarm.Local.FeatureDefinitions and filters out those which are not scoped to web, those which are hidden, and those which have AutoActivateInCentralAdmin flag set. In short, this means that a feature that you develop is available for activation across the entire farm.

This presents a problem in some environments where a feature may have been developed for use on one specific site in the farm. Site administrators for other sites in the farm may be confused when they see features in the list of site features which have no application to their site. One work around is to set  the hidden attribute to True in the feature.xml. This will remove the feature  from the Site Features list on all sites requiring use of STSADM to activate and deactivate the feature. Unfortunately, I have not found a cleaner solution.

Many though have wondered, “Why is it that I can *deploy* my feature to a specific web application while this blog post is telling me that the feature list is the same across all web applications in the farm?”

There are several ways to deploy your solution to a specific web application.

The STSADM command deploysolution accepts a URL

The SharePoint Solution Installer also allows you to choose a web application target for solution deployment.

Last, Operations-Solution Management in Central Administration will allow you to deploy and retract solutions from specific web applications.

So, what does it mean to deploy a solution to a specific web application?

The web application deployment target is used as the destination for the following application scope resources which may appear in your solution manifest. These are physical changes to files within your web application (IIS web site).

  • ApplicationResourceFiles – Ex: MyFiles\My.resx. See the comment at the  bottom of the solution manifest schema for some more detail.
  • Assemblies (if the DeploymentTarget is set to WebApplication) – Ex:  [web]\80\bin\MyAssembly.dll
  • CodeAccessSecurity – Changes to <securitypolicy> section in  [web]\web.config to point to a new custom policy file in [12]\config
  • DWPFiles – .webpart and .dwp files for custom web parts
  • SafeControls – Additional entries in <SafeControls> section in  [web]\web.config.
  • [web] = your IIS web site folder, e.g.,  C:\inetpub\wwwroot\wss\VirtualDirectories\80
  • [12] = your 12 Hive, e.g., C:\Program  Files\Common Files\Microsoft Shared\web server extensions\12\

The deployment methods listed above will not allow deployment to a web application if the solution package (.wsp) does not contain any resources scoped to a web application.

For example, STSADM –o deploysolution will give the following error in this case:

This solution contains no resources scoped for a Web Application and cannot be deployed to a particular Web application.

In summary, the deployment of a solution package to a specific web application pertains to resources included in the solution package and not to the installation of the feature itself. Interestingly, the feature is installed across the entire farm even though resources required for that feature may have  only been deployed to select web applications. Activating a feature at a scope beneath a web application in which the solution package has not been deployed will result in missing resources exceptions for sure!

Hopefully this sheds some light on the subject of feature deployment and installation scope.

read more
Eric BowdenDeploying SharePoint Features
question-box-e1425575019953.jpg

Anonymous Access Gotcha

Kirk Liemohn is a Principal Software Engineer at ThreeWill. He has over 20 years of software development experience with most of that time spent in software consulting.

It’s a simple problem with a simple solution, but sometimes the little things hit you when you are deploying from one environment to another and they can take a lot longer than you’d like. So, hopefully this is a reminder and saves some people some time…

Recently I wrote a couple of web services to be hosted within SharePoint. This problem wouldn’t only occur with web services, though. It could happen with web parts, application pages, site pages, event handlers, etc.

One of my web services did not access the SharePoint object model, but needed to know who the current user was, so it used the following within its code:

HttpContext.Current.User.Identity.Name;

Another web service did use the SharePoint object model and it used the following:

this.Context.User.Identity.Name
SPContext.Current.Web.CurrentUser.Groups

The code above worked beautifully in my development environment and two other test environments. When it came time to deploy to test environment at the client, they didn’t work. I was perplexed.

Based on the exception I had, I ascertained that CurrentUser was null in the code above and asked the testers if they were logged in – assuming anonymous access must have been enabled and that they were not logged in. Well, they were logged in, but anonymous access was enabled – and that was the difference in the environments that worked and didn’t work.

It turns out that the problem was that the SharePoint web application (and therefore IIS) allowed anonymous access and the client to the web service calls (in this case InfoPath Forms Services) had negotiated to send as little credentials as possible (none).

So, the first two code snippets resulted in a null or empty string and the last code snippet blew up because CurrentUser was null.

The solution was simple… Require an IIS change to the asmx file or its containing folder to not allow (uncheck) anonymous access to the web service(s).

Another option might be to modify the code to return a 401 Unauthorized to see if the negotiation would begin. I didn’t take it that far, but would love to hear from someone if they have tried this.

read more
Kirk LiemohnAnonymous Access Gotcha
installation.jpg

SharePoint Solution Installer

Kirk Liemohn is a Principal Software Engineer at ThreeWill. He has over 20 years of software development experience with most of that time spent in software consulting.

The SharePoint Solution Installer has just been updated on CodePlex.

The installer allows you to easily provide MSI-like setup for your SharePoint solutions (WSPs) without having to write any installer code. All you have to do is set some values in a config file and ship the setup.exe, the config file, and your WSP.

The SharePoint Solution Installer was originally written by Lars Fastrup who recently wrote Inside the Index and Search Engines: MOSS 2007. The initial version handled features within the WSP scoped to the Farm. I recently updated it to handle features scoped to a site collection as well as provide some configuration and documentation links.

Several individuals have found this tool very useful – I hope you do as well. Lars was able to get the release out earlier today so I wanted to let others know that it is available.

Enjoy!


SharePoint is a web application platform in the Microsoft Office server suite. Launched in 2001, SharePoint combines various functions which are traditionally separate applications: intranet, extranet, content management, document management, personal cloud, enterprise social networking, enterprise search, business intelligence, workflow management, web content management, and an enterprise application store. SharePoint servers have traditionally been deployed for internal use in mid-size businesses and large departments alongside Microsoft Exchange, Skype for Business, and Office Web Apps; but Microsoft’s ‘Office 365’ software as a service offering (which includes a version of SharePoint) has led to increased usage of SharePoint in smaller organizations.

While Office 365 provides SharePoint as a service, installing SharePoint on premises typically requires multiple virtual machines, at least two separate physical servers, and is a somewhat significant installation and configuration effort. The software is based on an n-tier service oriented architecture. Enterprise application software (for example, email servers, ERP, BI and CRM products) often either requires or integrates with elements of SharePoint. As an application platform, SharePoint provides central management, governance, and security controls. The SharePoint platform manages Internet Information Services (IIS) via form-based management tooling.

Since the release of SharePoint 2013, Microsoft’s primary channel for distribution of SharePoint has been Office 365, where the product is continuously being upgraded. New versions are released every few years, and represent a supported snapshot of the cloud software. Microsoft currently has three tiers of pricing for SharePoint 2013, including a free version (whose future is currently uncertain). SharePoint 2013 is also resold through a cloud model by many third-party vendors. The next on-premises release is SharePoint 2016, expected to have increased hybrid cloud integration.

Office 365 is the brand name used by Microsoft for a group of software plus services subscriptions that provides productivity software and related services to its subscribers. For consumers, the service allows the use of Microsoft Office apps on Windows and OS X, provides storage space on Microsoft’s cloud storage service OneDrive, and grants 60 Skype minutes per month. For business and enterprise users, Office 365 offers plans including e-mail and social networking services through hosted versions of Exchange Server, Skype for Business Server, SharePoint and Office Online, integration with Yammer, as well as access to the Office software.

After a beta test that began in October 2010, Office 365 was launched on June 28, 2011, as a successor to Microsoft Business Productivity Online Suite (MSBPOS), originally aimed at corporate users. With the release of Microsoft Office 2013, Office 365 was expanded to include new plans aimed at different types of businesses, along with new plans aimed at general consumers wanting to use the Office desktop software on a subscription basis—with an emphasis on the rolling release model.

read more
Kirk LiemohnSharePoint Solution Installer
publishing.jpg

Site Provisioning Providers

Tim is a Senior Consultant at ThreeWill. He has 15 years of consulting experience designing and developing browser-based solutions using Microsoft technologies. Experience over the last 8 years has focused on the design and implementation of SharePoint Intranets, Extranets and Public Sites.

On a recent project, ThreeWill created a series of Publishing Sites based on custom Site Definitions and custom layout pages. Within the custom Site definitions, we needed to create the default home page (default.aspx) based on a custom layout page. In order to properly view and edit a page that is based on a custom layout page, the underlying content type that the custom layout page is based upon must first be added to the Pages library.

For this scenario, it made sense to use a Site Provisioning Provider to add the content type to the Pages library as part of the Site Creation Process.  Per Ted Pattison’s “Inside Microsoft Windows SharePoint Services 3.0” book (http://www.amazon.com/Microsoft-Windows-SharePoint-Services-Developer/dp/0735623201/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1208787260&sr=8-1), a Site Provisioning Provider is a component type “that can be configured to execute custom code during the site creation process”.

Site Provisioning Provider code must inherit from the SPWebProvisioningProvider class and must be compiled into an assembly dll with a strong name and installed in the GAC.  A Site definition can then reference the Site Provisioning Provider class from inside a configuration within the Web template file as demonstrated below:

Below you can see code similar to what was implemented on our project to add the custom content type to the Pages library.  I’ve circled items that I believe are noteworthy such as the need to “RunWithElevatedPriveleges” and the need to “AllowUnsafeUpdates”.  Note that this scenario assumes the custom content type has already been deployed prior to the new Site creation.

read more
Tim CoalsonSite Provisioning Providers