Saturday, January 30, 2010

C:\WINDOWS\system32/rundll32.exe application not found?

Recently my laptop got Virus Attack in XP OS. Here is the culprit name - Antivirus XP 2010. It got downloaded from video site. It acts like antivirus and shows false virus information. Does not allow your computer to open IE or any browser.

Solution - Antivirus XP 2010 removal
Since I had 2 OS, I logged into my Vista and Googled. I found a solution. Simply installed Malwarebytes Anti-Malware and performed a full scan then removed culprit’s information and exe files.

Rundll.exe application not found
After removing the virus, When I rebooted my laptop I found all my shortcuts are missing associations. Again a Google search gave me solution.
Go to the link and download and run the EXE file association fix.

http://www.dougknox.com/xp/file_assoc.htm

Hope this tip helped you on killing the virus and running your PC back…. Enjoy.. Catch you in Next post…

Wednesday, January 27, 2010

Showing Sharepoint data in silverlight using Sharepoint web services.

Reference:

http://channel9.msdn.com/posts/kirke/SharePoint-for-Developers-Part-4-Calling-SharePoint-Web-Services-from-Silverlight/

1) Create a silverlight application.

Add a reference to your SharePoint web service. Select Project, Add Service Reference…

In the Add Web Reference dialog box, enter the URL of the ‘Lists’ web service. Web services in SharePoint are located in the ‘_vti_bin’ directory under the relevant site. If you are using web services to access your My Site, then enter the URL: ‘http://my/sites/your-alias- here/_vti_bin/lists.asmx’. If you are using web services to access a SharePoint site located at http://ourteamsite, the URL will be ‘http://ourteamsite/_vti_bin/lists.asmx’.

Click the Go button to confirm the URL. If you have entered a valid URL, then this dialog box tells you that it found a web service. The dialog box will be populated with the various operations available in the web service.

Change the web reference name to something relevant. For accessing the Lists web service, a good web reference name is ‘ListsWebService’.

clip_image002

Silverlight Application Page code

public partial class MainPage : UserControl

