SharePointAds TextOnly

Thursday, 11 February 2010

Silverlight: How to use Timer Control?

MainPage.xmal:



In between control add following code,

<Grid x:Name="LayoutRoot">

<TextBlock Loaded="StartTimer" x:Name="myTextBlock" />

Grid>

Right click on "StartTimer" and select 'Navigate to Event Handler', it will create new event handler method in .cs file. Add following code in xmal.cs file:



MainPage.xmal.cs:

private void StartTimer(object sender, RoutedEventArgs e)

{

System.Windows.Threading.DispatcherTimer newDispatcherTimer = new System.Windows.Threading.DispatcherTimer();

newDispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 1000); // for 1 seconds

newDispatcherTimer.Tick += new EventHandler(Every_Seconds);

newDispatcherTimer.Start();

}

int iCounter = 0;

// Retrive after every 1000 millseconds(1seconds) while the DispatcherTimer is active.

public void Every_Seconds(object o, EventArgs sender)

{

myTextBlock.Text = "Second Counter : " + (iCounter++).ToString();

}



Hope this will clear timer concepts in Silverlight!!!







Tuesday, 2 February 2010

Sharepoint: Required Modifications for Podcasting

Podcasting in Sharepoint

From last 15 days I am trying to completing podcasting for my one of subsite. The PKS solution which has provided in codeplex solution is very good but still it’s in beta version(August 2009 Beta version) so it gives lots of problem specially URL referencing problems.

First time, as for practice demo I just installed on demo root site as suggested in documentation(Installation and Configuration Guide for PKS.docx), its working like charm for root site. After that I was trying to do same things for sub sites of different root site so that I followed Installation and Configuration Guide for PKS on Sub Site.docx file as for reference. But its gives lots of pain & problems to work.

The main problems I faced for PKS which are not specified anywhere.

  1. Problems to start media encoder service for other port sites.
  2. Changes in leftNav.xml file in PKS for subsite of subsite (In next post I will cover this!)

The main problem was of Media encoder service because in its config file we need to mention only one site at a time, so first time suppose to I installed PKS on http://sitename:101 port and suppose I want to install on different port site so I created new different site with name as http://sitename:102 so need to mention new site name in pks config file(FYI: you can find PKS config file at C:\Program Files\PKS\Media Encoder Service\ MediaEncoderService.exe.config ). So just simply follow the following steps to assign new PKS site name.

1. Uninstall the Media Encoder Service

2. Install new Media Encoder Service as per your Expression Encoder version(2 or 3) (Note: its Prerequisites to install Expression Encoder before PKS installation)

3. Follow all step as provided in documentation

4. Update MediaEncoderService.exe.config file and provide new site name.

5. Go to list PKS Media Encoder Monitor Locations and delete the entries in it

6. Go to PKS Configuration Settings list on the site:

a. Set the MediaEncoder.MonitorPath to you r location of External File Store

i. Example: C:\UploadFiles

b. Set the MediaEncoder.MonitorWeb to root of your PKS site collection

i. Example: http:// sitename:102

7. Go to the PKS Media Encoder Monitor Locations list on the site:

a. Click -> New Item

i. Update Title - Provide a unique title e.g. My Media Monitor List

Update WebID - you can get this from the Content Rating Configuration Settings , open the SharePoint site collection you have created. Go to Site ActionsàView All Site Contents. Open Content Rating Configuration Settings list under Lists section. There check for entry having value “//AllItems.aspx”. Do not copy the brackets, only the GUId Example: 7197e193-bd16-4369-b069-300642fece87

ii. And other information as suggested in documentation.

8. Start Media Encoder service from Run > services.msc

9. And reset IIS, IISReset

Friday, 25 December 2009

Sharepoint: How to manage Feature activation dependency?

In Sharepoint need to manage the dependencies in different features

For exp: Need to activate Feature A before activation of Feature B, So add below lines in Feature.xml file in Feature B before < / Feature > tag

< ActivationDependencies >

< ! -- Feature A’s ID - - >

< ActivationDependency FeatureId="D4000102-848E-4434-A1C5-C60C862F429C" / >

< / ActivationDependencies >

Refere feature A’s ID.

(*Please remove spaces in tags..)

Thursday, 5 November 2009

Sharepoint: How to create new custom permission level?

We can create custom permission levels and assign to site users.

How to create new custom permission level?
1. Goto Site Setting

2. Select Advance Permission
3. Goto Setting and click on Permission level
4. It will open new page, then click on Add a Permission level
5. Give Name, description for this new permission level select permissions from list as per your need.
6. Click on Create, It will display on permission level page.

How to assign this new permission to users?
1. Goto Site Setting
2. Select People and groups
3. Click on New Menu and select Add user
4. enter user name on people picker box, and select "
" radio button
5. Find
newly created permission level click on check box to assign user under this permission
6. Click on OK