.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

error when creating a new ribbon tab and using MakeTabAvailable method

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :SharePoint
Hi there
to add a custom tab in the ribbon. After deploying my solution the tab appears fine and everything seems to be working.

What i did next was , I took the RegistrationId="101" RegistrationType="List" from the XML definisiton and called the MakeTabAvailable method as follows hoping that i can make the tab available in all lists.

protected void Page_Load(object sender, EventArgs e)
            SPRibbon ribbon = SPRibbon.GetCurrent(this.Page);
            if (!ribbon.IsTabAvailable("Ribbon.CustomTabExample"))


however after doing that, the tab appears fine, but it can't load the groups/buttons. The tab just keeps on loading and nothing is rendered. If i click on another tab, and then click on my custom tab i get the following error in the browser.

Webpage error details

View Complete Post

More Related Resource Links

Creating Dialogs and Ribbon Controls for SharePoint 2010

SharePoint 2010 provides new user interface components, such as server ribbons, and the new dialog platform. As a developer, you can create controls for the server ribbon and dialog boxes for the dialog platform.

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

The remote server returned an error: (405) Method Not Allowed.



{System.Net.WebException: The remote server returned an error: (405) Method Not Allowed.
   at System.Net.WebClient.UploadFile(Uri address, String method, String fileName)
   at System.Net.WebClient.UploadFile(Uri address, String fileName)
   at System.Net.WebClient.UploadFile(String address, String fileName)
   at Test.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\WebSite1\Test.aspx.cs:line 35}

Windows application, automated process will run on local user system...
trying to upload a file to website folder. website address:

System.Net.WebClient wc = new WebClient();
wc.UploadFile(website address, "c:/1.pdf");

Getting error from above line.. Am doing something wrong??
I dont want to use ftp or share folder logic..
is there any other way to upload the files to server??

Ajax Cascading drop down method error 500!


Sorry to trouble you all with something that has already been posted a million times but I have tried everything I can and stuck with for about 10 days now. Please help. I have created 2 tables Categories, Subcategories.

Categories table has Category_ID(Primary Key) and "Category" fields. Subcat table has SubcatID(Primary Key, Sub_cat and Category_ID(Foreign Key). Here's the code of the asmx file.

Service methods used in ASPX file ServiceMethod="GetVendors" and ServiceMethod="GetContactsForVendor". Please help me find the source of the method erro 500 and I will be very greatful.

<%@ WebService Language="VB" Class="CascadingDropdown1" %>

Imports System.Web.Script.Services

Imports AjaxControlToolkit

Imports System.Web

Imports System.Web.Services

Imports System.Web.Services.Protocols

Imports System.Collections.Generic

Imports System.Collections.Specialized

Imports System.Data.SqlClient

<ScriptService()> _
Public Class CascadingDropdown1
Inherits System.Web.Services.WebService

<WebMethod()> _
Public Function GetVendors(ByVal knownCategoryValues As String, ByVal category As String) As Cascadi

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 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.....

PUT method gives error 400 "Bad Request" in WCF REST Service Application

I am trying to learn WCF REST Services through http://blogs.msdn.com/endpoint/archive/2010/01/14/updating-state-in-wcf-webhttp-services.aspx , It's a link of Part 3 of 12 part blog series. Now I am trying the same stuff given in the part 3 with my own Entities and Entity Model instead of what is given in the blog. Here is my full project I am working on .. http://cid-9e3f62c0688824b0.skydrive.live.com/self.aspx/.Public/pronerveEPMS.zip For comparision with the code shown in the Blog I am following, you can download the zip file of the project from the same link given here at starting (At the end of the blog and before comments starts). And here is the method in Program.cs file of console project in my application that raises the exception.....        private static Role UpdateRole(HttpClient hc, Role role1)        {            Console.WriteLine("Updating Role {0} : ",     role1.RoleID);            Console.WriteLine();            string updateURI = "Roles/" + role1.RoleID.ToString();            HttpContent content = HttpContentExtensions.CreateDataContract(role1);            using (HttpResponseMessage response = hc.Put(upd

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

AjaxToolkit's CascadingDropDown control is throwing Method Error 404 in Hybrid system environment (

Hi Experts, We have an Asp.net web application, which is deployed in shared hosting environment. On shared hosting environment initial request to this web application is handled by Linux server and then based on the requested page the Linux server is redirecting request to web server on windows OS. Now, in our web application, we have used ajaxToolkit's CascadingDropDown control to populate three levels of categories. In the hybrid system described above, the CascadingDropDown control is throwing Method Error 404. I would appreciate if some body can guide on how to resolve this issue. The sample of code snap shot is mentioned below. ********************************************************************* Aspx file. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <asp:DropDownList ID="ddlMajorLevelCategory" runat="server" Width="250px" ToolTip="Select Major Level Category" TabIndex="1"                            SkinID="h6BlueArial"> </asp:DropDownList>   <ajaxToolkit:CascadingDropDown ID="ccMajorCategory" runat="server" TargetControlID="ddlMajorLevelCategory" Category="M" PromptText=&qu

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