After trying to build my unit test project I noticed that some of the private accessors in my unit tests were no longer referenced properly. I tried to regenerate a unit test and came across the following error:
"The following error was encountered while reading module 'Microsoft.SharePoint': Assembly reference not resolved: Microsoft.Internal.Mime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35."
When I copied the dll of the project throwing the error to the GAC the build error disappeared. I removed the dll and the error was back. I then tried to remove the Microsoft.SharePoint reference from my project and add it back. Still no luck.
My final step was to delete the project file from the solution and re-create the project with a fresh project file. Problem solved.
This blog shares some of the issues / experiences I have passed through related to development in SharePoint.
Friday, April 29, 2011
Wednesday, March 23, 2011
Create External Content Type Using SP Designer 2010 with Remote Database
With the release of SharePoint 2010 came many significant improvements to the SharePoint platform. Among them was the release of SharePoint Designer 2010. After working with the new release of SharePoint Designer I have been *very* impressed with the improvements that have been made.
It wasn't until today that I was problem free with SharePoint Designer. It started off with beginning to work more closely with External Content Types using the Secure Store Service. Due to the amount of time spent trying to come up with a solution alone, was reason enough for me to write something about it.
Scenario: Connect to remote SharePoint site collection in SharePoint Designer 2010 to create an External Content Type from a SQL database that isn't on the same server as SharePoint.
Problem: Because I'm using NTLM authentication I am unable to connect to the database through SharePoint using Pass Through Authentication. The limitation with NTLM is that it doesn't support multiple server hops.
Procedure: First step is to create a Secure Store Application for my connection to the remote MS SQL database. The reason for this is it acts as a bypass to the multiple server hop limitation with NTLM by authenticating against the Secure Store Service using my NTLM credentials to retrieve the credentials needed to authenticate against SQL server and then having SharePoint use those credentials and authenticating against SQL server.
Because SQL server is on a different domain than my local box I decided to use SQL authentication not Windows authentication to login against SQL server. I created a SQL account that I could use for the external content type and mapped that user to my SharePoint account in the Secure Store Application.
Everything was setup to work properly...the problem was when I tried to connect to the database I was getting back an error message:
It wasn't until today that I was problem free with SharePoint Designer. It started off with beginning to work more closely with External Content Types using the Secure Store Service. Due to the amount of time spent trying to come up with a solution alone, was reason enough for me to write something about it.
Scenario: Connect to remote SharePoint site collection in SharePoint Designer 2010 to create an External Content Type from a SQL database that isn't on the same server as SharePoint.
Problem: Because I'm using NTLM authentication I am unable to connect to the database through SharePoint using Pass Through Authentication. The limitation with NTLM is that it doesn't support multiple server hops.
Procedure: First step is to create a Secure Store Application for my connection to the remote MS SQL database. The reason for this is it acts as a bypass to the multiple server hop limitation with NTLM by authenticating against the Secure Store Service using my NTLM credentials to retrieve the credentials needed to authenticate against SQL server and then having SharePoint use those credentials and authenticating against SQL server.
Because SQL server is on a different domain than my local box I decided to use SQL authentication not Windows authentication to login against SQL server. I created a SQL account that I could use for the external content type and mapped that user to my SharePoint account in the Secure Store Application.
Everything was setup to work properly...the problem was when I tried to connect to the database I was getting back an error message:
I then looked in the Secure Store Audit table in the SQL database and noticed that nothing was being logged for the requests from Designer. My next step was to close down SharePoint Designer due to a possible issue with caching. After reopening I selected the Impersonate Custom Identity option and entered the Secure Store Application ID which would return the windows identity credentials I had stored in the application. When I was prompted with a Windows login, I entered the SQL DB user credentials which worked!! When I opened the connection properties I noticed that the Secure Store Application ID wasn't what I had first entered...wierd. The secure store application ID was what I had configured to return the SQL server credentials. Bottom line...try and try again.
So, looks like there are still some kinks with SharePoint Designer 2010. If I discover any further oddities I'll be sure to update this blog.
Wednesday, March 9, 2011
Installing Language Pack on Microsoft Office SharePoint Server 2007 (64 bit)
This post will help you setup language translation for your SharePoint deployment. The links below are for 64 bit systems only. You will need to download / run all of the following, in order. Before downloading each file, select the language for the service pack.
5. Run SharePoint Product and Technologies Configuration Wizard
6. Create a new site in SP and select the language you just installed
Thursday, February 17, 2011
Recap from Houston SharePoint User Group
First I wanted to thank everyone for coming out to the user group last night in Houston. It was great to meet many of you all and I thoroughly enjoyed my time. Discussing integration of SharePoint with an enterprise infrastructure can be quite daunting but I feel like the message got across based on some questions during and after the presentation. I would appreciate any constructive feedback related to my presentation by commenting below.
As a side note, one of the attendees asked a very good question around authorization of multiple SharePoint lists from different SharePoint farms. I wanted to highlight this at the beginning and provide a more complete answer. Because of the nature of mashing SharePoint lists in a different environment such as Presto the security context in SharePoint no longer applies.
As a side note, one of the attendees asked a very good question around authorization of multiple SharePoint lists from different SharePoint farms. I wanted to highlight this at the beginning and provide a more complete answer. Because of the nature of mashing SharePoint lists in a different environment such as Presto the security context in SharePoint no longer applies.
Therefore we have security built around the SharePoint lists registered in mashup server which then carry over to mashups created using the SharePoint lists. In doing such the creator of the mashup can setup custom authorization to that SharePoint list. I didn't want the audience to think that we were compromising security in order to simplify access to external SharePoint data. I hope this is clear.
In brief there are three challenges organizations will have to face related to integration when deploying SharePoint as part of their information infrastructure. We have titled them as the "Inside-Inside", "Outside-Inside" and "Inside-Outside" problems.
"Inside-Inside" Problem
With the exponential growth of data within a SharePoint deployment comes the question of how to manage the data as well as consolidating the data in a rapid, yet concise fashion. One example that an individual asked me about last night was being able to bring a contact list from one SharePoint site over to another SharePoint site and allowing users to update the data in the new location. This is a classic example of the types of issues many organizations are facing today. At JackBe we like to use the phrase "Rapid Intelligence"; being able to harvest data, quickly, within SharePoint in order to help the end user make fast, intelligent decisions. Out of the box it is very difficult and tedious to manage SharePoint data stored in lists across multiple site collections. At JackBe we have developed a product that can quickly and easily "mash" SharePoint lists in a manner that can help minimize the SharePoint crawl problem.
"Outside-In" Problem
Within organizations is the challenge of collecting data external to SharePoint and brining it into SharePoint with as little development cost as possible. SharePoint 2007 and 2010 answers this type of problem using the "Composites" piece of the SharePoint pie. More specifically the Business Data Catalog (BDC) in Moss 2007 and Business Connectivity Services (BCS) in SharePoint Foundation 4.0 and SharePoint Server 2010. In my demonstration list night I showed the audience how it is possible to gather data external to SharePoint such as a MS SQL table or a WCF web service and display that data within a SharePoint list using External Content Types; and do this without any code, all within SharePoint designer. I also pointed out that while the SharePoint Designer is capable of such tasks it is still quite limited in the types of LOB systems it can connect to. We are currently working on expanding the ability for the end user to be able to connect to most of the popular data sources and bring them into SharePoint as External Content Types without any custom development involved.
"Inside-Out" Problem
Once data begins to grow within SharePoint, organizations are also looking for ways to pull this data into other external portals or data centers. Currently the only way to accomplish such a task is to custom develop a SOAP client that is able to connect to SharePoint's web services and pull the list data out. At JackBe we have already included this capability within Presto by allowing users to register SharePoint lists and then Mash them together and publish them as Apps to just about any type of portal using simple scripting or even to other SharePoint farms.
In brief there are three challenges organizations will have to face related to integration when deploying SharePoint as part of their information infrastructure. We have titled them as the "Inside-Inside", "Outside-Inside" and "Inside-Outside" problems.
"Inside-Inside" Problem
With the exponential growth of data within a SharePoint deployment comes the question of how to manage the data as well as consolidating the data in a rapid, yet concise fashion. One example that an individual asked me about last night was being able to bring a contact list from one SharePoint site over to another SharePoint site and allowing users to update the data in the new location. This is a classic example of the types of issues many organizations are facing today. At JackBe we like to use the phrase "Rapid Intelligence"; being able to harvest data, quickly, within SharePoint in order to help the end user make fast, intelligent decisions. Out of the box it is very difficult and tedious to manage SharePoint data stored in lists across multiple site collections. At JackBe we have developed a product that can quickly and easily "mash" SharePoint lists in a manner that can help minimize the SharePoint crawl problem.
"Outside-In" Problem
Within organizations is the challenge of collecting data external to SharePoint and brining it into SharePoint with as little development cost as possible. SharePoint 2007 and 2010 answers this type of problem using the "Composites" piece of the SharePoint pie. More specifically the Business Data Catalog (BDC) in Moss 2007 and Business Connectivity Services (BCS) in SharePoint Foundation 4.0 and SharePoint Server 2010. In my demonstration list night I showed the audience how it is possible to gather data external to SharePoint such as a MS SQL table or a WCF web service and display that data within a SharePoint list using External Content Types; and do this without any code, all within SharePoint designer. I also pointed out that while the SharePoint Designer is capable of such tasks it is still quite limited in the types of LOB systems it can connect to. We are currently working on expanding the ability for the end user to be able to connect to most of the popular data sources and bring them into SharePoint as External Content Types without any custom development involved.
"Inside-Out" Problem
Once data begins to grow within SharePoint, organizations are also looking for ways to pull this data into other external portals or data centers. Currently the only way to accomplish such a task is to custom develop a SOAP client that is able to connect to SharePoint's web services and pull the list data out. At JackBe we have already included this capability within Presto by allowing users to register SharePoint lists and then Mash them together and publish them as Apps to just about any type of portal using simple scripting or even to other SharePoint farms.
Labels:
Houston SharePoint User Group
,
JackBe
,
Presto
,
SharePoint Designer
Friday, August 27, 2010
MSTest "System.ArgumentException: [class.method] The member specified could not be found"
Came across this error writing unit tests using MSTest in Visual Studio 2008. The source of the problem was I had two versions of the same dll in the GAC. Removing the older version fixed the problem. The reason why I was only seeing this error during runtime and not during compilation is the test project referenced the assembly it was testing in the bin directory of the project which is why the build succeeded. However, during runtime the tests referenced the assembly in the GAC before the assembly in the bin of the project which is expected.
Monday, June 14, 2010
Access Denied using SetPersonalizationDirty
Just recently I ran across a test case I was testing on a web part in SharePoint. I was opening the page with a user that had read only access to the page and I was getting an "Access Denied" message. After several hours of hunting I discovered that it was related to calling SetPersonalizationDirty() for the current web part. Obviously a user with read only access shouldn't be allowed to update the web parts properties. So here's what I used to resolve the issue:
if(SPContext.Current.Web.DoesUserHavePermissions(SPBasePermissions.UpdatePersonalWebParts))
{
this.SetPersonalizationDirty();
}
if(SPContext.Current.Web.DoesUserHavePermissions(SPBasePermissions.UpdatePersonalWebParts))
{
this.SetPersonalizationDirty();
}
Tuesday, January 19, 2010
How to Resize a Fixed VHD
I just set up a bootable virtual machine in Windows 7 running Windows Server 2008 R2. I realized after creating the VM that I didn't need as much capacity as I allocated for the VHD file. After several hours of failed attempts I finally came up with a solution and wanted to share.
1) I first attached the VHD using Disk Management in Windows 7.
2) Using DiskPart I shrank the VHD volume down to a manageable size running the following commands. Note I had 100 GB of free space.
-diskpart
-select disk 1 (varies depending on the number assigned to the attached VHD)
-select volume 0 (also varies depending on the number assigned to the VHD volume in the disk)
-shrink ( If you would not like to shrink the volume to the absolute minimum capacity I would recommend using the [desired=] [minimum=] parameters. I repeated this command until I shrank the volume to the desired size. You can use detail disk command to check the actual amount of space needed for the disk).
3) After shrinking the VHD volume down you'll notice in Disk Management that there is a certain amount of unallocated space in the VHD. To remove that unallocated space use VHDResizer to actually resize the VHD to the size of the volume you just shrank.
Subscribe to:
Posts
(
Atom
)

