Saturday, December 17, 2011

Blank page instead of Central Admin after installing SharePoint 2010 in Windows 7


Issue:You will get a blank page instead of Central admin page when you are trying to access the central admin page after installed and configured the SharePoint 2010 software in windows 7 machine.


Reason:
By default, some of the authentication providers may not be installed in Windows 7 machine (inside IIS). You can check the list of authentication providers by double click on the central administration site in IIS. See the sample screenshot below.


If you double click in the "Authentication" link as I specified in the above image, you cannot see the below authentication mechanisms:
1. Windows Authentication
2. Basic Authentication
3. Digest Authentication

If they are existing, they may not be enabled.

Solution:
To add these authentication mechanisms in IIS, open the Command Prompt and type the below command. Then, wait for 2 minutes.

Command

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;WCF-NonHTTP-Activation

Please make sure that the Windows Authentication should be enabled to access the SharePoint 2010 central administration page.

So, now you can browse the central admin page instead of blank page.

I get a Great help via following link / Ref Link:
(Blog is not created by me, its owner is )
Thanks brother for such a great help

Tuesday, December 13, 2011

Configure Developer Dashboard in Sharepoint 2010

How to enable/disable it on the specific site?
Method 1: [STSADM]
'On' Mode :
STSADM –o setproperty –pn developer-dashboard –pv On

'Off' Mode:
STSADM –o setproperty –pn developer-dashboard –pv Off

'OnDemand' Mode:
STSADM –o setproperty –pn developer-dashboard –pv OnDemand

Suppose you'd like to only display the developer dashboard if one or more acceptable values are exceeded, there's a way to do that too by running:
STSADM –o setproperty –pn developer-dashboard –pv expensiveoperationsonly

Once you executed the command the output is "Operation executed successfully."

Method 2: Windows Powershell script:
You need to open the windows power shell prompt and copy the below script and hit enter.
$DevDashboardSettings = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$DevDashboardSettings.DisplayLevel = 'OnDemand';
$DevDashboardSettings.RequiredPermissions = 'EmptyMask';
$DevDashboardSettings.TraceEnabled = $true;
$DevDashboardsettings.Update();

ref:

Understanding the SharePoint calendar

One of the challenges of accessing SharePoint calendars via the object model is that there are so many different types of events – normal events, all-day events, recurring events, recurrence exceptions, and deleted instances

Distinguishing between calendar item types

Calendar items in SharePoint fall into several categories. Single events are those which don’t repeat and only appear once on the calendar, while recurring events may show up any number of times depending on the recurrence pattern selected by a user. Either type of event may have a defined start and end time, or it may be an all-day event which lasts from midnight to 11:59 PM.

Furthermore, individual instances of a recurring event may be deleted or edited, creating a new event which takes its place. The event created by a deleted instance instructs the calendar not to render that day’s instance of the recurring event.

Calendar events can be distinguished by looking at the fRecurrence, fAllDayEvent, and EventType field values:

Type

Description

fRecurrence

fAllDayEvent

EventType

Single event

An event created with the All Day Event and Recurrence checkboxes unselected.

False

False

0

All-day event

An event created with the All Day Event checkbox selected.

False

True

0

Recurring event

An event created with the Recurrence checkbox selected. Has a recurrence icon in the All Events view. Appears as a single master event on the All Events view, but as recurring instances on the Current Events and Calendar views.

True

False

1

Recurring all-day event

Same as above, but with the All Day Event checkbox selected at creation time.

True

True

1

Recurrence exception

Created by editing an instance of a recurring event. Has a strikethrough recurrence icon in the All Events view.

True

False

4

All-day recurrence exception

Same as above, but created by editing an instance of an all-day recurring event.

True

True

4

Deleted instance of a recurring event

Created by deleting a instance of a recurring event. Title is prefixed with “Deleted:” in the All Events view, and is hidden in the Current Events and Calendar views.

True

False

3

Deleted instance of an all-day recurring event

Same as above, but created by deleting an instance of an all-day recurring event.

True

True

3

Understanding recurring events

Recurring events have a number of subtleties not found in single events. Most importantly, one recurring event item expands into any number of recurring event instances when it is rendered in the calendar view. Recurring events also make use of fields left empty in single events.

Certain fields are interpreted differently depending on whether the item in question is a recurring event or a single event:

Field

Value for single event

Value for recurring event

EventDate

Start date and time

Start date and time set for the recurring event when it was created, which may be an earlier date than the first instance of the recurring event.

EndDate

End date and time

End date and time for the last instance of the recurring event. For recurring events with no end date, this is a computed date several years in the future.

Duration

The time in seconds between EventDate and EndDate.

The duration in seconds of an individual instance of the recurring event.

Similarly, exceptions and deleted instances have fields which relate the event back to the parent recurring event:

Field

Value for exception or deleted instance

MasterSeriesItemID

The ID of the recurring event from which this exception or deleted instance was made.

RecurrenceID

The date and time of the instance of the recurring event which this exception or deleted instance takes the place of.

Once you’ve determined that you’re working with a recurring event, you’ll likely want to work with individual instances of the recurrence.

Recurrence patterns and expanding events

Recurring events store the pattern used to display instances of the recurring event as XML in the RecurrenceData field. While this data is best used in a read-only fashion, the following are examples of the patterns you may encounter:

Recurrence type

RecurrenceData field value

