There are a number of options that you can use when you define your connection settings in your BDC ADF file: The authentication methods are: RevertToSelf Simply uses the application pool account (reverts back to this account) to access the database. 1: <Properties> 2: <Property Name="AuthenticationMode" Type="System.String">RevertToSelf</Property> 3: <Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property> 4: <Property Name="RdbConnection Data Source" Type="System.String">servername</Property> 5: <Property Name="RdbConnection Initial Catalog" Type="System.String">databasename</Property> 6: <Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property> 7: <Property Name="RdbConnection Pooling" Type="System.String">false</Property> 8: </Properties>
PassThrough
Passes the credentials of the calling user, this will only work on a single server install or on a farm if Kerberos is enabled.
1: <Properties> 2: <Property Name="AuthenticationMode" Type="System.String">PassThrough</Property> 3: <Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property> 4: <Property Name="RdbConnection Data Source" Type="System.String">servername</Property> 5: <Property Name="RdbConnection Initial Catalog" Type="System.String">databasename</Property> 6: <Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property> 7: <Property Name="RdbConnection Pooling" Type="System.String">false</Property> 8: </Properties>
SQL Authentication
It is still possible to use SQL Server Authentication, the following example uses the RdbConnection properties for this:
1: <Properties> 2: <Property Name="AuthenticationMode" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAuthenticationMode"> 3: RevertToSelf</Property> 4: <Property Name="DatabaseAccessProvider" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAccessProvider"> 5: SqlServer</Property> 6: <Property Name="RdbConnection Data Source" Type="System.String">servername</Property> 7: <Property Name="RdbConnection Initial Catalog" Type="System.String">databasename</Property> 8: <Property Name="RdbConnection Integrated Security" Type="System.String">false</Property> 9: <Property Name="RdbConnection User ID" Type="System.String">username</Property> 10: <Property Name="RdbConnection Password" Type="System.String">password</Property> 11: </Properties> 12:
Single Sign On
If your using SSO, this is also supported:
1: <Properties> 2: <Property Name="AuthenticationMode" Type="System.String">RdbCredentials</Property> 3: <Property Name="DatabaseAccessProvider" Type="System.String">SqlServer</Property> 4: <Property Name="RdbConnection Data Source" Type="System.String">servername</Property> 5: <Property Name="RdbConnection Initial Catalog" Type="System.String">databasename</Property> 6: <Property Name="RdbConnection Integrated Security" Type="System.String">false</Property> 7: <Property Name="RdbConnection Pooling" Type="System.String">true</Property> 8: <Property Name="SsoApplicationId" Type="System.String">SSO Application you created</Property> 9: <Property Name="SsoProviderImplementation" Type="System.String">Microsoft.SharePoint.Portal.SingleSignon.SpsSsoProvider, Microsoft.SharePoint.Portal.SingleSignon, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Property> 10: </Properties>
The MSDN documentation can be found here.
Last night I sat down to watch some more PDC sessions, this time it was Anders Hejlsberg presenting The Future of C#. Anders did a great job presenting, the highlights for me were: - The general roadmap to v4 – Anders set the expectations around the v4.0 language (also see Eric Lippert’s blog)
- dynamic keyword – Makes COM interop easier, Nikhil has a nice post on what this will mean for JSON.
- optional and named parameters – Again designed to make COM interop easier, no more missing parameters.
- compiler as a service – This was by far and away the most interesting part, he showed off the dynamic compilation features of the complier in 4.0v next, coupled with a great demo showing a REPL (Read-Eval-Print Loop) program that accepts c# code.
I also watched the keynote presentation from Don Box and Chris Anderson where they showed off some of the Azure platform. As with all Don and Chris demo’s it was really entertaining. The key takeaway was that the Azure platform is based around web standards and that all the tools we currently have will work with Azure. Of course that’s not to say that we don’t need some abstraction from some new libraries (isn’t every problem in computer science solved by another layer of abstraction).
In both MOSS and Search Server it is possible to configure an xml file that controls expansion and replacement words, so in effect this is a thesaurus file that you can customise with words that may be specific to your organisation. The classic example given is one which expands the technology acronyms (computer types sure do like them!): 1: <XML ID="Microsoft Search Thesaurus"> 2: <thesaurus xmlns="x-schema:tsSchema.xml"> 3: <diacritics_sensitive>0</diacritics_sensitive> 4: <expansion> 5: <sub>Internet Explorer</sub> 6: <sub>IE</sub> 7: <sub>IE5</sub> 8: </expansion> 9: <replacement> 10: <pat>NT5</pat> 11: <pat>W2K</pat> 12: <sub>Windows 2000</sub> 13: </replacement> 14: </thesaurus>
To find the location of this file you first need to look in the registry under: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Global\Gathering Manager] Key: DefaultApplicationsPath
Once you have found the file you can simply add expansion and replacement elements with the children nodes as needed.
Don’t forget to do this to all the servers in your farm. Also you will need to restart the search service for these changes to take effect.
The following table (from the enterprise search blog) lists the elements and what they do:
| Term |
Meaning |
| thesaurus |
marks beginning (and end) of thesaurus |
| diacritics_sensitive |
Diacritics are marks, such as accents that are added to letters that change their pronunciation. For example, the acute accent over and e gives you: é. 0 – ignore diacritics 1 – respect diacritics |
| expansion |
A list of alternative forms each marked by <sub> by the sub keyword |
| sub |
One of several alternatives in an expansion |
| replacement |
Several patterns will be replaced with a substitution |
| pat |
A pattern to be replaced |
| sub |
Item to be substituted |
I’ve only scratched the surface here, for a full overview of this topic, check out the enterprise search blog
Don’t forget that SQL Server full text search (FTS) has the same capabilities in terms of a thesaurus file that supports expansion and replacement words. If your looking for information on SQL Server 2005 or 2008 you should refer to this post.
The other feature that both products support is the notion of noise words, these are words that when used add no value to the search like ‘been’, ‘before’, ‘being’, ‘both’ etc. This KB describes the process to add or remove words from this list, but simply it is modifying the contents of a file which lives in: Data\Ftdata\SharePointPortalServer\Config, it’s a simple format where each word is on it’s own line (no xml).
Have fun customising the search experience.
From an MSDN article, I’ve found this concise procedure to setup an indexing server: Enable or disable the index server role or query server role -
In Central Administration, on the Operations tab, in the Topology and Services section, click Services on server. -
On the Services on Server page: -
If the server name that appears is not the server that you want to configure, click the arrow next to the server name, click Change Server, and then click the server for which you want to enable or disable the index server role or query server role. -
In the Start services in the table below section, in the Status column for Office SharePoint Server Search, if the status is Stopped, in the Action column click Start. -
Click Office SharePoint Server Search. -
On the Configure Office SharePoint Server Search Service Settings page, in the Query and Indexing section, enable server roles for the server as appropriate for your configuration: -
To enable the index server role on the computer, select Use this server for indexing content. -
To enable the query server role on the computer, select Use this server for serving search queries. -
To save changes and return to the Services on Server page, click OK.
Just a heads up that I’m presenting a topic at the Brisbane SharePoint Users Group (Day Session) on Wednesday November 12th. at Microsoft Brisbane (Level 9 waterfront place). My topic is: Profile Import process with the BDC How to configure the BDC to combine external data from a SQL Server database with the imported Active Directory accounts. This will include setting up the user's profile page to include this custom data and adding custom metadata property mappings to expose these properties via the people search.
Well the biggest week in the calendar of the Microsoft Developer is over, so much stuff to now digest. I had to laugh last night, I’d just spent a couple of hours watching some of the sessions online and then I got an email from Apple telling me that I could purchase some sessions from WWDC08. The online coverage is fantastic it’s almost better than being there, almost. Ignoring the cloud computing announcements which won’t really impact us for the next 12 months or so (PDC09 has already been announced) and the windows 7 client stuff (again, we’ll wait for a public beta) the really cool stuff is the developer related material. I watched Jeff King’s session on Visual Studio 2010 web developer features last night, the key highlights: - HTML SnipIts – The ability to have the snipit functionality inside the HTML editor, MS have focused on the HTML authoring experience and adding this functionality certainly aides in this. My brief description doesn’t do this feature justice, take a look at Jeff’s demo.
- Triple click to delete content – just fits with the better authoring experience mentioned above.
- Javascript Intellisense – Better intellisense performance, the whole engine is more resilient
- Deployment – Jeff introduced the MSDeploy tool, it has the ability to change config files (and do other tasks) specific to the environment that you are targeting, this whole process looks interesting, although I’m sure the VSTS guys have some ideas that will probably apply to me more so.
I also watched the Olso demo with Don Box (he’s always a must watch, even if he was doing a cooking show, you’d still have to watch) - The M language looks interesting, Don points out that Oslo is three components, the language, a tool and a repository. Don also mentions that developers have an unhealthy love for text editors and they changed the product from a Visio type tool to a text based one, I agree that he made the right choice.
I had to watch Scott Hanselman’s presentation on Baby Smash, one of those compulsory viewing things: - Charts – Native chart support coming in .NET version 4
- Touch (aka surface), Silverlight and WPF are starting to really converge, your skillset is easily transfered across all of these technologies.
- The Managed Extensibility Framework (MEF) is something to keep an eye on, visual studio 2010 is going to be making use of it. It’s a framework for adding extensibility to your applications.
- The whole .NET is crazy cool, it’s all there and is super easy to use.
Web Futures wasn’t as interesting, mostly cause I have my head in this space anyway, the things that did interest me were: - The ability to have custom ID’s in webforms (might make webforms a little less icky)
- Fixing up of viewstate, so you can turn it off at a page level, but turn on specific controls (plus they are fixing up some controls that don’t work properly with viewstate off)
- Cache provider model, will be able to plugin tools like Velocity.
Entity Framework, I watched Tim Mallalieu talk on this. If you’ve been following the Entity Framework you might have seen the vote of no confidence that was put out by the Alt.NET community. Anyway it was good to see the team take this feedback onboard. - POCO (Plain Old CLR Objects) can now be wired up to entities, you need to watch the demo to get the point of this.
- An interesting point that Tim made was that the next version of SQL Server was going to make use of the Entity Framework for Reporting Services, this is really cool.
So much cool stuff going on. There is so much content to watch, I was watching this in comfort on my lounge via my Media Center PC, the SilverLight experience is awesome, better than any Saturday night movie.
With little effort you can make your site a little more search friendly, it’s possible to embed some xml into your site which your browser can use in its search box. Most modern browsers support OpenSearch, which is what this xml fragment is using. The first step is to create the following xml, but replace the bits that are specific to your site: 1: <?xml version="1.0" encoding="UTF-8"?> 2: <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> 3: <ShortName>SharePoint Search</ShortName> 4: <Description>Search for SharePoint</Description> 5: <Url type="text/html" method="get" template="http://YourSite/SearchCenter/results.aspx?k={searchTerms}"/> 6: <Image width="16" height="16">http://YourSite/favicon.png</Image> 7: <InputEncoding>UTF-8</InputEncoding> 8: <SearchForm>http://YourSite/SearchCenter/</SearchForm> 9: </OpenSearchDescription>
In the master page, you will need to refer to this xml file:
1: <link rel="search" type="application/opensearchdescription+xml" href="/Style%20Library/OpenSearch.xml" title="SharePoint Search">
Finally you can drop down the search provider box in your browser to select your new search provider, there is no need to browse to the search centre again.
Little things like this can help entrench searching as the primary navigation method in an organisation.
So last week I rebuild my work laptop, previously it was running Windows XP with 2GB of RAM. These days I’m almost always running a virtual machine running some form of SharePoint and I would constantly get frustrated with the performance of my laptop. I did some pricing and found that 4GB of laptop RAM was around $110, I was shocked, so I headed down to the shop to pick it up. I knew that if I continued using a 32 bit OS that I wouldn’t be able to take full advantage of all the RAM. So my next step was to upgrade to 64 bit Vista, I grabbed my MSDN disk with Vista x64 SP1 and installed, I wasn’t to sure how it would go installing all of the 64 bit drivers for my Dell Latitude D630, but it turns out that Dell has great support for 64 bit, I downloaded them all and had a fully functional system in no time. As anyone who knows me will tell you that I’m a huge Vista fan, I really missed having all the cool Vista features on my work laptop, it really does feel to me that I’m more productive on a Vista machine. So now a week later I wish I had upgraded sooner, I can now run two virtual machines both with 1GB of RAM allocated to them, but best of all I can swap between applications very smoothly. Just for giggles this is what I see now: 
The BDC isn’t just limited to data located in a database, it’s most powerful feature is its ability to call webservices. I previously posted a brief description of the types of webservices are easily consumed by the BDC. The key to easily calling webservices from the BDC first starts with an understanding of the types of methods that the BDC supports: - Finder
- Specific Finder
- IDEnumerator
If we take the common example of getting customers from a webservice we might can start thinking about the way we create the webservice so that it doesn’t become a painful exercise. The first method we should think about is something that can return the primary key (or ID) of our data: So a method like: GetCustomerIDs - This will return customer ID’s and will become our IDEnumerator So the BDC will next need a method that will accept an ID that was returned by our GetCustomerIDs method above. GetCustomerByID - This will become a Specific finder method, the naming ‘specific’ really gives the game away, it’s specifically returning data based on an ID. The final method is a generic finder method that can be used by the Business Data List webpart: GetCustomers – This becomes a finder method, we can have more of these methods with each one returning a different subset of data as needed. It’s fairly easy to now create a BDC Application Definition File (ADF) using a tool like BDC Meta-Man. But you also need to remember that the ADF references a .NET assembly. This assembly is the proxy to the webservice, this proxy is the exact same proxy that we get automatically generated for us by Visual Studio when we add a web reference. So you can create a proxy that will be used by the BDC, you just create a web reference in visual studio and compile that into a signed assembly and make sure the ADF references this assembly correctly. Once you perform the two steps of creating the ADF and corresponding proxy classes, your well on your way to using the BDC via webservices.
You may have noticed in your coding adventures that some column names have had the spaces replaced with _x0020_. To understand why this is happening a little background is needed, a site column has two types of ID’s, the first is a unique name and the second is a unique ID. The ID is a GUID, however the unique name has two parts, the internal name and the display name, it is the internal name that has it’s space characters replaced with the hex value of the HTML space character: %20. Now that you know why this happens, the way to prevent the _x0020_ characters using the web UI is to firstly create the column without any spaces (this will create the ID and the unique name), then after it has been created, you can go back and rename it (this will just updated the display name).
I read with interest Arpan’s article on Finding and Growing Great SharePoint Talent which covers the topic’s of developing and keeping great SharePoint talent in a broader context. I’m mostly concerned with the developer role, so I’ll focus on that. The Interview The thing to extract here is their level of exposure to ASP.NET, depending on what role you want them to take in your SharePoint development you would at least want them to have a good grasp of ASP.NET. You really don’t want to spend time training them up on concepts that are generally related to ASP.NET development. The next thing you should look for is their attitude towards SharePoint administration, the key to becoming an awesome SharePoint developer is knowing the product, if you want a developer to just develop some web parts then having a deep understanding of the product might not be needed, but if your looking for someone to tackle a wide range of SharePoint development tasks they need a broad understanding. I mean how can you develop a personalised web part if they can’t setup a development environment properly? or how can they build a feature or solution if they have no idea how they are used. Some developers will cringe at the thought of admin / setup work, but the fact is, it’s the best way to become familiar with the product. On the Job - Day One So you’ve picked someone who is going to become your superstar SharePoint developer, where do you start now? Do you leave them alone with a stack of books and training material? or do you throw some code at them and say start typing? There is no correct answer, each developer learns in a different way, you just have to work out what that way is. It’s probably not a huge stretch to start with the familiar topics like web parts but only after the developer has in fact used the SharePoint UI. As time passes Once the developer has done some admin and bits of development, they will start to speak and understand the SharePoint vocabulary, don’t expect them to instantly know the answer to all your development questions, even the seasoned developers need time to investigate the solutions, SharePoint is such a large product it’s not an easy task to know everything, but once you digest the core concepts a lot of stuff can be inferred and it gets easier to grasp new SharePoint related ideas. You’ll probably find that your administrators look to your developers at the first sign of trouble, which is another reason why your developers should experience the SharePoint world from an administrative perspective. So in summary, I think ASP.NET skills provide the best leg up to SharePoint development combine that with someone prepared to sit and learn some administrative / setup tasks and you have the makings of a great SharePoint developer.
|