X Blogs

who you gonna call?

Display members of AD group in SharePoint 2010

clock December 10, 2011 02:16 by author Robi

Hi,

Because I got a question so many times if you can show members of AD groups on SharePoin site, I decided to build a web part that would replace the Site Users web part.

 

The usage is pretty simple, what you need to do is deploy a wsp package that you can find inside the bin\release folder.

 

Next step is to add a web part to your site and what you need to do is enter some information to access the Active Directory.

 

You need to enter:

  • user name to connect to AD in the format:
    • domain\username
  • domain information for LDAP query in format of:
    • DC=corp,DC=xnet,DC=si
  • you need to enter FQDN of a domain controller to which the ldap query will be sent:
    • xnet-dc01.corp.xnet.si

Hopefully some one will find this web part usefull.

You can find solution attached in a zip file.

 

For comments and suggestions please contact me at:

robi@kompas-xnet.si

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 

There were some bug fixes so I published a new version of a Web Part.

 

Skupine Web Part_1.2.zip (219.37 kb)



Crawl BCS Data

clock June 29, 2011 21:26 by author Robi

Hi,

One of our clients wants to crawl data that they store in SQL Database so I created a new External Content Type to test the solution and gave it a name of TestSql.

To crawl BCS content source, you need to give a default content access account or account you want to crawl you content source Execute permissions on External Content Type. Click on the Drop down and select Set Permissions. Add your search account and select Execute Permissions.

 

Next, you need to define new content source in Search Service Application administration. In order to do that, click on Content Sources category and then New Content Source.

Give your Content source a meaningful name, select Line of Business Data and select BCS Service Application where you External Content type is saved. Create Crawl Schedules and perform a full crawl of your Content Source.

 

When full crawl is finished you can search for your line of Business data. Go to your portal site and search for your data. Notice that link to that data is somewhat strange.

 

To correct this "issue" you need to create Profile Pages for BCS Data. Go back to your BCS Service application and on the Ribbon, in the Profile Pages section click Configure. You need to specify SharePoint site to host Profile pages.

 

When Profile page host is created, you can now Create/Upgrade Profile page. Select External Content Type and click Create/Upgrade button.

When operation is finished, perform a full crawl of this Content Source and you should now get results similar to this:

 

When you click on the link you get BCS Data directly from your SQL Server:

 

Hope it helps!

Enjoy!



SLOWUG - marec 2011

clock March 10, 2011 20:33 by author Robi

Pozdravljeni,

objavljam prezentacijo, ki sem jo uporabil na SloWUG srečanju o namestitvi in konfiguraciji SharePoint 2010 Serverja.

SLOWUG-SharePoint 2010 install_Config.pptx (2,30 mb)



SharePoint Print List Item

clock March 1, 2011 00:05 by author Robi

Hi,

 

I received a question how to easily create a print form for a SharePoint list item.

This is the easiest way I can think of.

  1. Open SharePoint Designer and open your list files. Create new aspx page.

2. Edit your newly created aspx page in Advanced mode.

3.Open you aspx page in split mode and click in to the design window. From the ribbon, choose Insert/SharePoint and select Custom List Form.

4.Select the list you want to create new list form for and select Display Form.

5. Insert HTML button and insert on click event handler to "window.print()"

6. Go to Allitems.aspx and open it in Advanced mode. Add column to the right and just type "Print Preview".

7. Add hyperlink to your text.

8.Browse to your custom list form and add "?ID={@ID}.

9. Try it out...

 

Hope it helps!!



Cascading Dropdowns in InfoPath 2010

clock December 8, 2010 20:28 by author Robi

During one of my classes I got a question hot to make cascading dropdowns in InfoPath 2010 for SharePoint 2010, so here is a Visual How to:

First, you have to make lists that will hold lookup data. I made a list called KategorjaNapake which is a category list and I made TipNapake list which is a Subcategory list. I made a reference to a category list with a lookup column.

 

SubCategory list with a reference to Category list, made with a lookup column.

Columns in subcategory list:

Create columns in main list for data. First I made a column for entering text data and the second column I made was a lookup column to a category list.

 

Here are the columns I made for a main list...

Next, we will customize a SharePoint list form with InfoPath 2010...

Insert a new line in InfoPath Form

Insert a new dropdown field...

Here, just click OK, we have to go into dropdown field properties to get more choices.

If you want to display column name in SharePoint as TipNapake you have to change it here, so change field1 to name that you want to use.

To create new data source for this field, go to properties

Choose get choices from external data source and click Add.

Pick SharePoint library or list...

Pick List that you want to connect to...

Choose fields that you want to have in your data source. It is very important here to also pick the category field.

To create a cascading dropdowns, prepare yourself for a click fest. So click on the button next to Entries.

Click Filter data

Test the form in InfoPath...

Click the Quick Publish Button...

Test your form in SharePoint List....

 

voilà



Battle with User Profile Service

clock September 3, 2010 23:32 by author Robi

I was configuring User Profile Service at one of our clients, and the problem was that after provisioning User Profile Service I was getting 6801 and 6803  errors in event log.

 

Central Administration site was using SSL, for example https://sharePointServer

Following examples at http://www.mylifeinaminute.com/2010/07/07/sharepoint-2010-user-profile-synchronization-errors/ I tried to fix things, but it didn't work for me...

So, after using ULS Viewer and miisclient (C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe) I found out that User profile service can not connect to the approprite Web Service.

What I did was, I opened up a miisClient, opened Management Agents, right clicked on MOSS{guid} Extensible connectivity, clicked on Properties and Configure Connection Information. After trying to configure the right connection, I found out that even though Central Administration site is on URL https://sharepointserver, the user profile connection instead of connecting to direct://sharepointserver/_vti_bin/ProfileImportExportService.asmx?ApplicationID=27c26eca%2D6eeb%2D4da4%2D9012%2Da51e02baae9a, I entered:https://SharePointServer.xnet.si/_vti_bin/ProfileImportExportService.asmx?ApplicationID=27c26eca%2D6eeb%2D4da4%2D9012%2Da51e02baae9a and everything started to work normaly.

 

I hope that helps

 



SharePoint 2010 Servicve Accounts and Windows Server 2008 R2

clock July 23, 2010 18:16 by author Robi

Yesterday, I was was installing SharePoint Server 2010 at one of our clients and after the install I was getting this errors:

User Profile Service Event ID 1511. It says that account could not log on to the computer and create a profile.

After a little bit of research, I found out that all you have to do is edit a local group policy and than run a cmd and all of these errors are gone.

So run a "gpedit.msc" on your WFE where you are getting these errors and go to Computer Configuration/Windows Settings/Security Settings/Local Policies/User Rights Assigneements and Search for Allow log on Locally

Add the account for which you are getting errors. Then, start command prompt and run a command:

 runas /user:kompas-xnet\sp_apppool cmd

 Type the password and if you go to your users folder you should see a folder with your service account name.

You can now remove Allow log on locally permission for the account. 

Voila.

 



Stop or start all SharePoint 2010 Services

clock July 3, 2010 00:37 by author Robi

During a maintainance of my computer I needed to stop all SharePoint 2010 services. So I was wondering what is the easiest way to do it. In Central Admin, you could do it an click on every service and stop it, but it takes a lot of time. So I was considering some other options and certainly decided that you could do it with a PowerShell script. So here it is:

STOP

$services=Get-SPServiceInstance
foreach ($service in $services) {stop-SPServiceInstance -Identity $service -confirm:$false}

START

$services=Get-SPServiceInstance
foreach ($service in $services) {start-SPServiceInstance -Identity $service}

 



Create Custom Site Definition

clock June 10, 2010 00:02 by author Robi

Hi,

In this post I'm going to explain how to create custom site definition in SharePoint 2010.

First of all, you can copy or create your own custom site definition in this folder and rename it to what ever you like:

 

Next, you have to create a XML file, where you define which template to use, what the title o your definition is going to be and which icon you are going to use. in the next 2 pictures you are going to see the path and the code you have to insert in this XML file.

when you are done, you have to do an IISRESET and then you are good to go with your custom Site Definition.

 

 



My presentation from NTK conference 2010

clock June 4, 2010 17:52 by author tone

Visio2010_NTK2010_Visio.pptx (6,24 mb)



About the author

Rok Bermež is Slovenian Windows Azure MVP, he works as a Software Engineer and Microsoft Certified Trainer at Kompas Xnet. His primary interests include cloud computing and web development. With extensive experience in development and architecture he participated in many projects and since the CTP release of Windows Azure much of those projects are based on Windows Azure platform. Rok has been delivering courses, writing code and speaking at conferences and community events on Microsoft technologies for the last couple of years. You can also find him on Twitter (@Rok_B).

Month List

Sign In