Wednesday, September 14, 2011

Csharpcorner

http://www.c-sharpcorner.com/UploadFile/Roji.Joy/8990/
http://www.c-sharpcorner.com/UploadFile/Roji.Joy/8991/
http://www.c-sharpcorner.com/UploadFile/Roji.Joy/8972/
http://www.c-sharpcorner.com/UploadFile/Roji.Joy/8994/

http://www.c-sharpcorner.com/UploadFile/anavijai/8929/

http://www.c-sharpcorner.com/UploadFile/anavijai/8924/
http://www.c-sharpcorner.com/UploadFile/anavijai/8829/

http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/12/01/error-system-io-filenotfoundexception-the-web-application-at-lt-servername-gt-could-not-be-found-console-applications-with-sp2010.aspx


Custom Folder

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace CustomFloder
{
class Program
{
static void Main(string[] args)
{

using (SPSite site = new SPSite("http://devs/sites/TestingSite/ "))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists.TryGetList("CustomCRMList");
SPListItem folderColl = list.Items.Add(list.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder);
folderColl["Title"] = "rrrrr";
folderColl.Update();
list.Update();
}
}
}
}
}




http://www.c-sharpcorner.com/UploadFile/anavijai/8793/
http://www.c-sharpcorner.com/UploadFile/muralidharan.d/7639/
http://www.c-sharpcorner.com/UploadFile/Roji.Joy/7948/
http://www.c-sharpcorner.com/UploadFile/anavijai/8030/
http://www.c-sharpcorner.com/UploadFile/hung123/7158/

http://www.c-sharpcorner.com/UploadFile/anavijai/6989/
http://www.c-sharpcorner.com/UploadFile/anavijai/6984/
http://www.c-sharpcorner.com/UploadFile/anavijai/7003/
http://www.c-sharpcorner.com/UploadFile/Roji.Joy/7025/
http://www.c-sharpcorner.com/UploadFile/Roji.Joy/6017/

http://www.c-sharpcorner.com/UploadFile/nipuntomar/5105/

http://www.c-sharpcorner.com/UploadFile/anavijai/5164/

http://www.c-sharpcorner.com/UploadFile/anavijai/5176/

http://www.c-sharpcorner.com/UploadFile/Roji.Joy/5240/








Custom Theme

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Utilities;
using System.Collections.ObjectModel;
using Microsoft.SharePoint;
using System.Xml;