Daily every 1 days, no end date

su

FALSE

Weekly every Monday, Tuesday, and Wednesday, end by 5/31/2007

su

2007-05-31T22:00:00Z

Monthly the third Wednesday of every 2 months, no end date

su

FALSE

Yearly every May 18, end after 10 instances

su

10

Thankfully, you don’t need to parse this XML yourself to get the actual instances of the recurring event. Instead, you can use the SharePoint object model to expand recurring events during a given month:

// Get the Events list

SPSite site = new SPSite("http://localhost");

SPWeb web = site.RootWeb;

SPList calendarList = web.Lists["Calendar"];

// Construct a query that expands recurring events

SPQuery query = new SPQuery();

query.ExpandRecurrence = true;

query.Query = "";

// Look forward from the beginning of the current month

query.CalendarDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);

// Returns all items (including recurrence instances) that

// would appear in the calendar view for the current month

SPListItemCollection calendarItems = calendarList.GetItems(query);

foreach (SPListItem item in calendarItems)

{

Console.WriteLine(item["Title"] + ": starts "

+ item["EventDate"].ToString() + " and ends "

+ item["EndDate"].ToString());

}

Note that after expansion, each instance of a recurring event has the same ID as the recurring event that produced it. In other words, a recurring event with ID 7 will appear as many recurring event instances in the code above, each with an ID of 7.



Ref:

http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?PageType=4&ListId={72C1C85B-1D2D-4A4A-90DE-CA74A7808184}&pID=761

Thursday, December 8, 2011

convert a string into an enum

object Enum.Parse(System.Type enumType, string value, bool ignoreCase)

enum Colour   
{
Red,
Green,
Blue
}     
// ...   
Colour c = (Colour) Enum.Parse(typeof(Colour), "Red", true);   
Console.WriteLine("Colour Value: {0}", c.ToString());    
// Picking an invalid colour throws an ArgumentException. To   
// avoid this, call Enum.IsDefined() first, as follows:   
string nonColour = "Polkadot";    
if (Enum.IsDefined(typeof(Colour), nonColour))      
c = (Colour) Enum.Parse(typeof(Colour), nonColour, true);   
else      
MessageBox.Show("Uh oh!");


ref: http://blogs.msdn.com/b/tims/archive/2004/04/02/106310.aspx

Wednesday, November 30, 2011

Linq to Sharepoint

// Get DataContext from page context DataContext data = new DataContext(SPContext.Current.Web.Url);  // Get the SharePoint list EntityList Customers = data.GetList("Customers");  // Query for customers from London var londonCustomers = from customer in Customers                       where customer.City == "London"                       select customer;  foreach (var londonCust in londonCustomers) {     Console.Writeline("id = {0}, City = {1}",                        londonCust.CustomerId,                        londonCust.City); }
ref MSDN
http://msdn.microsoft.com/en-us/library/ee535491.aspx

Wednesday, July 27, 2011

Lg optimus black Recovery

You can go Back to Original Recovery by using the LG Mobile Updater

1. Download LG Mobile Updater (http://www.lg.com/de/support/mc-supp...p?countryCd=de)
2. Install Mobile Updater
3. Remove Battery from the phone and plug it to the Computer while Holding Vol-Up Button. Display should now show S/W Upgrade
4. Start the Mobile Updater, if needed install USB-Drivers
5. In the Menu of the Mobile Updater choose Customer Service -> Emergency Repair
6. Enter the IMEI of your Phone when the Updater asks for it and click Check
7. The Phone gets now reflashed. All Partitions except the Data Partition will be reflashed.

Saturday, June 11, 2011

Multi level xml generation using XMLSerialization in C#.Net


//In memory XML generation using Serialization//
XmlSerializer srl = new XmlSerializer(typeof(UserLogin));
StringWriter sw = new StringWriter();
srl.Serialize(sw, oUserLogin);
string xml = sw.GetStringBuilder().ToString();


[Serializable]
[XmlRoot("Users")]
public class UserDetails
{
//First way to create inner XML nodes
[XmlArray("AddressDetails")]
public List AddressDetail { get; set; }

//Second way to create inner XML nodes
[XmlArray("ContactDetails")]
[XmlArrayItem("ContactDetail")]
public List ContactDetail { get; set; }
}


[Serializable]
[XmlType("AddressesDetail")]
public class AddressDetails
{
public string ........ (Properties)
}

[Serializable]
public class ContactDetails
{
public string ........ (Properties)
}

Wednesday, May 18, 2011

msftesql and cisvc services error in MS CRM 4.0

While installing MSCRM 4.0 on Windows Server 2008, having SQL Server 2008 preinstalled, the installation verification fails and displays missing components msftesql and cisvc services.

1) msftesql (the sql server full text indexing service) has a different name against sql server 2008.

Just rename the registry key HKLM\System\CurrentControlSet\Services\MSSQLFDLauncher to msftesql to give an illusion to the MSCRM verification phase that services is present in the system so that it does not fail while installation.
Now restart the system and run the installation of MSCRM again.
After installation rename the HKLM\System\CurrentControlSet\Services\msftesql back to MSSQLFDLauncher.

2) To solve the cisvc services error, right click the MyComputer->Manage, now right click the Roles ->Add Roles and now install the file services role.


Ref:
http://msdynamicscrmblog.blogspot.com/2009/10/missing-msftesql-and-cisvc-services.html