I am trying to add OneViewCalendarWebpart to my site. I am getting the following error when I try to add the webpart from the gallery.
Server Error in '/' Application.
Value cannot be null.
Parameter name: g
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.ArgumentNullException: Value cannot be null.
Parameter name: g
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:
[ArgumentNullException: Value cannot be null.
Parameter name: g]
System.Guid..ctor(String g) +7452814
Microsoft.GroupBoard.WebControls.CalendarViewControlTraverser.GetListFromCalendarControl() +62
Microsoft.GroupBoard.WebControls.CalendarViewControlTraverser.get_IsSRList() +8
Microsoft.GroupBoard.WebControls.GbwListDeterminer.OnInit(EventArgs e) +83
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.AddedControl(Control control, Int32 index) +198
System.Web.UI.ControlCollection.Add(Control child) +80
Microsoft.SharePoint.WebControls.SPCalendarView.CreateChildControls() +644
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +44
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
It seems like the ListName property is not initialized, but the webpart tries to read it (as far as I understand, you are having a problem with Microsoft GroupBoard Workspace webpart).
As far as I can recall from the time I played with the "GroupBoard" solution, these webparts have to be added from code and cannot be added from Webpart gallery. Take a look at the comments in this blog post: http://www.spelements.com/blog/2009/01/printing-sharepoint-lists-calendars/
Related
I am trying to set up connection to the PowerBI service with the pyadomd library.
Here is the connection string:
"Provider=MSOLAP;Data Source=powerbi://api.powerbi.com/v1.0/myorg/workspace_name;User ID=user_email;Password=user_passw;Initial Catalog=dataset_name"
I get the error:
AdomdConnectionException: The connection string is not valid. ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.GetInstancePort(ConnectionInfo connectionInfo)
--- End of inner exception stack trace ---
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.GetInstancePort(ConnectionInfo connectionInfo)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.GetTcpClient(ConnectionInfo connectionInfo)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenTcpConnection(ConnectionInfo connectionInfo)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenConnection(ConnectionInfo connectionInfo, Boolean& isSessionTokenNeeded)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect(Boolean toIXMLA)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)
at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()
Does anyone know what is wrong?
I don't want to use the other library like "adodbapi" in this case as I have another unresolved error with it.
I have taken the Connection String from my Azure SQL instance via the portal and pasted it into my web.config. If I test the connection string when I create the Publishing Profile it is fine. If I throw an exception in Global.asax to see my connection string like this:
throw new Exception(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString);
, it shows my correct one. However, I still get this error:
{
"Message": "An error has occurred.",
"ExceptionMessage": "Format of the initialization string does not conform to specification starting at index 0.",
"ExceptionType": "System.ArgumentException",
"StackTrace": " at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue)\r\n at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)\r\n at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)\r\n at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)\r\n at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)\r\n at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)\r\n at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)\r\n at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)\r\n at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<SetConnectionString>b__18(DbConnection t, DbConnectionPropertyInterceptionContext`1 c)\r\n at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)\r\n at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.SetConnectionString(DbConnection connection, DbConnectionPropertyInterceptionContext`1 interceptionContext)\r\n at System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection)\r\n at System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config)\r\n at System.Data.Entity.Internal.LazyInternalConnection.Initialize()\r\n at System.Data.Entity.Internal.LazyInternalConnection.get_ProviderName()\r\n at System.Data.Entity.Internal.LazyInternalContext.get_ProviderName()\r\n at System.Data.Entity.Internal.DefaultModelCacheKeyFactory.Create(DbContext context)\r\n at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()\r\n at System.Data.Entity.Internal.InternalContext.Initialize()\r\n at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)\r\n at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()\r\n at System.Data.Entity.Internal.Linq.InternalSet`1.Include(String path)\r\n at System.Data.Entity.Infrastructure.DbQuery`1.Include(String path)\r\n at ExpressoApi.Controllers.MenusController.GetMenus() in C:\\Users\\david\\Desktop\\ExpressoApi-master\\ExpressoApi\\Controllers\\MenusController.cs:line 17\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__3(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"
}
I've spent a couple of hours trying to fix this, I've made no progress.
I found the problem. Simply pasting the connection string into my web.config of my Azure App does nothing. I needed to add the connection string into my PUBLISHSETTINGS file and the re-publish. Then everything works.
This problem has been driving me nuts for hours and I can't figure out what's going on. For example's sake, I have created a test action on a custom page in my Acumatica installation.
This test action is as follows:
public PXAction<UsrPCMJob> testAction;
[PXUIField(DisplayName = "Test")]
[PXButton()]
public virtual void TestAction()
{
throw new PXException("This is just a test action!");
}
I have created a rest endpoint for this page and mapped the test action.
If I create the post in Postman, it works as expected:
{"entity":{"Job":{"value":"0228467"}},"parameters":null}
and I get the following as a response:
"exceptionMessage": "PX.Data.PXException: This is just a test action!
However, in code (PHP, using Guzzle for my request), even though my json body is the same:
{"entity":{"Job":{"value":"0228467"}},"parameters":null}
I get this error message:
{"message":"An error has occurred.","exceptionMessage":"PX.Data.PXException: Error #251: Failed to commit the Job row.\r\n at PX.Api.SyImportProcessor.SyStep.a(Object A_0, PXFilterRow[] A_1, PXFilterRow[] A_2)\r\n at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable()","exceptionType":"PX.Api.ContractBased.OutcomeEntityHasErrorsException","stackTrace":" at System.Monads.ArgumentCheck.CheckNull[TSource](TSource source, Func`1 exceptionSource)\r\n at PX.Api.ContractBased.EntityService.GetOperationResult(EntityImpl entity, EntityExportContextBuilder entityExportContextBuilder, PXSYTable exportedKeys, List`1 errors) in F:\\Bld2\\AC-FULL60U3-JOB1\\sources\\NetTools\\PX.Api.ContractBased\\EntityService.cs:line 457\r\n at PX.Api.ContractBased.EntityService.Invoke(ISystemContract systemContract, String version, String name, EntityImpl entity, ActionImpl action, CbOperationContext operationContext) in F:\\Bld2\\AC-FULL60U3-JOB1\\sources\\NetTools\\PX.Api.ContractBased\\EntityService.cs:line 720\r\n at PX.Api.ContractBased.Soap.EntityGateBase.InvokeImpl(EntityImpl entity, ActionImpl action) in F:\\Bld2\\AC-FULL60U3-JOB1\\sources\\NetTools\\PX.Api.ContractBased\\Soap\\EntityGateBase.cs:line 144\r\n at PX.Api.ContractBased.Soap.EntityGateV2.PX.Api.ContractBased.IRestGate.Invoke(EntityImpl entity, ActionImpl action) in F:\\Bld2\\AC-FULL60U3-JOB1\\sources\\NetTools\\PX.Api.ContractBased\\Soap\\EntityGateV2.cs:line 357\r\n at PX.Api.ContractBased.Soap.WebApiSoapController.RestInvoke(EntityEndpoint endpoint, String objectName, String actionName, ActionInvocation invocation) in F:\\Bld2\\AC-FULL60U3-JOB1\\sources\\NetTools\\PX.Api.ContractBased\\Soap\\WebApiSoapController.cs:line 414\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"}
My php guzzle client that I created works fine on other requests that use actions, but not for this test action or a few other actions.
Any help you can offer would be GREATLY appreciated. Thanks!
I'm getting an exception when I run a unit test on a controller in web project (ASP.NET web api). The exception is thrown when LogManager.GetCurrentClassLogger() of the controller is executed:
System.MethodAccessException: Attempt by method 'Castle.Proxies.ClaimsPrincipalProxy.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' to access method 'Castle.DynamicProxy.Internal.TypeUtil.Sort(System.Reflection.MemberInfo[])' failed
It results in TypeInitializationException in LogManager.GetCurrentClassLogger().
here is the call stack:
at Castle.Proxies.ClaimsPrincipalProxy.GetObjectData(SerializationInfo, StreamingContext)
at System.Runtime.Serialization.ObjectCloneHelper.GetObjectData(Object serObj, String& typeName, String& assemName, String[]& fieldNames, Object[]& fieldValues)
at System.AppDomain.get_Evidence()
at System.AppDomain.get_Evidence()
at System.Configuration.ClientConfigPaths.GetEvidenceInfo(AppDomain appDomain, String exePath, ref String typeName)
at System.Configuration.ClientConfigPaths.GetTypeAndHashSuffix(AppDomain appDomain, String exePath)
at System.Configuration.ClientConfigPaths..ctor(String exePath, Boolean includeUserConfig)
at System.Configuration.ClientConfigPaths.GetPaths(String exePath, Boolean includeUserConfig)
at System.Configuration.ClientConfigurationHost.RequireCompleteInit(IInternalConfigRecord record)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, ref Object result, ref Object resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at NLog.Config.XmlLoggingConfiguration.get_AppConfig()
at NLog.LogFactory.get_Configuration()
at NLog.LogFactory.GetLogger(LoggerCacheKey cacheKey)
at NLog.LogFactory.GetLogger(String name)
at NLog.LogManager.GetCurrentClassLogger()
Update:
The issue happens when the unit test project references NSubstitute. So, it seems like there some dangerous combination of Web API, NSubstitute and NLog.
Update 2:
Found what upsets Nlog in Controller.
Before calling controller method I set mocked principal for Thread.CurrentPrincipal:
var principal = Substitute.For<ClaimsPrincipal>();
principal.Identity.Returns(...);
Thread.CurrentPrincipal = principal;
How could this be fixed?
The Castle assembly may be marked with the AllowPartiallyTrustedCallersAttribute, and that uses the level 2 security transparency model.
Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.
Can you try annotating your unit test (and Class) with the following attribute - [SecuritySafeCritical]
I am getting an error as soon as I’m triggering the build.
We are using TFS2012 and VS2012.
Actually I have customized the DefaultTemplate.11.1.xaml to suite project requirement.
And after adding the Custom Activities and Template we are getting an error..
TF215097: An error occurred while initializing a build for build definition \ALM\VersioningBuild: Exception Message: Expression of type 'Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings' cannot be used for return type 'Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings' (type ArgumentException)Exception Stack Trace:
at System.Linq.Expressions.Expression.ValidateLambdaArgs(Type delegateType, Expression& body, ReadOnlyCollection1 parameters) at System.Linq.Expressions.Expression.LambdaTDelegate at System.Linq.Expressions.Expression.LambdaTDelegate at Microsoft.VisualBasic.Activities.VisualBasicHelper.CompileT at Microsoft.VisualBasic.Activities.VisualBasicHelper.CompileT at Microsoft.VisualBasic.Activities.VisualBasicHelper.CompileT at Microsoft.VisualBasic.Activities.VisualBasicValue1.CacheMetadata(CodeActivityMetadata metadata) at System.Activities.CodeActivity1.OnInternalCacheMetadataExceptResult(Boolean createEmptyBindings) at System.Activities.Activity1.OnInternalCacheMetadata(Boolean createEmptyBindings) at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors) at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback) at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors) at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors) at System.Activities.Validation.ActivityValidationServices.InternalActivityValidationServices.InternalValidate() at Microsoft.TeamFoundation.Build.Workflow.WorkflowHelpers.ValidateWorkflow(Activity activity, ValidationSettings validationSettings) at Microsoft.TeamFoundation.Build.Hosting.BuildProcessCache.LoadFromXaml(String workflowXaml, TextExpressionImports textExpressionImports) at Microsoft.TeamFoundation.Build.Hosting.BuildControllerWorkflowManager.PrepareRequestForBuild(IBuildDetail build, WorkflowRequest request, IDictionary2 dataContext) at Microsoft.TeamFoundation.Build.Hosting.BuildWorkflowManager.TryStartWorkflow(WorkflowRequest request, WorkflowManagerActivity activity, BuildWorkflowInstance& workflowInstance, Exception& error, Boolean& syncLockTaken)
I’m totally stuck over here.
Any help would be much appreaciated.Thanks!!
This turn out that i was referring wrong version (Lower Version) of Microsoft.TeamFoundation.Build.Workflow in my project.
but the Build server were having higher vresion of dll.