I my share point site I have one List named "People List" and one Wiki Page Library named "People". I have created one visual webpart to display data from People list. I have created webpart property to read listname.The webpart property name for my visual webpart is "People". When I check whether list exists in my site using the following function it returns true:-
public static bool isListExists(SPWeb spWeb, string listName)
{
return spWeb.Lists.TryGetList(listName) != null;
}
But there is no List named "People" exists in my site. Only wiki page library named "People" exists. When I added my webpart in "MySite/People/default.aspx" page I got error.
Column 'Title' does not exist. It may have been deleted by another user.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Column 'Title' does not exist. It may have been deleted by another user.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Column 'Title' does not exist. It may have been deleted by another user.]
Microsoft.SharePoint.SPFieldCollection.GetField(String strName, Boolean bThrowException) +26422968
Microsoft.SharePoint.SPListItem.GetValue(String strName, Boolean bThrowException) +47
Microsoft.SharePoint.SPListItem.get_Item(String fieldName) +12
CL.DanceStudio.Portal.CLDance_Instructor.<>c__DisplayClass3.<Select>b__1() +1155
Microsoft.SharePoint.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2() +729
Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) +27491206
Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) +27194345
Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) +93
CL.DanceStudio.Portal.CLDance_Instructor.CLDance_InstructorUserControl.Select() +291
CL.DanceStudio.Portal.CLDance_Instructor.CLDance_InstructorUserControl.Page_Load(Object sender, EventArgs e) +52
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Control.AddedControl(Control control, Int32 index) +350
CL.DanceStudio.Portal.CLDance_Instructor.CLDance_Instructor.CreateChildControls() +194
System.Web.UI.Control.EnsureChildControls() +146
System.Web.UI.Control.PreRenderRecursiveInternal() +61
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
I think it is due to name conflict. Please provide me a solution.
Related
I've a problem to load Google Recaptcha control when I try to assign Public & Private Keys dynamically in code behind. It works fine in simple ASP.Net website but It doesn't work when I integrate it in DNN module.
Error Message: reCAPTCHA needs to be configured with a public & private key.
Stack trace:
DotNetNuke.Services.Exceptions.PageLoadException: reCAPTCHA needs to be configured with a public & private key. ---> System.ApplicationException: reCAPTCHA needs to be configured with a public & private key. at Recaptcha.RecaptchaControl.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at DotNetNuke.UI.Modules.ModuleHost.InjectModuleContent(Control content) at DotNetNuke.UI.Modules.ModuleHost.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---
Markup:
<googleCaptcha:RecaptchaControl ID="ctlRecaptcha" runat="server" />
Code-behind:
protected void Page_Load(object sender, EventArgs e)
{
ctlRecaptcha.PublicKey = "xyz";
ctlRecaptcha.PrivateKey = "abc";
}
I actually have a tutorial on DNNHero.com that teaches on creating a custom DNN registration with the Google Recaptcha. It includes a video and code project.
Looking at my code, I included the attributes for publickey and privatekey on my ascx, but with dummy values:
<googleCaptcha:RecaptchaControl ID="ctlRecaptcha" runat="server" PublicKey="your_public_key" PrivateKey="your_private_key"/>
I set the attribute values like you did in my Page_Load event. This worked for me. Give it a try and comment if it still throw the error.
I am creating RadTreeView nodes dynamically and I have created it successfully.But When I try to Add a sub-category node to it,sub-category is added successfully but at the end when I am reloading tree I am getting this error:
Object reference not set to an instance of an object.
[NullReferenceException: Object reference not set to an instance of an object.]
Telerik.Web.UI.RadComboBox.OnInit(EventArgs e) +40
System.Web.UI.Control.InitRecursive(Control namingContainer) +134
System.Web.UI.Control.AddedControl(Control control, Int32 index) +191
System.Web.UI.ControlCollection.Add(Control child) +86
Telerik.Web.UI.GridPagerItem.InitializePagerItem(GridColumn[] columns) +23849
Telerik.Web.UI.GridPagerItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +170
Telerik.Web.UI.GridTableView.CreateTopPagerItem(Boolean useDataSource, GridColumn[] copiedColumnSet, Boolean isPagingEnabled, GridTHead thead) +93
Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +1156
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +679
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +149
System.Web.UI.Control.EnsureChildControls() +83
Telerik.Web.UI.GridTableViewBase.get_Controls() +15
Telerik.Web.UI.GridTableView.GetGridTable() +15
Telerik.Web.UI.RadGrid.PrepareRowsVisibility(GridTableView view) +33
Telerik.Web.UI.RadGrid.PrepareItems() +308
Telerik.Web.UI.RadGrid.ControlPreRender() +64
Telerik.Web.UI.RadCompositeDataBoundControl.OnPreRender(EventArgs e) +41
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
Dont understand this I tried to debug my code using debug point but everthing is executed alright but at the end I am getting this error.
yes after a long research on my code I got the answer that my grid was getting referenced to null.But its very sad that this is such a famous forum but no one was able to understand the stack trace.
I had this issue after a postback with a radgrid, the problem was the Datasourse was null. To fix it you only have to set DataSource = ""
So I get this exception from Telerik's RadGrid when using a custom DataSource but I have no idea what I am doing wrong. Any clues?
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:
System.NullReferenceException: Object reference not set to an instance
of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Telerik.Web.UI.GridResolveEnumerable.GetCollectionItemType(Boolean noItemsInEnumerator, Type& collectionItemType, Object& collectionFirstObject) +101
Telerik.Web.UI.GridResolveEnumerable.ParseProperties() +264
Telerik.Web.UI.GridResolveEnumerable.Initialize() +29
Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +45
Telerik.Web.UI.GridResolveEnumerable.get_DataTable() +36
Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, IEnumerable enumerable, Boolean CaseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +245
Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +172
Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields, Boolean enableSplitHeaderText) +322
Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +257
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +480
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +67
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +123
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138
Telerik.Web.UI.GridTableView.PerformSelect() +38
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
Telerik.Web.UI.GridTableView.DataBind() +391
Telerik.Web.UI.RadGrid.DataBind() +191
Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +4251
Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +201
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
This error is happening due to some kind of (probably accidental) recursion. I'd suggest the following:
Look for something that triggers a redraw in your redraw code.
Look at your call stack when it fails and see where it is entering this endless recursion.
I am converting a website over to ASP.NET 2.0, which supports .NET Framework versions 2.0 – 3.5. I am getting the following error message on a particular tab that is connected to a SQL DB. I am stuck at where this change needs to occur as I did not build this particular section of the site. Here is the error message and the Code. Any Help would be greatly appreciated.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
MagicAjax.AjaxCallHelper.GetPageHiddenDictionary(Page page, String fieldName) +37
MagicAjax.AjaxCallHelper.HandleClientScriptBlocks(Page page, Boolean
reflectToClient) +17
MagicAjax.AjaxCallHelper.Page_PreRender(Object sender, EventArgs e) +238
System.Web.UI.Control.OnPreRender(EventArgs e) +8996626
System.Web.UI.Control.PreRenderRecursiveInternal() +103
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint) +2496
I'm having trouble with my ASP.NET application. Basically I've got it hooked up to an entity model representing a MySql database. I've launched applications before using this same database, and they deploy just fine, however when I run this application I'm getting the following error:
FIXED THIS ERROR
Now I'm receiving this error:
Exception Details: System.Data.MetadataException: Unable to load the specified metadata resource.
[MetadataException: Unable to load the specified metadata resource.]
System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources(String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +2490148
System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +170
System.Data.Metadata.Edm.MetadataArtifactLoader.Create(String path, ExtensionCheck extensionCheck, String validExtension, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +8517824
System.Data.Metadata.Edm.MetadataCache.SplitPaths(String paths) +271
System.Data.Common.Utils.<>c__DisplayClass2.<Evaluate>b__0() +19
System.Data.Common.Utils.Result.GetValue() +100
System.Data.Common.Utils.Memoizer`2.Evaluate(TArg arg) +181
System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections) +292
System.Data.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection() +29
System.Data.Objects.ObjectContext..ctor(EntityConnection connection, Boolean isConnectionConstructor) +205
System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) +27
AgentActivity.shoretelEntities..ctor() in c:\Projects\NET\AgentActivity\AgentActivity\ShoretelServer.Designer.cs:34
AgentActivity.ReturnFile.ReturnAgentActivity(String startDate, String endDate) in c:\Projects\NET\AgentActivity\AgentActivity\ReturnFile.aspx.cs:271
AgentActivity.ReturnFile.Page_Load(Object sender, EventArgs e) in c:\Projects\NET\AgentActivity\AgentActivity\ReturnFile.aspx.cs:44
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
Any ideas? I'm at a loss on this one, I don't even where to begin
It seems that the MySQL connector has not been deployed.
Have you verified if the MySQL connector is available on your server?
Checkout this post: Deploy MySQL data provider to Production