.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Getting an error while creating sitecollection programmatically.

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :SharePoint


 I am getting an error when i am trying to create a sitecollection programmatically.

"Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown"

at this line ----------->

//Site collection creation

service.CreateSite(siteURL, companyName, companyName, 1033, templateName, ownerName, ownerLogin,


Log file...

Leaving Monitored Scope (ExecuteWcfOperation:http://schemas.microsoft.com/sharepoint/taxonomy/soap/IMetadataWebServiceApplication/GetServiceSettings). Execution Time=25037.1331659474 
10/06/2010 11:22:59.64  w3wp.exe (0x0E74)                        0x1E68 SharePoint Foundation          Monitoring                     b4ly High     Leaving Monitored Scope (Proxy Channel call for Enterprise Metadata Service). Execution Time=25037.7769033025 
10/06/2010 11:22:59.64  w3wp.exe (0x0E74)                        0x1E68 SharePoint Serv

View Complete Post

More Related Resource Links

Error when creating site collection through programmatically?

hi all, When i am creating SharePoint Site collection through programmatically i am getting an error message. i am using below code...   using (SPSite site = new SPSite("http://servername:7853/")) {   using (SPWeb web = site.OpenWeb()) {   SPWebApplication oweb = web.Site.WebApplication; site.AllowUnsafeUpdates = true;   SPSiteCollection sitecol = oweb.Sites;   SPSite site1 = oweb.Sites.Add("sites/DemoSiteCol", "DemoSiteCol", "Welcome to the Client SiteCol",1033, "STS#0", "Domian\\user", "display name", "user@domian.com");//here i am getting the error message as "Object refernce not set to an instance of an Object". oweb.Update(); } Please tell me why i am getting the error message.... thanks in advance.....

Creating an Excel Spreadsheet programmatically using VB.NET

The Interoperability services make it very easy to work with COM Capable Applications such as Word and Excel. This article reveals using Excel from a managed application. Excel is the spreadsheet component of Microsoft Office 2000. The majority of Excel programmatic functionality is exposed through Automation via the type library Excel9.olb. The intention of this article is to express that a managed application can interrelate with Excel as a COM server.

Creating an Excel Spreadsheet and Adding Data to It Programmatically

The Interoperability services make it veryeasy to work with COM Capable Applications such as Word and Excel. Thisarticle reveals using Excel from a managed application. Excel is thespreadsheet component of Microsoft Office 2000. The majority of Excelprogrammatic functionality is exposed through Automation via the typelibrary Excel9.olb. The intention of this article is to express that amanaged application can interrelate with Excel as a COM server.

Creating Reorderlist Programmatically


I hope to get some guidance on how to create reorder lists programmatically because of the situation described below. Thank you.

I have a page where I want to have a toDo Iist for each of several (typically 10) milestone categories. I can think of 3 options.

I don't know in advance how many 'active' categories there will be but I there is a known fixed total of about 20  categories, of which from 1 to 20 may be 'active'

1. Have one Master ReOrderList And Then Nest the Category ReorderLists Inside 

2. Create the reorderlists programmatically.

3. Brute force approach. Hardcode all 20 reorderlists and their associated sqldatasources, and then set visibility

depending on which category is active. This approach is the simplest but has the disadvantage of too much

repetitive code and the reorder lists would be in a fixed order, when I really want them to match the category order.




Programmatically creating a SharePoint Site based on user input


I am working on developing a “Create Website Wizard” for SharePoint 2007 that would do the following (I am simplifying a little for the sake of this post):


1.      Take user input as follows:



Product Code:

Category (I, II, III):

The category will be a choice field (radio buttons or a dropdown)

Error when creating a net.tcp endpoint in wcf

I am trying to create a simple wcf service that has a net.tcp endpoint.  My OS is Vista and I am hosting the service in IIS 7.  I have set my default website binding for net.tcp to "9200:*" and added net.Tcp to my Enabled Protocols in my website hosting the service and the default website.  Here is my Config Values:   <system.serviceModel>     <services>       <service name="FirstWcfService.Service" behaviorConfiguration="ServiceBehavior">         <!-- Service Endpoints -->         <endpoint address="" binding="netTcpBinding" contract="FirstWcfService.IService"             bindingConfiguration="tcpbinding"/>         <endpoint address="mextcp" binding="mexTcpBinding" contract="IMetadataExchange"/>         <endpoint address="" binding="wsHttpBinding" contract="FirstWcfService.IService"             />         <endpoint address="mexhttp" binding="mexHttpBinding" contract="IMetadataExchange"/>       </service>     </services>     <behaviors>       <serviceBehaviors>         <behavior name="ServiceBehavior">           <!-- To receive exception details in faults for debugging purposes,                set the value below to true.  Set to false befor

Error creating Web Apps

I am getting the following error when I try and create a Web APP. Error An error occurred while getting information about the user FarmAdmin at server ServeName.com: The network path was not found  Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 6ea31cf3-22bd-4e02-b87b-c1b8a1990ab1 Date and Time: 8/30/2010 2:24:55 PM I have set the logging to verbose The Event logs show nothing. The Sharepoint logs show Provisioning of the web application, null, has encountered the following error: System.InvalidOperationException: An error occurred while getting information about the user FarmAdmin at server ServeName.com: The network path was not found at Microsoft.SharePoint.Win32.SPNetApi32.NetUserGetInfo1(String server, String name)     at Microsoft.SharePoint.Administration.SPManagedAccount.GetUserAccountControl(String username)     at Microsoft.SharePoint.Administration.SPManagedAccount.Update()     at Microsoft.SharePoint.Administration.SPProcessIdentity.Update()     at Microsoft.SharePoint.Administration.SPApplicationPool.Update()     at Microsoft.SharePoint.Administration.SPWebApplication.CreateDefaultInstance(SPWebService service, Guid id, String applicationPoolId, SPProcessAccount processA... 6ea31cf3-22bd-4e02-b87b-c1b8a1990ab1 ...ccount, Str

Error when creating PK to a column which has dupliacte columns..

The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'table name' and the index name 'PK__column__118068EB'. The duplicate key value is (D1).

Error creating Read Item or Read List operation in Sharepoint Designer 2010

In terms of high-level requirements, I need to pull in lists from a couple of different web apps.  To do this, I’m using SPD 2010 to create an External Content Type for the list of interest.  I’m able to create a SOAP Service or WCF Service connection just fine.  However, when I try to create the external content type and create a Read Item Operation on one of the GetList or any other Get* (or other Update methods for that matter) methods, I get the following error:"The method that your operation is based on has parameters with complex types that do not have default parameterless constructor.  This kind of data source methods cannot be used in Business Data Catalog."I tried defining an operation on the “AddAttachment” method, and that worked just fine.  I also tried providing default values to the listName and viewName parameters when creating the SOAP Service connection, but still get the error.  Same issue with a WCF Service connection as well. Does anyone know if this is a 2010 issue, or am I approaching this requirement incorrectly?  What are other approaches for connecting to lists that reside in a different web app than yours? 

Error Creating Site Collection

Hello, I have created a basic claims-based web app in SharePoint 2010. When I try to create a Site Collection, after filling out all the details, I get the following error:   Error  Cannot complete this action. Please try again.  Troubleshoot issues with Microsoft SharePoint Foundation.  Correlation ID: 349b9ae9-7bda-41eb-921a-87974afb289c    I have tried ever which way to try and get it to work, but am still stuck. Any ideas as to why I can't create a Site Collection? Thanks!

Error in attaching database file and creating a new connection

I am having problem when i was trying to attach .mdf file while create a new connection of SQL server, create a new connection of SQL database file and open the database in Server Explorer. I am using VS 2010 Ultimate and SQL Express 2008 R2.Can anyone please tell me what is the problem I am facing?Here are the error message.1. Attach .mdf in SQL database file and open the database in Server Explorer2. Create a new SQL server and attach .mdf

Creating SSIS Package Variables Programmatically

Hi There, I am fairly new to SSIS.  I am creating a number of custom SSIS Tasks that I want to be able to share information between at runtime.  I figured that the best way to do this was through package variables, as in the Execute() method each custom task has access to the package variables through the VariableDispenser object.  I have managed to read variables at runtime that I create in the designer, however I am having trouble creating and writing to them.  I have created a very simple custom task below that I would expect to create the specified variable... [DtsTask(DisplayName = "TestVariableWriter")] public class Variab : Task { public override DTSExecResult Execute(Connections connections, VariableDispenser variableDispenser, IDTSComponentEvents componentEvents, IDTSLogging log, object transaction) { try { string varName = "TestVariable"; string varValue = "TestValue"; Variables vars = null; variableDispenser.LockForWrite(varName); variableDispenser.GetVariables(ref vars); if (variableDispenser.Contains(varName)) vars[varName].Value = varValue; else vars.Add(varName, false, string.Empty, varValue); vars.Unlock(); return DTSExecResult.Success; } catch (Exception ex) {

Error when programmatically connect filter webpart with excel webpart

Hello, On MOSS 2007 SP2 64bit I am trying to programmatically connect a SPSlicerTextWebPart with an ExcelWebRenderer but I am getting the error: "The connection point "IFilterValues" on "g_046273fe_af27_4064_86b1_70f2c57c326c"(the excel webpart)   is disabled" and I can't find a way to enable it... I'm using the folowing code: using(SPLimitedWebPartManager webPartMgr = web.GetLimitedWebPartManager("Stats.aspx", PersonalizationScope.Shared)) { Microsoft.SharePoint.Portal.WebControls.SPSlicerTextWebPart filterWebPart = (Microsoft.SharePoint.Portal.WebControls.SPSlicerTextWebPart)webPartMgr.WebParts[0]; if (filterWebPart.ConnectionID == Guid.Empty) { filterWebPart.ConnectionID = Guid.NewGuid(); } webPartMgr.SaveChanges(filterWebPart); ProviderConnectionPoint providerCP = webPartMgr.GetProviderConnectionPoints(filterWebPart)[0]; Microsoft.Office.Excel.WebUI.ExcelWebRenderer excelWebPart = (Microsoft.Office.Excel.WebUI.ExcelWebRenderer)webPartMgr.WebParts[1]; if (excelWebPart.ConnectionID == Guid.Empty) { excelWebPart.ConnectionID = Guid.NewGuid(); } excelWebPart.AllowConnect = true; webPartMgr.SaveChanges(excelWebPart); ConsumerConnectionPoint consumerCP = webPartMgr.GetConsumerConnectionPoints(excelWebPart)[2]; TransformableFilterValuesToFilterValuesTransformer t = new TransformableFilterValue

Programmatically creating a cross list XsltListViewWebPart

Hi, Does anyone know how to create a cross list XsltListViewWebPart in code? I can create a XsltListViewWebPart for a single list no problem. But if I don't set the ListId property and set the DataSourceMode to  SPDataSourceMode.CrossList I always get the error "Microsoft.SharePoint.WebPartPages.WebPartPageUserException : List View Web Part could not be added, list may be hidden.". I can't find much documentation on it. Does anyone have an idea how to get this to work? Thanks a lot,   Dan

Error Creating Control - 'asp:UpdatePanelAnimationExtender' could not be set on property 'Animati

It doesn't seem to matter what I try to make the animation do, I keep getting this shown in the designer. No one else on google seems to be getting that problem either. Note: it doesn't cause debugging or runtime issues... in fact, the only negative thing it does is make it extremely annoying when I look at the designer... I'm going to have about 12 of these updatepanelanimations firing everytime the timer ticks too :(. MasterPage file has the toolkitscriptmanager on it. Here is my designer code for the page I'm having the issue on:<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.Master" CodeBehind="TimeLine.aspx.vb" Inherits="TimeLine.WebForm1" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <asp:Timer ID="Timer1" runat="server" Interval="7000"> </asp:Timer> <asp:Panel ID="Panel1" runat="server" Height="285px" HorizontalAlign="Center" Width="970px" BackImageUrl="~/Images/Img.jpg"> <br />

Ajax Control Toolkit Error Creating Control

Error Creating Control - ToolkitScriptManager1Unknown server tag 'asp:ToolkitScriptManager'.Error Creating Control - ComboBox1Unknown server tag 'asp:ComboBox'.I encountered this error, very annoying becasue it would shut off design view rendering of ComboBoxes as well as entire parent containers like ListViews.  It took me a lot of efforts to hunt down the cause, which would seem very illogical if not weird.  So I am suspecting that it is just happening to me, but would appreciate if somebody could care to reproduce and see if it is actually a bug.Cause: HtmlHead title tag has textFix: Delete text in HtmlHead title tagSteps to reproduce and verify error:1. Have AjaxControlToolkit.Binary.NET4 Instructions: http://www.asp.net/ajaxlibrary/act.ashx Download: http://ajaxcontroltoolkit.codeplex.com/releases/view/43475#DownloadId=1165342. Start Visual Studio 2010 Ultimate Open new project ASP.NET Web Application Default name WebApplication13. Keep Default.aspx open Add Ajax Control Toolkit in Toolbox Close Default.aspx4. Add new folder in WebApplication1 Default name NewFolder15. Add new nested master page in NewFolder1 Default name NestedMasterPage1.master Select Site.Master as master page6. Open NestedMasterPage1.master Add ContentPlaceHolder in Content2 Default ID ContentPlaceHolde

MS.IT.SiteDeleteCapture Error When Creating Webs

When I try to create a web in any of my site collections I get the error below.  I have tried deactivating the Feature but it still shows this error.  I tried uninstalling after first seeing this error and it still gave this error. Does anyone know how to fix? and get rid of this tool completely?   Feature '78b94e15-23ce-43f9-8036-babd847497d1' could not be installed because the loading of event receiver assembly "MS.IT.SiteDeleteCapture, Version=, Culture=neutral, PublicKeyToken=98e95e81f8e48206" failed: System.IO.FileNotFoundException: Could not load file or assembly 'MS.IT.SiteDeleteCapture, Version=, Culture=neutral, PublicKeyToken=98e95e81f8e48206' or one of its dependencies. The system cannot find the file specified. File name: 'MS.IT.SiteDeleteCapture, Version=, Culture=neutral, PublicKeyToken=98e95e81f8e48206' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assembly
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend