SharePoint Online is a cloud-based service for businesses. In SharePoint setting up a web farm and get it up running form small enterprise was always a challenge in terms of hardware cost, getting the expertise to set up the web farm, capacity planning etc.
Now Microsoft wants to bring SharePoint to the masses by exposing it in the cloud thus it takes care of the infrastructure, scalability of the web farm, maintenance & patching the systems with less or no downtime and calculation of volume licensing(ever did or try to find the licensing math) with as low as 10$.
Reach out to SharePoint Online for small business which provides information related to the small enterprises. Developers can reach out to Developer resource center for understanding developer features available. I believe there should not be major change Developer resource centers with the API for development.
Finally SharePoint also joins the Cloud band. hmm.. result of significant innovation and development in virtualization arena.
Thursday, November 18, 2010
Friday, October 22, 2010
Fetching from SharePoint Lists using ACE OLE DB
There are varieties of ways available to access a sharepoint list object model, web services, RPC, DAV. Recently gotta chance to work with Microsoft ACE OLE Db objects, while playing with the object came across a strange connection string from Connectionstrings.com which just provides a connection string for a sharepoint list.
This approach is not officially documented anywhere, I thought of giving it a shot and its working too. Here's the code to display values fetched from SharePoint list using OLE DB data reader.
string connString = "Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=2;RetrieveIds=Yes; DATABASE=http://foo/;LIST={7F72D985-5219-4E8A-AA56-C4473902A333};";
OleDbConnection conn = new OleDbConnection(connString);
conn.Open();
OleDbCommand command = new OleDbCommand("select * from States", conn);
OleDbDataReader dataReader = command.ExecuteReader();
while (dataReader.Read())
{
Console.WriteLine(dataReader["Title"]);
}
This approach is strictly for development environment ONLY.
This approach is not officially documented anywhere, I thought of giving it a shot and its working too. Here's the code to display values fetched from SharePoint list using OLE DB data reader.
string connString = "Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=2;RetrieveIds=Yes; DATABASE=http://foo/;LIST={7F72D985-5219-4E8A-AA56-C4473902A333};";
OleDbConnection conn = new OleDbConnection(connString);
conn.Open();
OleDbCommand command = new OleDbCommand("select * from States", conn);
OleDbDataReader dataReader = command.ExecuteReader();
while (dataReader.Read())
{
Console.WriteLine(dataReader["Title"]);
}
This approach is strictly for development environment ONLY.
Labels:
Hack,
sharepoint
Tuesday, September 28, 2010
Show communicator status in your custom application pages
When ever we show a username in a custom application page or in a custom web part, adding that small presence aware icon before the user name will be a value addition to the end users which allows to see the person's availability.
An ActiveX control called NameCtrl in Name.Dll is responsible to retrieve the user status and rendering.
Use the following snippet, get the string and render it on your custom page to make the presence aware work for you. Ensure Ows.Js is referenced in your master page, this javascript is responsible for instantiating the ActiveX control and rendering.
public static string GetIMStatusForUser(string personEmail, string personName)
{
string statusJS = String.Format("<span><img border=\"0\" height=\"12\" width=\"12\" src=\"/_layouts/images/blank.gif\" onload=\"IMNRC('{0}')\" id=\"IMID\"
ShowOfflinePawn=1><a href=\"mailto:{0}\">{1}</a></span>",
personEmail,personName);
return statusJS
}
An ActiveX control called NameCtrl in Name.Dll is responsible to retrieve the user status and rendering.
Use the following snippet, get the string and render it on your custom page to make the presence aware work for you. Ensure Ows.Js is referenced in your master page, this javascript is responsible for instantiating the ActiveX control and rendering.
public static string GetIMStatusForUser(string personEmail, string personName)
{
string statusJS = String.Format("<span><img border=\"0\" height=\"12\" width=\"12\" src=\"/_layouts/images/blank.gif\" onload=\"IMNRC('{0}')\" id=\"IMID\"
ShowOfflinePawn=1><a href=\"mailto:{0}\">{1}</a></span>",
personEmail,personName);
return statusJS
}
Labels:
C#,
Code,
sharepoint,
Tips
Monday, September 27, 2010
Configuring Location based Metadata in SharePoint 2010
Location based metadata which manages to inherit default metadata values from its immediate parent. This is a nice feature in SharePoint 2010 and its available out of the box with few configuration steps.
Configuring default metadata
1. Add the required folder structure to your document library, in this example it is
Root->Hardware->Router
Root->Software->Microsoft
2. Add the required column to the document library, in this example it is "Classification" and click on "Column default value settings"
click on the required folder in left pane, choose the column name in the right pane. You will be seeing a popup as below
Change the radio button to "Use this value" and enter the default value in the text box. This value will be inherited in all the documents which will reside in this folder.
Provide a different value for the subfolder "Router" inside the Hardware folder.
Upload a file to Hardware folder and note the "Classification" metadata is pre-populated
Similarly if we upload a file in "Router" folder the classification will be pre-populated as we've provided earlier.
SharePoint 2010 registers a Item Added event reciever(Microsoft.Office.DocumentManagement.LocationBasedDefaultsReceiver ItemAdded) to the document library upon first access of this feature.
Refer the following MSDN articles for more info
http://msdn.microsoft.com/en-us/library/microsoft.office.documentmanagement.metadatadefaults.aspx
http://msdn.microsoft.com/en-us/library/ee557925.aspx
Configuring default metadata
1. Add the required folder structure to your document library, in this example it is
Root->Hardware->Router
Root->Software->Microsoft
2. Add the required column to the document library, in this example it is "Classification" and click on "Column default value settings"
click on the required folder in left pane, choose the column name in the right pane. You will be seeing a popup as below
Change the radio button to "Use this value" and enter the default value in the text box. This value will be inherited in all the documents which will reside in this folder.
Provide a different value for the subfolder "Router" inside the Hardware folder.
Upload a file to Hardware folder and note the "Classification" metadata is pre-populated
Similarly if we upload a file in "Router" folder the classification will be pre-populated as we've provided earlier.
SharePoint 2010 registers a Item Added event reciever(Microsoft.Office.DocumentManagement.LocationBasedDefaultsReceiver ItemAdded) to the document library upon first access of this feature.
Refer the following MSDN articles for more info
http://msdn.microsoft.com/en-us/library/microsoft.office.documentmanagement.metadatadefaults.aspx
http://msdn.microsoft.com/en-us/library/ee557925.aspx
Labels:
SP2010
70-542 MOSS 2007 App Development completed
Completed 70-542 Microsoft Office SharePoint Server 2007, Application Development last week end
With SharePoint Server 2010 in the ring, it's late but good to complete the 2007 series before jumping to 2010 bandwagon
Useful links for preparation:
With SharePoint Server 2010 in the ring, it's late but good to complete the 2007 series before jumping to 2010 bandwagon
Useful links for preparation:
Labels:
sharepoint
Wednesday, September 1, 2010
Unlocker : Error debug privileges
If the user doesn't have permission for remote debugging,Unlocker will fail with the following error message
Error Debug privileges
Provide Debug privileges for the user in the target machine to satisfy Unlocker
Start -> Run -> "secpol.msc" then click ok
Expand "Local Policies" in left pane
click the "User Rights Assignments" folder
On the right hand screen double click "Debug Programs"
Click the "Add User or Group" button
Click the "Advanced" button
Click the "find now" button
select your "user logon name" and then click the "Ok" button
Changes will take effect after a logoff or a reboot.
Error Debug privileges
Provide Debug privileges for the user in the target machine to satisfy Unlocker
Start -> Run -> "secpol.msc" then click ok
Expand "Local Policies" in left pane
click the "User Rights Assignments" folder
On the right hand screen double click "Debug Programs"
Click the "Add User or Group" button
Click the "Advanced" button
Click the "find now" button
select your "user logon name" and then click the "Ok" button
Changes will take effect after a logoff or a reboot.
Tuesday, August 24, 2010
How to enable SharePoint to handle the forbidden files ?
We tried to store files which has the (.rules) extension in document library, once we added all these files to the document repository,we tried to download these files by clicking on it. It ended up in an error message stating.
<add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler...
Warning : Do understand the risk of exposing these forbidden files using StaticFileHandler
Following is the list of Http handlers which takes care of the frequently used ASP.NET file types
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden.
The extension '.rules' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Requested URL: /Financial Documents/TestRulesSet.rules
But the Send to->"Download a copy" option works as expected. When we use this method we are asking the OOB download.aspx page to download the content for us.
After re-collecting the basics of SPHttpHandler which handles all the SharePoint requests. This handler is forbidding this specifying file type. so the solution is to
Add a http handler before SPHttpHandler which serves this file type as expected Open windows explorer , navigate to the virtual directory and open web.config with your favorite text editor
Find section and the following segment below after the remove block, so after adding the httpHandlers section will look like below
<remove verb="GET,HEAD,POST" path="*" />
<add verb="*" path="*.rules" type="System.Web.StaticFileHandler" /><add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler...
Do an IISReset
Warning : Do understand the risk of exposing these forbidden files using StaticFileHandler
Following is the list of Http handlers which takes care of the frequently used ASP.NET file types
- trace.axd - System.Web.Handlers.TraceHandler
- aspx - System.Web.UI.PageHandlerFactory
- ashx - System.Web.UI.SimpleHandlerFactory
- asmx - System.Web.Services.Protocols.WebServiceHandlerFactory
- rem - System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory
- soap - System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory
- asax - System.Web.HttpForbiddenHandler
- ascx - System.Web.HttpForbiddenHandler
- All sharepoint request - Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler
- Reserved.ReportViewerWebControl.axd -Microsoft.Reporting.WebForms.HttpHandler
Labels:
ASP.NET,
sharepoint
Subscribe to:
Posts (Atom)