{

string test;

public MainPage()

{

InitializeComponent();

try

{

ListsSoapClient proxy = new ListsSoapClient();

proxy.GetListItemsCompleted += new EventHandler<GetListItemsCompletedEventArgs>(proxy_GetListItemsCompleted);

XElement Query = new XElement("Query");

XElement viewfield = new XElement("ViewFields");

XElement QueryOptions = new XElement("QueryOptions");

proxy.GetListItemsAsync("MyContacts", null, Query, viewfield, null, QueryOptions, null);

}

catch (Exception ex)

{

LBL_Name.Text = ex.Message;

}

}

void proxy_GetListItemsCompleted(object sender, GetListItemsCompletedEventArgs e)

{

test = "";

XNamespace ns = "#RowsetSchema";

var query = from x in e.Result.Descendants()

where x.Name == ns + "row"

select x.Attribute("ows_Title").Value;

foreach (string t in query)

test = t + " - " + test ;

LBL_Name.Text = test;

}

Types of Sharepoint web services description

WSS Web Services

Web Reference

Administration Service

http://<server-url:port-number>/_vti_adm/admin.asmx

Alerts Service

http://<server-url>/_vti_bin/alerts.asmx

Document Workspace Service

http://<server-url>/_vti_bin/dws.asmx

Forms Service

http://<server-url>/_vti_bin/forms.asmx

Imaging Service

http://<server-url>/_vti_bin/imaging.asmx

List Data Retrieval Service

http://<server-url>/_vti_bin/dspsts.asmx

Lists Service

http://<server-url>/_vti_bin/lists.asmx

Meetings Service

http://<server-url>/_vti_bin/meetings.asmx

Permissions Service

http://<server-url>/_vti_bin/permissions.asmx

Site Data Service

http://<server-url>/_vti_bin/sitedata.asmx

Site Service

http://<server-url>/_vti_bin/sites.asmx

Users and Groups Service

http://<server-url>/_vti_bin/usergroup.asmx

Versions Service

http://<server-url>/_vti_bin/versions.asmx

Views Service

http://<server-url>/_vti_bin/views.asmx

Web Part Pages Service

http://<server-url>/_vti_bin/webpartpages.asmx

Webs Service

http://<server-url>/_vti_bin/webs.asmx

A summary of the “Windows SharePoint Services” web services

WSS Web Services

Description

Administration Service

This web service provides administrative capabilities like creating a new top-level site, deleting a top-level site and getting the list of available languages.

Alerts Service

Provides access to the list of active alerts and allows to delete active alerts.

Document Workspace Service

This web service is used to manage Document Workspace sites. It allows to create new document workspaces, delete document workspaces, create new sub-folders, delete sub-folders, etc.

Forms Service

Each list has forms associated which are used to display list items, create new list items and update or delete existing list items. This web service allows to get the collection of forms associated with a list and then get detailed information about each form.

Imaging Service

SharePoint has picture libraries which users can use to manage pictures. This web service allows to upload pictures, download pictures, create new folders, delete folders and pictures, etc.

List Data Retrieval Service

Allows to run XPath like queries against a list.

Lists Service

This web service is used to work with lists and list data. You can obtain the collection of lists, add new lists, remove lists, add new list attachments, remove attachments, etc.

Meetings Service

This web service is used to work with Meeting Workspaces. You can create a new Meeting workspace, remove an existing Meeting workspace, add new meetings, add new meetings using ICal files, etc.

Permissions Service

Sites and lists have permissions assigned to them. This web service is used to obtain the permissions assigned to a list or site, add new permissions and update or removing existing permissions.

Site Data Service

The Site Data web service can be used to return meta-data about a site or list, get the collection of lists, get the attachments for a list item, get the collection of items in a list, etc.

Site Service

This web service can be used to return the list of site templates. When you create a new site using the Administration web service you need to specify the site template name to use which you can obtain through this web service.

Users and Groups Service

This web service is used to work with users, site-groups and cross-site groups. You can add, update or remove users, site-groups and cross-site groups. You can also add users or cross-site-groups to a site-group.

Versions Service

Document Libraries and Picture Libraries can have versioning enabled, which stores a copy of every single file version. This web service can be used to get the list of available versions, delete versions and also restore a file version.

Views Service

Lists have views associated which define what fields are shown, what filtering and sorting is applied, what grouping is applied, etc. This web service is used to work with list views. You can get the collection of views, add new views, remove views, update the Html code used to display a view, etc.

Web Part Pages Service

Web Parts are objects which you can place on web part pages. This web service is used to work with web parts and web part pages. You can get the list of web parts on a page, you can add or remove web parts, etc.

Webs Service

This web service is used to work with sites and sub-sites. You can get the list of list-templates, get meta-data about a sub-site, get the list of sub-sites, etc.

A summary of the SharePoint Portal Server web services

SharePoint Portal Server provides the same web services as Windows SharePoint Services. It also provides the following five additional web services.

WSS Web Services

Description

Area Service

Areas are sections used in SharePoint Portal Server to group content. This web service allows to manage areas. You can create new areas, update areas, remove areas, get the list of sub-areas, etc.

Query Service

The Query web service is used by clients to search SharePoint. You can send in complex search XML requests and get a result-set of matches.

User Profile Service

Users in SPS have user profiles that are used to target content to audiences (users). This web service allows to obtain user profile information. It does not allow to create or modify user profiles.

SPS Crawl Service

This web service is undocumented and is used by SharePoint itself for site crawling purposes.

Outlook Adapter Service

Provides the same capabilities as the Alerts web service of WSS.

The table below shows the URLs to use for each web service provided by SharePoint Portal Server. You can add them the same way as the WSS web services described above.

WSS Web Services

Web Reference

Area Service

http://<server-url>/_vti_bin/areaservice.asmx

Query Service

http://<server-url>/_vti_bin/search.asmx

User Profile Service

http://<server-url>/_vti_bin/userprofileservice.asmx

SPS Crawl Service

http://<server-url>/_vti_bin/spscrawl.asmx

Outlook Adapter Service

http://<server-url>/_vti_bin/outlookadapter.asmx

Thursday, January 21, 2010

SharePoint Alert customization

Referred URL

http://sridharu.blogspot.com/2008/12/sharepoint-alert-customization.html

You can create one or more alerts for a list or document library in a SharePoint site. When creating alerts you have option of what event and when to get notified. Alerts can be managed by Administrators or Users. SharePoint object model provides methods to manage Alerts programmatically.
SPAlert class provides details on alert like alert frequency, alert type,user who created the alert. This class also provides a method to update alert details. Following code snippet shows how to create SharePoint Alert programmatically:
using (SPSite site = new SPSite("http://servername"))
{
using (SPWeb web = site.OpenWeb())
{
SPUser user = web.SiteUsers["domain name\\username];
SPAlert newAlert = user.Alerts.Add();
newAlert.AlertType = SPAlertType.List;
newAlert.List = web.Lists["List Name"];
newAlert.EventType = SPEventType.All;
newAlert.AlertFrequency = SPAlertFrequency.Immediate;
//passing true to Update method will send alert confirmation mail
newAlert.Update(false);
}
}


SharePoint stores the alert information like web application URL and List URL in content database. Because of this, the links inside alert mail will break if web application URL or List URL is changed. To fix this user need to update the alert manually from alert manager or Administrator can run a script to update alerts. Refer this link for more details on this issue.


Alert mails can be customized in two ways:
Approach 1
You can customize the Alert tempaltes of WSS. Alert tempaltes are located in
"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\XML\AlertTemplates.xml"
Following link has lot of details on this approach:
http://blogs.msdn.com/sharepointdeveloperdocs/archive/2007/12/07/customizing-alert-notifications-and-alert-templates-in-windows-sharepoint-services-3-0.aspx


Approach 2
You can also customize alert mail format by implementing IAlertNotifyHandler interface. Following Microsoft KB article has details on this:
http://support.microsoft.com/kb/948321/en-us


How to debug custom alert handlers
Alerts are generated by WSS timer job. Time job reads the event log and sends the alert. So to debug custom alert handlers you need to attach timer process to debugger (OWSTIMER.exe).

Sharepoint 2010 Webparts

Referred URL

http://weblogs.asp.net/jevgeni/archive/2009/12/10/sharepoint-2010-web-parts.aspx

Navigation
• Categories
• Site Aggregator
• Sites in Category
• Summary Links
• Table of Contents
• Tag Cloud

Lists & Libraries
• These are list view web parts for the lists and document libraries

Authoring
• Content Editor
• Image Viewer, same as in SharePoint 2007
• Media Web Part
• Page Viewer
• Silverlight Web Part

Business Data
• Business Data Actions
• Business Data Catalog Filter
• Business Data Item
• Business Data Item Builder
• Business Data List
• Business Data Related List
• Key Performance Indicators
• KPI Details
• Visio Graphics Service

Content Rollup
• Chart Viewer
• Content Query
• HTML Form Web Part
• iView
• Picture Library Slideshow Web Part

RSS Viewer
• What’s Popular – pick from content, search queries, or search results;

XML Viewer Documents
• Document ID Lookup
• Document Set Contents
• Document Set Properties
• Relevant Documents

Filters
• Choice Filter
• Current User Filter
• Date Filter
• Filter Actions
• Page Field Filter
• Query String (URL) Filter
• SharePoint List Filter
• SQL Server Analysis Services Filter
• Text Filter

My Information
• My Calendar
• My Contacts
• My Inbox
• My Mail Folder
• My Tasks

Office Client Applications
• Excel Web Access
• InfoPath Form Web Par

WSRP Viewer People
• Contact Details
• Profile Browser
• Site Users
• User Task

PerformancePoint
• PerformancePoint Filter
• PerformancePoint Report
• PerformancePoint Scorecard
• PerformancePoint Stack Selecto

Search
• Advanced Search Box
• Dual Chinese Search
• Featured Content
• Federated Results
• People Refinement Panel
• People Search Box
• People Search Core Results
• Refinement Panel
• Related Queries
• Search Action Links
• Search Best Bets
• Search Box
• Search Core Results
• Search Paging
• Search Statistics
• Search Summary
• Top Federated Result

Miscellaneous
• Chart Web Part

How to edit list forms like NewForm.aspx, EditForm.aspx and DispForm.aspx in MOSS?

Referred URL

http://www.sharepointkings.com/2008/05/how-to-edit-list-forms-like-newformaspx.html

 


If we need to edit New/Edit/Display Form of list most of the time we are using SharePoint designer.
But here is the one nice trick to achieve this functionality.
Just add “&ToolPaneView=2” at the end of the URL and refresh the page.


So that you’re URL will be like this.

http://sharepointkings/... /Lists/Demo/NewForm.aspx?RootFolder...&Source=…&ToolPaneView=2
http://sharepointkings/... /Lists/Demo/EditForm.aspx?RootFolder...&Source=…&ToolPaneView=2
http://sharepointkings/... /Lists/Demo/DispForm.aspx?RootFolder...&Source=…&ToolPaneView=2

You can see add webpart tool pan beside this web part.

Just add or remove your webpart and your work is done.
cheers
Below contents are Update as on 22/07/08
There is one more parameter with the same name just pass the value 3 with that.
So that you’re URL will be like this.

http://sharepointkings/... /Lists/Demo/NewForm.aspx?RootFolder...&Source=…&ToolPaneView=3

And that will take you to this type of page.

This will allow you to search webpart across all available galleries