namespace COMex
{
class Program
{
static void Main(string[] args)
{
using (SPSite siteCollection = new SPSite("http://dev/sites/TestingSite"))
{
using (SPWeb web = siteCollection.OpenWeb())
{
ThmxTheme theme = ThmxTheme.Open(siteCollection, "_catalogs/theme/Azure.thmx");
theme.ApplyTo(web, false);
web.Update();

}
}

***************************************************************
Page Layout for a SharePoint site

Set default Page Layout for a SharePoint site

http://praveenbattula.blogspot.com/search/label/SharePoint


Set default Page Layout for a SharePoint site

http://praveenbattula.blogspot.com/search/label/SharePointspx

http://blogs.msdn.com/b/jnak/archive/2010/02/08/migrating-an-existing-asp-net-app-to-run-on-windows-azure.aspx

infopath

http://virtualizesharepoint.com/2011/05/15/creating-form-in-infopath-2010-and-publishing-to-sharepoint-2010/

http://blogs.msdn.com/b/jnak/archive/tags/walkthrough/


Cloud Computing

http://blogs.msdn.com/b/jnak/archive/tags/cloud+computing+tools/

http://blogs.msdn.com/b/jnak/archive/2009/07/20/windows-azure-tools-and-sdk-july-2009-ctp.aspx

SharePoint 2010 and Office 2010 Lauch dates announced as May 12th 2010
http://codename-srini.blogspot.com/2010/03/sharepoint-2010-and-office-2010-lauch.html

http://codename-srini.blogspot.com/search/label/Custom%20Site%20Templates



try / finally using() SharePoint Dispose()

http://blogs.msdn.com/b/rogerla/archive/2009/01/14/try-finally-using-sharepoint-dispose.aspx

SharePoint 2007 and WSS 3.0 Dispose Patterns by Example


http://blogs.msdn.com/b/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx

http://www.sharepointfix.com/2008/12/best-practices-disposing-sharepoint.html
http://www.sharepointfix.com/2008/12/best-practices-disposing-sharepoint.html

Configuring SharePoint Foundation 2010 for SharePoint Workspace 2010


http://weblogs.asp.net/jeffwids/archive/2010/05/06/configuring-sharepoint-foundation-2010-for-sharepoint-workspace-2010.aspx

http://stefan-stanev-sharepoint-blog.blogspot.com/2010_10_01_archive.html



Feature stapling in sandbox solutions

http://stefan-stanev-sharepoint-blog.blogspot.com/search/label/SharePoint%202010
Changing SharePoint 2010 default font size:

http://virtualizesharepoint.com/category/sharepoint-2010-customization/


SharePoint 2010 MasterPages & CSS

http://virtualizesharepoint.com/2011/05/01/sharepoint-2010-masterpages-css/



SP2010: Fixing User Profile Application Service Connection Error


http://blogs.pointbridge.com/Blogs/nielsen_travis/Pages/Post.aspx?_ID=30

http://blogs.pointbridge.com/Blogs/nielsen_travis/pages/default.aspx

Overview of using REST in SharePoint 2010

http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=117

http://sharepointgeorge.com/2009/11/

http://www.ramoliya.amarinfotech.com/getting-started-with-sharepoint-2010-web-services/

http://nikspatel.wordpress.com/2010/06/11/step-by-step-consuming-sharepoint-2010-lists-data-in-the-ssrs-2008-r2-reports/

http://paulgalvinsoldblog.wordpress.com/2008/02/05/solution-system-io-filenotfoundexception-on-spsite-new-spsiteurl/

WCF: Consuming Claims-Enabled WCF Web Services as SharePoint 2010 External Content Types (Part 4 of 4)


http://msdn.microsoft.com/en-us/library/gg318616.aspx


http://forums.codecharge.com/posts.php?post_id=67135

http://ktskumar.wordpress.com/2007/07/01/sharepoint-sites-creation-using-c-through-webservices/

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/2c741790-0ff7-407a-9802-bd3ab82fbac1

http://social.msdn.microsoft.com/Forums/en-US/isv/thread/5133f61e-7ae8-4a0f-867b-3f65dd58d7f2

http://www.sharepoint-tips.com/2007/04/content-query-limitations-and-object.html

Site Directory
http://sharepoint.mindsharpblogs.com/Ben/archive/2009/10/29/SharePoint-Server-2010-Site-Directory-(where-did-it-go[ques]).aspx

Workflows
http://msdn.microsoft.com/en-us/magazine/ee335710.aspx

http://sergeluca.wordpress.com/2010/06/08/workflows-in-sharepoint-2010-tutorial-step120-what%E2%80%99s-new/

http://www.codeproject.com/Articles/125120/Step-by-Step-Guide-in-Developing-your-own-Workflow

http://www.c-sharpcorner.com/UploadFile/Roji.Joy/3875/

http://social.msdn.microsoft.com/forums/en-US/sharepointdevelopment/thread/e7eda00c-14c7-41f9-87b1-09d911c30378/

http://www.sharepointkings.com/2008/08/create-custom-listviewwebpart.html

Tuesday, September 06, 2011

Custom Webservices Sharepoint 2010

1)Create a asp.net web service in sp2010 with framework3.5.
a)File New select Web Site select .NET Framework3.5 select VisualC#-->selectASP.NET Webservice Template select FileSystem enter location Click OK.
b)create a Class Library Project in The same Web Service Application.
c)Add the reference to System.Web.Services namespace in the Class Library.
d)delete the class.cs file ,and drag the service.cs into ClassLibrary Project .
e)delete the service.cs file from the App_Code.
f)create the Strong for the ClassLibrary .and add the dll into GAC.
g)go to assembly folder and choose the dll file and RC on the dll file choose properties,copy the PublicKeyToken,Version,Culture.
h)Goto Solution Explorer Dbl_Click on service.asmx and add the following Code
<%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="Service" %>
Changed to
<%@ WebService Language="C#" Class="Service, MyServiceAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8f2dca3c0f2d0131" %>

i)Rename the asmx file (CustomWebservice.asmx)
2) Generating and Modifying Static Discovery and WSDL Files
1)copy the asmx file into _layouts Folder
2Run the Disco at the command prompt from the LAYOUTS directory to generate .disco and .wsdl files. Run a command in the following format to generate the files in \LAYOUTS:
1. disco http://MyServer/_layouts/MyCustomWebService.asmx
use this command automatically disco file and wsdl files are created.
2. Rename both files in the respective formats MyCustomWebServicedisco.aspx and MyCustomWebServicewsdl.aspx so that your service is discoverable through SharePoint Foundation.
Deploying the Web Service Files to the _vti_bin Directory
The _vti_bin virtual directory maps physically to the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI directory, which contains the default Web service files that are used in SharePoint Foundation. Copy the new MyCustomWebServicewsdl.aspx and MyCustomWebServicedisco.aspx files, and also the MyCustomWebService.asmx file, to the ISAPI folder.
From the _vti_bin directory, a Web service offers its functionality to the site that is specified when adding a Web reference for the service.
To verify that your custom Web service is discoverable, navigate to http://MyServer/_vti_bin/MyCustomWebService.asmx.
Listing the New Web Service in spdisco.aspx
________________________________________
To make your Web service discoverable in Visual Studio as a Web service along with the default SharePoint Foundation Web services, open the spdisco.aspx file that is located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI and add the following code, specifying the .asmx file for your Web service.
Web_Reference_Folder.MyServiceClass MyCustomService = new Web_Reference_Folder.MyServiceClass();
MyCustomService.UseDefaultCredentials = true;
MessageBox.Show(MyCustomService.HelloWorld());


