| I know it has been a while. I’ve been meaning to blog so many times, and honestly by the time I get around to it, my creativity has been sapped for the day. However, I felt this was one that needed to be put out there for reference. I’ve been working on this for the past few months, and I had a lot of questions about it at the last event where I spoke and presented on the topic.
Way back when I first started blogging, I wrote a couple of posts about using the User Profile Service in SharePoint 2007 (yes it was that long ago) to pre-populate fields within an InfoPath form with either the logged in user’s information or information for another user. This was used very often in InfoPath solutions in a lot of organizations, and it worked great and easily in both 2007 and again in 2010. However, when you move to upgrade to SharePoint 2013, you may experience some issues. It can still be done, but you will have to make some changes.
These steps can be used for both upgraded InfoPath solutions as well as new InfoPath solutions. I would caution you, though, to consider carefully any new InfoPath forms being created until the future of InfoPath is more clear. I know there is a lot of concern about the future of InfoPath out there, and a lot of rumors that it is deprecated or “going away”. However, until there is an official announcement of that, it is still a valid product and can still be used. My advice (and this is my personal advice) is to use it wisely and give consideration to alternatives as well since there is still some confusion. InfoPath 2013 has been released, and is a supported product, and while no “new” things have been added, nothing was taken away from the product either. There’s my $.02, you may want some change back!
Now on to the real reason for this post: How to make the User Profile Service web service work with SharePoint 2013 and InfoPath 2013.
The addition of claims (and the fact that the default configuration is claims) in SharePoint 2013 causes some different behavior when connecting to web services. If you ask a developer about this, they’ll probably run screaming in the other direction, because they’ve banged their head on the desk a few times trying to get everything to work and it isn’t easy. I know, I asked my friend Becky Isserman about it just to confirm what I was hearing in general, and she did! The problem is, that the web service can’t understand that ugly thing that passes for a username in claims. If you haven’t looked at it, it looks a little like this: i:0#.w|contoso\lori. Definitely not what we are used to working with. Don’t ask me what all those things mean, I know they mean something but I don’t have it memorized by any means. If you want to know, though this is a good place to start: http://yalla.itgroove.net/2012/11/claims-based-authentication-in-sharepoint-2010/.
So now we have to figure out how to make it work. Don’t worry, if you’ve already got a form that is connected, you can do this with those as well as new forms. I’m going to be starting from scratch, but if you are starting from a pre-existing form, just remember to start at step 3.
- I have created a very basic form just to demonstrate how to do this. The form contains some user information fields and a hidden field (shown on the bottom of the form, just to see what it looks like).
![CropperCapture[1] CropperCapture[1]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[1].jpg)
- We want to connect to the user profile service to populate the name and email address automatically. So create a new data connection to a SOAP web service and use the following web service URL: http://<yoursiteurl>/_vti_bin/userprofileservice.asmx. Configure it exactly like you did in previous versions (you can use the links above for reference if desired).
- Once you have that connection, you will have to convert it to a data connection file. Click on the data connection and click Convert to Connection File.
![CropperCapture[3] CropperCapture[3]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[3].jpg)
- Name and save your data connection file to your data connection library (you will have to create one if you do not have it already). You can leave this relative to your site collection.
![CropperCapture[4] CropperCapture[4]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[4].jpg)
- Now comes the fun part. You will have to work with your SharePoint administrator if you aren’t that person and have them create an application ID in the secure store. Once you have done this once, you may not need to do it again unless you plan to have different permissions and credentials for every form with this connection. If you have this created already, skip to step 10. To do this, go to the secure store in Central Administration (Manage Service Applications>Secure Store>. Click New in Manage Target Applications. Then name your application ID. For this example I’m calling it InfoPathID as both the Target Application ID and Display Name. Then enter an email. Change the Target Application Type to Group and then click Next.
![CropperCapture[6] CropperCapture[6]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[6].jpg)
- You can click next on the page identifying the fields in the ID, leave the defaults.
- Since this is a group application ID, you will have to set administrators and users. for the Administrator, I’m just using my farm account, but you may have a specific user or group that maintains your application ID, enter that information.
- For the Members, you will need to consider how this form (or other forms if you plan to reuse the same credentials on all form connections) will be used. If all users will have access to the form to use it, you will need to add Domain Users as the members. This will allow all users to be able to use the form and connect to the User Profile Service. Click OK when completed.
![CropperCapture[7] CropperCapture[7]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[7].jpg)
- Once you have the Application ID created, it is time to set the credentials. This should be an account that has the ability to read user profiles in your environment. It could be a service account that you reuse or a new service account especially for this purpose. For my example, I’m using the farm account, but that is NOT recommended for production environments. Click the down arrow by the application ID and click Set Credentials. Enter your information and then click OK.
![CropperCapture[9] CropperCapture[9]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[9].jpg)
- While working with your administrator for the credentials, you will also have to make a change to the InfoPath Forms Services configuration. Go to General Application Settings>Configure InfoPath Forms Services in Central Administration.
- Ensure that the checkbox next to “Allow user from templates to use authentication information contained in data connection files” is checked.
- Now we can go back to the data connection. When we created the data connection, it created an XML file in our data connection library. This file contains all of the information used to connect to the web service. You’ll notice there’s a line near the bottom that is commented out for Authentication information.
![CropperCapture[10] CropperCapture[10]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[10].jpg)
- To connect with our web service, we will have to pass the authentication information that we have created in our Application ID. Delete the comment dashes and exclamation points from the node in the XML and enter the app ID you have created and the credential type of NTLM. It should look like this:
![CropperCapture[11] CropperCapture[11]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[11].jpg)
- Once you have made the change, save this back to your data connection library. Now we can start working within the form to connect.
- While we can now connect successfully to the form, the credentials that are being passed to the service to query are the credentials that were entered in the Target Application ID in the Secure Store. Probably not the credentials we need to use. This is why I have added the User Name field in my InfoPath form. But if you looked closely, it is passing that ugly claims user name. That is NOT what we want. What we will have to do is trim this using a function to show only the username itself with the domain. In the control, create a default value and insert a function of substring-after. Configure it so that it uses the username as the string and only returns the substring after the “pipe”. It should look like this:
![CropperCapture[12] CropperCapture[12]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[12].jpg)
- This should return the following when used within the form:
![CropperCapture[13] CropperCapture[13]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[13].jpg)
- Now we can use this username to populate the query fields of our data connection and query to populate our form. The way you do this part may vary, I’m doing a very simple version of it, where it populates when they first open the form. First, in InfoPath, show the Manage Rules section and select the UserName field from your data fields in the right, then click New> Action.
- Under Run these actions, click Set a Field’s Value.
- Select the Fields button in the Rule details dialog and then change the data source drop-down to the secondary data connection for your User Profile Service connection.
- You will notice there are two sections, query fields and data fields. We will want to populate the query field with the username we have in the form. Expand the section for query fields and select the AccountName query field and then click OK.
![CropperCapture[14] CropperCapture[14]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[14].jpg)
- Set the value of the field by clicking the function button and inserting the current (Username) field then click OK.
It should look like this in the rule details: ![CropperCapture[16] CropperCapture[16]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[16].jpg)
- Now click Add to add an action and select Query for Data. Set the Data Connection to query to your user profile data connection and then click OK.
- Now you can add additional actions to set the field values for the Name and email fields as you have in the past with the User Profile Service and by setting the filters appropriately.
![CropperCapture[17] CropperCapture[17]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[17].jpg)
- Test it out:
![CropperCapture[18] CropperCapture[18]](/seethepoint/SiteAssets/Lists/Posts/EditPost/CropperCapture[18].jpg)
This is a little more complicated at times than creating the connection without claims. However, this could have been used in previous versions as well by creating the Target Application ID and you would have to make no changes for claims other than the substring changes to remove the odd characters from the username.
It is important if you are the InfoPath forms administrator in your organization that you work with the team who will be upgrading your environment to 2013. While everything may move correctly (good luck with that) you’ll also need to work on correcting your forms to use this method of connecting to the User Profile Service either before or immediately after upgrade to ensure that users have a smooth experience with the transition.
Happy SharePointing! |
| For the past few years, I've had the privilege of speaking at several SharePoint Saturday events each year. SharePoint Saturday Ozarks has a special place in my heart as the first SharePoint Saturday event where I first spoke. My friend Mark Rackley always puts on a fun event, and since he's one of my favorite SharePoint Developers, I always volunteer to go speak for him. This year, he is shaking things up a bit. Instead of the event being held in Harrison, Arkansas, it will be held in nearby Branson, Missouri. This is going to be a fun event this year, it will be in a fabulous location, and there is so much to do in Branson. Two years ago, I went with Joel Oleson, Michael Noel, Cathy Dew, Sean McDonough, my husband Matt Gowin, and a few others to ride go-karts and play laser tag after the event. It was a blast. This year, we will be even closer to more adventures! If you haven’t already registered to go to this event, you should totally register. I’m going to be presenting SharePoint Administration 101, and there are a lot of introductory sessions set aside just for those who maybe are wanting to learn or check out SharePoint. There are a lot of awesome speakers this year, and we also have the privilege of having our very own entertainment brought by Rob Foster and the band he is in: This Modern Station. I hope you come on out to the event. Be sure and find me, I’ll probably be dancing at the SharePint! |
| So I haven’t blogged in a while, to be honest, I’ve been busy trying to learn how to take small sips from a wide-open fire hose of information. It’s been a great first 6 weeks at Microsoft, and I’ve learned a lot and am looking forward to learning more! During this time, I’ve listened to a lot of people talk, some in a classroom, some in online teaching settings, some in video, and some one-on-one… I’ve always noticed how different people pronounce different words, and thought I’d post something about it. I know usually this is a technical blog, and I promise to get back to that. I’m just now finding time to really blog anything, so this is a light and easy one, be easy on me. One of the “words” that I often listen to see how people pronounce is GUID. I use the term word loosely, because this is actually an acronym, but we so often use it as a word. GUID stands for Globally Unique IDentifier. According to Wikipedia, it can either be pronounced “gwid” or “goo-id”. So neither is right or wrong, and I’m not going to argue that one is. My personal preference is “gwid” but I don’t criticize anyone who pronounces it differently, just often wonder why. So in my “spare” time I did a bit of research into words ending in –uid and how they were pronounced. Below should give you a good idea of my findings. | Word | Pronunciation | | charquid | chahr-kid | | druid | droo-id | | equid | ěk'wĭd, ē'kwĭd | | fluid | floo-id | | illiquid | ih-lik-wid | | languid | lang-gwid | | liquid | lik-wid | | noctuid | nok-choo-id | | nonfluid | non-floo-id | | nonliquid | non-lik-wid | | pinguid | ping-gwid | | quid | kwid | | semifluid | sem-ee-floo-id | | semiliquid | sem-ee-lik-wid | | squid | skwid | | superfluid | soo-per-floo-id | | toluid | Tol-u-id | So it seems there’s not a true distinction between the two options. Some words use “wid” and some use “oo-id”… oh and one just uses “id”. I think the real distinction is in the letter in front of the –uid. It would be hard to pronounce “rwid” but not hard to pronounce “roo-id” right? So I’ve created a little survey, just for fun to see how people are pronouncing GUID. Thanks to my friend Todd Klindt for suggesting an alternate pronunciation! Happy SharePointing! |
| When you look in a mirror, what you see is a reflection. This reflection can show you both what is behind you and what is before you. I’ve decided to take a look in the mirror. Some of you, are undoubtedly humming “I’m looking at the man in the mirror, I’m asking him to change his ways” aren’t you? It’s okay, so am I. So why am I looking in the mirror, well I’ve decided that a change is due, I’m looking at what is behind me as well as what lies ahead. Today, Friday, May 11, 2012 is my last day with Summit 7 Systems. I have enjoyed my time here and learned so much. So I’m looking back at this time with fond memories and hopes for their future. I will greatly miss working with many of the people at Summit 7 on a daily basis, but do hope to continue to work with them in the community. It’s only because we have such a strong SharePoint community that I can know that I will see each of them again at events and be able to continue to foster those relationships. I’m also looking forward! I’m very excited about what lies in front of me. I have taken a position as a Premier Field Engineer (PFE) with Microsoft. I will be working with new clients and customers, facing new challenges. The coming months are packed with learning and opportunities like none I’ve ever had before. I’m up for the challenge and look forward to meeting it head on. I hope you will all take a moment to look in the mirror and see what has happened in the past, evaluated it and move forward to the new challenges lying in front of you. This doesn’t mean you have to change positions, but look at your experience and look at where that can lead you in your future! |
| I’ve often been asked by different people, “What is SharePoint?” Usually I’m asked this in response to: “What do you do?” and I’ve learned sometimes it’s best to just say something along the lines of “I work with computers.” However, sometimes I go further and tell people that I am a SharePoint administrator or consultant and then have to figure out how to answer their follow up question. When that happens, my answer usually is dependent on a few other things. Yes, I know, I just said “It depends” but really the product doesn’t change, but how I answer the question. So the biggest thing that my answer depends on is the experience level of the person asking the question. I’m not talking SharePoint experience, but technical experience. Does the person understand the concept of desktops as clients and servers providing applications? Is the person a developer or current server admin? Is their only technical experience using a personal computer to surf the internet, not a business user? A good understanding of the audience helps to be able to answer their question in a way that they might understand it. So let’s start with the easiest scenario. If the person asking the question has experience using a computer in an enterprise environment with desktops as clients and programs or data stored on servers asks the question, the answer goes something like this: “SharePoint is a server product from Microsoft that provides the ability to collaborate at the enterprise level through a web-based interface. It also provides the capability to network socially within an organization as well as perform web and enterprise content management. It can also be used as a development platform for rich applications and business intelligence. Oh, and it provides a great search platform to begin to search not just within the sites that are created, but also across other sites, platforms, databases, and traditional shared folders. “ You can go deeper if you like, but this usually is a good opening explanation. Let’s say the person is already a .NET developer or server admin. While this seems like it might be the easiest one to deal with, it often isn’t because of the technical experience and sometimes preconceived ideas that these people have. Sometimes it takes a little creativity to get them to understand what SharePoint is. I usually have to delve a bit to see what their ideas are before I can go into explaining SharePoint. However, usually for the hard core dev, you can tell them something along the lines of: “SharePoint is a platform that provides collaboration, content management, and other capabilities to the enterprise, but allows for custom development for specific needs that are not met by the platform.” I’ve found that the use of the word platform here is beneficial when talking to the hardcore, sometimes resistant dev. If the person is a pretty strong server admin, then I’ve explained that SharePoint is a server product providing the ability to efficiently collaborate, manage content, and provide capabilities that can be customized to meet the needs of a business. Sometimes I’ve gone further and explained the backend is SQL for those who may have been SQL DBAs. The toughest scenario is when the person really only has experience using a computer in their home, for basic things like word processing, email, and moderate web surfing. Unfortunately, this probably is half of my family, who really have little concept of what I actually do on a regular basis. But they are the ones who want to know the most… if you’ve worked with SharePoint long and your family has an inkling that you have technical skills, you’ve probably become their personal help desk and the question about what you actually do inevitably comes up. Answering them in such a way that they can understand, and not feel like you think they are total morons is a challenge, because if you’ve worked with SharePoint for long, it comes pretty natural to you, but probably not so easy to explain or grasp the concept that someone doesn’t understand it. So here’s my go at it: “SharePoint is a product that runs on a server or set of servers, that provides websites to the people within an organization or to the web, which is called external facing. These websites can be used like websites for companies that you have visited on the web if they are external facing. Internal websites are used for different things, such as places to store, share, and create documents, manage calendars and meetings, manage projects, assign and track tasks, process information or data through a specialized workflow, or even show charts and data from within their business so they can understand the status of the organization. It can do all of these things and more if desired.” So I hope maybe whatever group you fall into, you may be able to relate to these answers, and maybe even some of them helped you understand it a little bit better. What I’ve really learned most is that explaining SharePoint to people is never easy, or brief, and usually can’t be summed up in just a few words or one or two sentences. To fully grasp and understand it, generally, you have to use it. And even then, you may only understand that small portion of what you are using it for. It is a large and complex product with many capabilities and options, and most people and organizations are barely scratching the surface of what it can do and provide. Don’t let that scare you, though, it is a powerful and sometimes fun technology to work with, and when you do have those “Aha” moments (I have them all the time, and I’ve been working with SharePoint for years!) you can be sure that you’ve found a benefit to you, and that there are plenty more of those moments to come! If you are interested, here’s a video that I like to use to share sometimes with clients who are trying to figure out what it is and how it will fit in their organization: http://www.lynda.com/home/Player.aspx?lpk4=68886&playChapter=False. Happy SharePointing! |
| Anytime someone has to face something unpleasant, we often tell them to “bite the bullet.” This phrase is so often used to face something unpleasant or to survive through pain. It has been said that there was a practice of having a person undergoing a surgical procedure would bite down on a bullet through the pain. Why someone wants to chew on metal rather than a nice leather strap is beyond my understanding, but that’s where the term is said to have come from. What does this have to do with anything? Well, I’ll tell you. I’m not sure who started the idea or where it came from, but back in the earlier days of implementing SharePoint there came about this idea that to make it easy, everything should be done in a single site collection. Just about the only thing made easy by practicing this was the navigation. Yes, it does solve the navigation problem quite well, but managing this can be a total nightmare. And what about disaster recovery? If everything is in one site collection, how long does it take to backup and restore? Where do we find the ONE item that someone deleted 6 months ago and now needs back urgently? Managing security, yeah, that was fun, too, right? Having oh… hundreds of SharePoint groups to sift through to find the right one to give permissions to your sub-sub-sub-web was no fun. and how many people had site collection administrator rights and could see things they had no business seeing? Features? Yeah, lets make sure EVERYONE has the exact same needs. It just was painful to manage in every way. Now it is 2012 and 2010 has been released for almost 2 full years. People who have stuck with SharePoint through this pain are now wanting to upgrade to 2010 and make their environment better. They are tired of the clutter and want to streamline their sites for ease of collaboration and management. How? Usually this will be a migration, moving sites from sub-webs to site collections of their own, managing data, re-creating the appropriate security. Now we’re really talking pain! Migrations such as these are not uncommon. It has given rise to the use of third party tools that allow you to promote and move content around as you upgrade it. It could potentially all be done manually with exports, imports, backups and restores, making templates, it is possible. Many are turning to these tools to manage it, though because it is a much faster, simpler process. One thing many have run into, though is the carry over of all of those security groups to the new site. I’ve seen there be about 300 of them, and that’s probably one of the smaller sites that has that many groups. Now comes the pain of having to clean this up. Some tools will do it for you, but some won’t. With Todd Klindt’s help, I figured out a way to make this easier and faster with PowerShell. Now, I would say you could create a script for this, however, because you have to manually edit a file to make it only remove those groups that you want removed, I’d run it as separate commands. First, run the SharePoint 2010 Management Shell (it loads those SharePoint specific add ins for you). Then you have to load up the web that you need to clean up. Don’t worry, this will clean it up for sub-webs of the new site collection as well, provided they need the same security. Use this command, which we all know: $web = Get-SPWeb <url>. Once you have that loaded into the session, you can write out the names of the groups from the site using the following command: $web.SiteGroups | select name | export-csv groups.csv. Now you have a CSV file that will list all of the groups from the site. You need to go edit this file and delete those groups that you want to keep on the site. This is important, only delete the groups you want to keep. A little counter-intuitive, but trust me on this, you’ll only make that mistake once! Once you have edited the file, you can import it back into the session as a variable for that session: $groups = import-csv .\groups.csv. Now comes the part where this works. This command will remove those groups that are in the CSV file from the site groups on your site: foreach ($grp in $groups) {$web.sitegroups.remove($grp.name)}. Now, it is important to note that this will not remove Active Directory Mail Enabled security groups. These groups have to be removed as if they were users. You will use similar commands to export these groups, edit a file, import the groups to remove, and then remove the groups these commands are: //Export list of users
$web.SiteUsers |Select UserLogin | export-csv users.csv
//Edit the list
//Import the csv
$users = import-csv .\users.csv
//Delete users
foreach ($usr in $users) {$web.siteusers.remove($usr.UserLogin)}
Obviously, you could remove individual users from your site as well, however, this could affect other things. Make sure you edit this list to remove only those groups that you need to remove that can’t be removed via the previous commands. You may find it easer to create this list manually instead of exporting all of the users and editing.
I hope this helps some of you out there who have to deal with this pain. Once I figured this out, it was much easier to bite the bullet!
Happy SharePointing! |
| Recently there have been blog posts, discussions, and even a Twitter event discussing the SharePoint community. I have to admit, while I’ve been a part of the community for a while, I haven’t given it a lot of thought. My friend Mark Rackley wrote an article about how to get involved in the SharePoint community. It gave some very insightful details including user groups, Twitter, events, and more. I started out in the community with just attending our little user group (which I now co-run with Laura Rogers) here in Birmingham. Laura and I worked together and talked all the time. You probably would be hard pressed to find a time we were together that we didn’t talk about SharePoint, InfoPath, or some such technical thing. I think we were our own user group before we found others! Laura got me to sign up for this thing called Twitter, and I have to admit, I wasn’t too into it at first. Then I started tweeting a bit more, and what do you know, some of those experts began to notice that I had something to say, and even began encouraging me to say it. It wasn’t long before I started blogging, attending events, and more, which brings me to today. I had the privilege of speaking at the Atlanta SharePoint User Group meeting last night. It was a great event and I truly enjoyed meeting so many people. I was a bit nervous when they told me how many people they were expecting, because I haven’t spoken in front of very many large groups, so when 70 people filled the room, I was just a bit intimidated at first. However, once I got started it was very painless, and there was good feedback from the attendees. I enjoyed the meeting, and hope to one day go back and talk or just visit! User groups are a great way to get involved, you can meet others and quickly realize you are not alone in your quest for knowledge, solutions, or just someone who has been there and done that in your SharePoint journey. They are a great way to learn more, network, and hopefully even build some friendships with others who can understand and help when you have an issue arise. There are even some special interest groups that have meetings, such as Women in SharePoint. They not only discuss the technical stuff, but can help promote and encourage you professionally. So if you are close to a user group or other SharePoint group (and there are LOTS of them) find out when it meets, register (so they’ll be sure they have enough food for you) and show up. You just might find out you like it! Happy SharePointing! |
| So in my previous post, I announced the upgrade of my personal blog to SharePoint 2010. Now, I am one of those people who does not have the infrastructure here to host my own blog, and I mentioned that the upgrade was pretty twisted. Here’s why. I had my blog with a hosting company that had me on SharePoint 2007. That hosting company does have 2010 hosting available now, but they wanted to charge me several hundred dollars to upgrade my site from 2007 to 2010. Well, I asked why, and they tried to give me some crazy talk about how involved the process was and some crazy thing. Well, since I kind of do SharePoint for a living, and have done my fair share of upgrades and know that my site was basically a host-header site collection and I had no customizations, that meant they were giving me the run around and wanting money I didn’t want to part with. Meanwhile, I had this other hosting company who had a much better deal for me if I would host my content there on their 2010 environment.
My dilemma was, I wanted to figure out how to keep my content together and have the same links, URLs, feeds, etc. This was not going to be easy. It wasn’t like I had access to the servers to do a database backup and restore from one place to another. Nor did I have the ability to run stsadm commands to backup/restore or export/import. So now I had to really think outside the box. But I really wanted to go from this:

to this:

I decided to do some research on how to export the content. Yes, I had Windows Live Writer, and could go and get my posts and save them as local drafts, then re-publish them, but that would lose the comments as well as lose the dates that they had been posted. I wanted to keep those. So I looked to my next trusty tool: SharePoint Designer 2007. Now, I know some of you don’t like it much, but when you don’t have server access, it becomes your go-to tool.
After doing a little research I discovered that the backups done with SharePoint Designer 2007 were like running the stsadm –o export command. Now that, I knew how to work with. So, I decided to try this and see what I could do. I made a backup of just my blog site (it was a sub-site of my main site, which is fortunate and you’ll see why) using SharePoint Designer. Now I had this great little file named: SeeThePointbackup.cmp.
Ok, now what. Um, I haven’t used a 2007 VM on my machine in a LONG LONG time, and currently all of my VMs are on an external hard drive at Cathy Dew’s house so that she could get copies of some of the common ones we use. Now what??? I remembered that long ago I had downloaded the files for the Microsoft 2007 VHD that they put out for free and I still had those files on a separate network storage here. So, I decided to run those files and create that 2007 VHD. Now I have that all created and am ready to do the next thing, um, wait, I don’t have virtual PC… all is not lost, the VM tool I have will import VHD files, YAY!. So I get that done and then create a new content database in the VM and create a new site collection in that database. Now I run stsadm –o import and import SeeThePointBackup.cmp into the new site collection, overwriting everything that is there. Once that is complete, I can browse to my new site collection and see that all is working well, whew. I see my blog posts (some of the pictures are messed up due to links being off, but I’m ok with that at the moment).
Now, I have this content database that is in 2007 and I know what to do with that, right? I can just copy or backup and restore that database to my 2010 machine to SQL. So… that is what I do. I get it there, and manage to give it the right permissions (farm account has full control). Now, I can use this wonderful PowerShell command Mount-SPContentDatabase and voila I’ve now just upgraded that database to 2010. I can browse to the site (still pictures are messed up) and see posts. It still looks like 2007, though, so I run the visual upgrade and change it to 2010. WAHOO… I’ve got a site in 2010, I’m already to go.
Or so I thought.
So I got my new site all set up and ready to go in 2010. I wanted to keep my URLs the same, so I had to request everything, then change my DNS hosting entries to the new IP address at the new company. At this point, I’ve just got a plain vanilla team site at http://www.pointgowin.com that isn’t even available to anonymous users… and no one can get to my blog. I think to myself, “It will be ok, it is late at night, and this won’t take long.” Boy, was I wrong on that one. Well, actually it wouldn’t have if I had stopped to think a *little* bit more about the process. Now, how do I get my blog site that is in my 2010 VM out to a sub-site? I realize pretty quickly that I forgot I cannot backup and restore with SharePoint Designer 2010. Uh oh… Hmm… a lightbulb went off… I could save it as a template with content and move it then create the new blog site with the template. I’ve got to create one any way. So off I went to do that.
I created the template in SharePoint 2010 by going to Site Actions>Site Settings>Save site as template. So in 2010, if you didn’t already know, it doesn’t create the .stp file for sites like we were used to in 2007, it creates a sandbox solution. Um… crud… ok, so I go check my new site and thankfully, they give me the ability to have a sandbox solution. All is not lost. So I export that new solution from my VM and go upload it to the new hosted site. Forgetting somewhere along the way to click Activate to activate the solution. So when I go to try to create the site, the template isn’t there. I scratch my head for about a minute, then remember oh yeah… you have to activate solutions. So I go activate the solution. WOW… ok, so now when I go to create my blog site, I have this new template there that will rebuild my old site. Awesome! So I select that as the template, name it See the Point, and set the url. Easy, peas-ey, right? WRONG. I get this error… saying that the template requires a feature installed on the farm or site collection. What??? Seriously?
After a bit of soul searching and digging through my inner admin file cabinet I realize that the new hosted site is basically a SharePoint Foundation 2010 site, and what I’ve just tried to do was deploy a template that was made using SharePoint Server 2010. <sigh> Thankfully, I still have those original 2007 database files, and lo and behold a SharePoint Foundation virtual machine. I go back through all of my steps and attach my database, do the visual upgrade to 2010 and create my site template in that VM. I upload this new site template and remember to activate it in my site this time and create my new blog site. WOOHOO! All of the content is there. None of the pictures are working, but it is there!
So the easiest thing to do was to create a new view in my Posts list that showed the body of the post along with the links and scroll through them to find which ones had pictures that showed with a big red x and open those posts in a new window. I then went into each of those posts (thankfully there weren’t too many) and updated the URL for the pictures to be the new URL (when I created the template from my VM, it kept the URL from the VM in there) for my site and voila. Posts are back to normal, and still show the original post dates.
Now I realize I have lost all of my comments on my posts. They are all in the comments list, but not showing on the posts. I play with this in my VM for a bit and realize that I can’t get them back in there either. So what is a girl to do? I don’t want to lose all of those comments… So I decided rather than try to run through craziness, I’d create a Data View Web Part for the comments list and filter it with the query string parameter. The PostId field in the Comments list should equal the ID of the post.aspx page and then also filter to show only approved queries. I add this to my post.aspx page and yippee comments are back and working.
I hope you all enjoy my new blog. I do plan to put my own bit of flair on it and make it a little less OOTB, but not too much. I thought if anyone else was in a similar situation, they might find this unusual way of upgrading helpful.
Happy SharePointing! |
| Well, if you are a regular reader of my blog, you probably notice something is very different. That’s right, I’ve done it… I’ve upgraded to SharePoint 2010! I know, there are a couple of things not working. The way that I had to go about upgrading my content and keeping it all together, was… twisted to say the least. I’m still working on fixing those things and getting them all updated. But at least you can see me all new and improved! You may see some changes over the next few weeks. I’ll be working on fixing the comments (don’t worry, they aren’t lost, just not showing when you click the link) and the pictures. But at least you can read the content right now! Sorry this is such a short post, just wanted to get something up to let you know all hope is not lost if you can’t see what you want to see at the moment.
Happy SharePointing!
Update: Comments are working again! |
| So it has been a while since I’ve blogged, I know. I’ve got no real reason, but I can make up a couple of good excuses: writer’s block, no time, no good ideas, or maybe the dog ate my homework. The truth is, I just have been so busy that I haven’t made time in my down time to do it. My apologies, and I’ll try to do better this year. This is a good one, though. It certainly had me banging my head against my desk for a while. I was recently on site with a client and one of the things we decided to do while I was there was apply SharePoint Server 2010 Service Pack 1 to their system. When I originally built it, it was prior to the release. So I naturally went out to Microsoft.com and downloaded the service packs. Since there was nothing in the environment yet (we are planning the migration now) and no one was using it, we decided it would be fine to go ahead and work on this during business hours. It’s a good thing, too! So, like any good administrator, I made sure that I took a quick backup and then installed the bits. That was easy enough, and had no real issues with that. Now comes the fun part. Running the SharePoint Products Configuration Wizard… The nice thing about 2010, is you can kick it off on all of the servers (there were 4) at once and each will just wait for its turn to run. So kicked this off and then went about some other business. Later, when I came back to check on the progress, it stated there were some errors, but acted like it had finished. Puzzled, I went to look at the PSCDiagnostics logs and found something very non-specific: 01/12/2012 22:41:42 14 INF SyncUpgradeTimerJob: Upgrade timer job failed. Return -1.
01/12/2012 22:41:42 14 ERR The exclusive inplace upgrader timer job failed.
You know exactly what that means, right? Yeah, me neither. So I went into Central Administration to see what I could find. What I found puzzled me completely.
I went to the Upgrade and Migration section of Central Administration to check the status. Clicking on “Check product and patch installation status” showed that the farm and server status were all patched up to Service Pack 1 (14.0.6029.1000). Hmmm ok. So I went back and clicked on “Review Database Status”. Oh my, that doesn’t look right! All of the Content Databases, the Central Admin database (SharePoint_AdminContent), the configuration database, and about half of the databases for the service applications showed “No action required” and had upgraded appropriately. The others, well, let’s just say they weren’t so happy!
Some of those databases stated that “Database is too old and upgrade is required” while the others stated “Database is in compatibility range and upgrade is recommended.” Um ok, they were all installed at the same time, so they should be at the same level, but they don’t show the same. Weird, right? So I do a little research and find some other commands to try to force the databases to upgrade. I tried the following command:
PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures
It failed on step 5 of 6 each time… now I’m really getting frustrated. Each time, I get the same error in the logs, no further details. Finally, I’m so frustrated that there MUST be something else going on. Thankfully, the PSCDiagnostics log shows the time of the failure down to the hundredth of a second. Since I’m running all of this on a single server at this point, I can know which server is doing the work. So, I crack open the ULS logs and start looking at the times to find the EXACT time that is shown in the PSCDiagnostics log. What do I find? Well at that exact time, it is just telling me that the psconfigui.exe job is ending. Okay, so that isn’t super helpful at that hundredth of a second, so I back up one… and lo and behold if my world isn’t shaken!
01/12/2012 22:41:41.16 OWSTIMER.EXE (0x09F4) 0x0CC0 SharePoint Foundation Timer 6398 Critical The Execute method of job definition Microsoft.SharePoint.Administration.SPUpgradeJobDefinition (ID 8762c5ac-ffd3-4326-8d12-e9079efa384a) threw an exception. More information is included below. The operation cannot be performed on database <Database Name> because it is involved in a database mirroring session. ALTER DATABASE statement failed.
OH MY GOODNESS! So when we built this farm, we built it on temporary SQL hardware because the new, more robust hardware was not in yet. It is now in, and in order to prepare for the move, mirroring had been set up on all of the databases to the new server (cluster). We had also set up an alias to make this move as easy as possible. But I was in shock, mirroring is a very common DR practice, why would that affect the ability to upgrade SOME of the databases? I stress some, because some databases would upgrade and some would not. So I contacted the DBA and asked them to pause the mirroring for the upgrade. After the pause, I had the same results, it still would not upgrade. So I ended up having them completely remove the mirror from the databases, once I did this, it upgraded all databases completely.
Now, what is the point of this blog, you may ask? I am hoping for two things:
1. If someone else has this problem, they will be able to find the issue much easier and faster than I (I looked on EVERY forum and blog I could find, and no search engine even indicated this as an issue).
And 2. If there’s anyone who may have had this issue and found it or worked with someone to find out why mirroring isn’t working, or if there is a fix to make updates work with mirroring to find out that information!
I really hope there is some way to make this work, as mirroring is pretty useful as a Disaster Recovery strategy and it is not something you can turn on and off with the flip of a switch, it is a little more involved than that. I just would like to know if there is some accurate guidance somewhere that will help with this in the future. In our case, since it was to prepare for a move, we just turned it off to complete the upgrade and then turned it on again. Many thanks to Todd Klindt and Sean McDonough for listening to me rant and assuring me that it was unusual and I am not crazy (boy did they get that part wrong, huh?)!
Happy SharePointing! |
|
|
|
|
Lori Gowin SharePoint Administrator
Lori is a SharePoint Administrator who has been working with SharePoint and InfoPath technologies for over 5 years. When not focusing on SharePoint, Lori unwinds watching sports and spending time with her husband and children. |
|
|
|
|
|
|