using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;


SPWeb myWebSite = SPContext.Current.Web;
SPListCollection lists = myWebSite.Lists;

return (myWebSite.Title + " contains " + lists.Count.ToString() +
" lists.");


1. To rebuild the class library DLL and copy it to the GAC, repeat steps 8 and 9 in "To create an ASP.NET Web service."
2. Reset Internet Information Services (IIS) for changes in the DLL to take effect.
3. To generate new versions of the .disco and .wsdl files, repeat the steps in "To generate the static discovery and WSDL files," but change the method binding name in the .disco file as appropriate, for example, to GetSiteListCount.
4. Copy the new versions of the MyCustomWebServicedisco.aspx and MyCustomWebServicewsdl.aspx files to the ISAPI folder.
5. Open the Windows application that you created previously, delete the previous Web service reference for the Hello World example, change the method name as appropriate, and add a new Web reference to the revised Web service.
6. Press F5 to compile and run the project and see a message box that displays the Web site name and the number of lists that it contains.

SharePoint 2010 Central Administration and Configuration Mapping


WCF Services in SharePoint Foundation 2010

http://msdn.microsoft.com/en-us/library/ff521586.aspx

http://msdn.microsoft.com/en-us/library/ff521581.aspx

http://msdn.microsoft.com/en-us/library/ff521582.aspx
http://msdn.microsoft.com/en-us/library/ms464040.aspx


Web Services and SharePoint: How do I do it?


[SP2010] Web Services Changes



Getting Started With SharePoint 2010 Web Services


Overview of using REST in SharePoint 2010


WCF: Consuming Claims-Enabled WCF Web Services as SharePoint 2010 External Content Types (Part 4 of 4)


SharePoint sites creation using C# through WebServices


Programmatically Creating SubSite Using Sharepoint Admin.asmx webservice in SharePoint



SharePoint 2010: Create Custom WCF Service


http://www.onlysharepoint2010.com/2011/06/how-to-create-custom-webservice-in.html

http://discoverter.codeplex.com/


Writing Custom Web Service for SharePoint in Supported Mode

1. We will put our custom Web Services in a Custom folder under _vti_bin. In this case we will create new folder WSCustom under (12hive/ISAPI for SharePoint 2007 or 14hive/ISAPI for SharePoint 2010)
2. We will need a helper to read SharePoint context (SPVirtualPath) before passing the request to the real ASMX. In this case we will copy WSDISCO.ASPX and WSWSDL.ASPX from original _VTI_BIN to _VTI_BIN/WSCustom folder
3. We will need custom SPDisco.aspx for our web services, in this case I will name it WSCustomSPDisco.aspx. This is the file, where we will register our web service. (Note the registration is optional, but it is required for truly SharePoint integration)
4. We need an interceptor so that request to SPDisco.aspx will return combination between original SPDisco.aspx and WSCustomSPDisco.aspx. In this case, we will create WSCustomHttpHandler that combine XML from the two files.
5. We need rules to add rules to redirect request to _vti_bin/spdisco.aspx to our WSCustomHttphandler.

In the diagram, the scenario will look like this


































1. Create ASPNET Web Services using Visual Studio.
You can follow instruction in MSDN here (http://msdn.microsoft.com/en-us/library/dd583131(v=office.11).aspx) and stop until “To copy the Web service files to the _vti_bin virtual directory”).

2. Create custom folder for your project under _vti_bin (for example 12hive/ISAPI/CustomWS for SharePoint 2007 or 14hive/ISAPI/CustomWS for SharePoint 2010). In this custom folder, we will put 3 files for every web service (*.asmx) which are:
* .asmx , where is your web service file.
* .aspx , where is corresponding DISCO file of your web service.
* .aspx , where is corresponding WSDL file of your web service.
3. Copy ISAPI\spdisco.aspx to ISAPI\spdisco.disco.aspx . We need copy of original spdisco.aspx, since we don’t want to have infinite loop in our HttpHandler later.
4. Create ISAPI\customws.spdisco.aspx. In this file, we will register our custom web service. This is important to avoid modifying SharePoint built-in file.
5. Create HttpHandler to combine content of spdisco.aspx and *.spdisco.aspx.
6. Register HttpHandler in web.config. We will intercept all _vti_bin/spdisco.aspx with our HttpHandler.


Here Usefull Links

1)Walkthrough: Creating a Custom ASP.NET Web Service
2)spDev
3)SharePoint for Developers Part 6 – Custom web services
4)Web Services and SharePoint: How do I do it?
5)wcf


Overview of WCF and the PSI


Consuming ASMX Web Services with Silverlight


How to Create an ASMX Web Service on SharePoint 2010, Using Visual Studio 2010


Create Simple Web Service in Visual Studio 2008 / 2010




Working with Data Sources and Web Services connections in SharePoint Designer 2010

Link1

Blog Archive