I have a simple sandbox solution with a webpart (which loads data via Linq but thats not the point I think) and everything works fine on my development machine.
When I install this solution on another machine and add the webpart to a page I get the following exception. But I don't know why and what to do and I think its not related to my solution as I can't see any reference to my application in the stack trace.
Any idea?
Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.
[SPUserCodeSolutionExecutionFailedException: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.]
Server stack trace:
at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext executionContext, Boolean shouldUsageLog, Int32 currentProcessId)
at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext executionContext, Boolean shouldUsageLog, Int32 currentProcessId)
at Microsoft.SharePoint.UserCode.SPUserCodeAppDomain.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext executionContext, Boolean shouldUsageLog, Int32 currentProcessId)
at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcessProxyForShim.ExecuteInternal(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcessProxy.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext executionContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.ExecuteDelegate.EndInvoke(IAsyncResult result)
at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, SPUserToken userToken, String currentAffinity, SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodePoolableProcessConnection.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, SPUserToken userToken, String affinity, SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeExecutionHost.Execute(Type userCodeWrapperType, Guid siteCollectionId, SPUserToken userToken, String affinity, SPUserCodeExecutionContext executionContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.SharePoint.Administration.ISPUserCodeExecutionHostProxy.Execute(Type userCodeWrapperType, Guid siteCollectionId, SPUserToken userToken, String affinityBucketName, SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeExecutionManager.Execute(Type userCodeWrapperType, SPSite site, SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeWebPartRemoteExecutionHelper.<>c_DisplayClassa.b_9()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.UserCode.SPUserCodeWebPartRemoteExecutionHelper.ExecuteRequestInSandBox(HttpContext context, SPWeb web, SPWebPartManager manager, SPUserCodeWebPart userCodeWebPart)
[NullReferenceException: Object reference not set to an instance of an object.]
Server stack trace:
at Microsoft.SharePoint.Utilities.SPThreadContext.get_UserCodeContext()
at Microsoft.SharePoint.Utilities.SPThreadContext.get_Items()
at Microsoft.SharePoint.Utilities.SPThreadContext.Get(String key)
at Microsoft.SharePoint.Utilities.SPThreadContext.GetT
at Microsoft.SharePoint.Library.SPRequest.Dispose(Boolean disposing)
at Microsoft.SharePoint.Library.SPRequest.Dispose()
at Microsoft.SharePoint.SPWeb.InvalidateRequest()
at Microsoft.SharePoint.SPWeb.Invalidate()
at Microsoft.SharePoint.SPWeb.Close()
at Microsoft.SharePoint.SPSite.Close()
at Microsoft.SharePoint.SPSite.Dispose()
at Microsoft.SharePoint.SPSite_SubsetProxy.Dispose__Inner()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.SharePoint.SPSite_SubsetProxy.Dispose()
at Microsoft.SharePoint.SPSite.Dispose__Inner()
at Microsoft.SharePoint.SPSite.Dispose()
at Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper.Execute(SPUserCodeExecutionContext executionContext)
at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.ExecuteWrapper(SPUserCodeWrapper wrapper, SPUserCodeExecutionContext executionContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.CodeToExecuteWrapper.EndInvoke(IAsyncResult result)
at Microsoft.SharePoint.UserCode.SPUserCodeApplicationHostAppDomainRef.Execute(Type userCodeWrapperType, SPUserCodeCachedAssemblyGroup userAssemblyGroup, Guid siteCollectionId, Byte[] binaryUserCodeToken, Byte[] proxyOperationToken, SPUserCodeExecutionContext executionContext, Boolean shouldUsageLog, Int32 currentProcessId)
Check if sandboxed solutions are enabled (correspoding service is running on your server). Also check if you are actually installing this solution as a sandboxed, not as a regular or vice versa.
Related
I want to add the subitemID column in the grid of the sales prices screen, I already added it but I get an error when opening the screen, see the screenshot below:
This is the error:
Error: An error occurred during processing of the field Inventory ID: Specified cast is not valid..
System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at PX.Data.PXDataRecord.GetInt32(Int32 i) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Database\Record.cs:line 458
at PX.Data.PXDBIdentityAttribute.RowSelecting(PXCache sender, PXRowSelectingEventArgs e) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Descriptor\Attributes\DBFieldAttribute.cs:line 4624
at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Cache\ModelEventHandling.cs:line 399
at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Cache\ModelEventHandling.cs:line 315
at PX.Data.PXCache`1.Select(PXDataRecord record, Int32& position, Boolean isReadOnly, Boolean& wasUpdated) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Cache\Model.cs:line 3932
at PX.Data.PXView.GetResult(Object[] parameters, PXFilterRow[] filters, Boolean reverseOrder, Int32 topCount, PXSearchColumn[] sorts, Boolean& overrideSort, Boolean& extFilter) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Database\Cached.cs:line 3588
at PX.Data.PXView.Select(Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Database\Cached.cs:line 5943
at PX.Objects.AR.ARSalesPriceMaint.QSelect(PXGraph graph, BqlCommand bqlCommand, Object[] viewParameters) in C:\Bld\AC-FULL2019R214-JOB1\Sources\WebSites\Pure\PX.Objects\AR\ARSalesPriceMaint.cs:line 183
at PX.Objects.AR.ARSalesPriceMaint.d__14.MoveNext() in C:\Bld\AC-FULL2019R214-JOB1\Sources\WebSites\Pure\PX.Objects\AR\ARSalesPriceMaint.cs:line 154
at System.Linq.Enumerable.d__95`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at PX.Data.PXView.ToList(IEnumerable src) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Database\Cached.cs:line 6458
at _CustomMethod(Object , Object[] )
at PX.Data.PXView.InvokeDelegate(Object[] parameters) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Database\Cached.cs:line 6508
at PX.Data.PXView.Select(Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Database\Cached.cs:line 5862
at PX.Data.PXGraph.ExecuteSelect(String viewName, Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows) in C:\Bld\AC-FULL2019R214-JOB1\Sources\NetTools\PX.Data\Graph\Graph.cs:line 3422
These are the attributes of the SubItemID column:
[PXDBInt]
[PXUIField(DisplayName="SubItemID")]
[PXDefault(typeof(Search<InventoryItem.defaultSubItemID,
Where<InventoryItem.inventoryID, Equal<Current<ARSalesPrice.inventoryID>>,
And<InventoryItem.defaultSubItemOnEntry, Equal<boolTrue>>>>),
PersistingCheck = PXPersistingCheck.Nothing)]
[PXFormula(typeof(Default<ARSalesPrice.inventoryID>))]
[SubItem(typeof(ARSalesPrice.inventoryID))]
[SubItemStatusVeryfier(typeof(ARSalesPrice.inventoryID), typeof(ARSalesPrice.siteID), InventoryItemStatus.Inactive, InventoryItemStatus.NoSales)]
I want to creat it like the Sales Orders screen, see the screenshot below:
Can you help me with this?
I have had added CrossItem attribute to the InventoryID field in Appointments page. But, this caused inventory id invalid cast issue.
This is how I have added the attribute to the property.
And here is the stack trace of it.
1/4/2018 10:56:49 AM Error:
Error: An error occurred during processing of the field Inventory ID : Specified cast is not valid..
System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at PX.Data.PXDataRecord.GetInt32(Int32 i)
at PX.Data.PXDBIntAttribute.RowSelecting(PXCache sender, PXRowSelectingEventArgs e)
at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly)
at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly)
at PX.Data.PXCache`1.Select(PXDataRecord record, Int32& position, Boolean isReadOnly, Boolean& wasUpdated)
at PX.Data.PXView.GetResult(Object[] parameters, PXFilterRow[] filters, Boolean reverseOrder, Int32 topCount, PXSearchColumn[] sorts, Boolean& overrideSort, Boolean& extFilter)
at PX.Data.PXView.Select(Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Data.PXView.SelectMultiBound(Object[] currents, Object[] parameters)
at PX.Data.PXSelectBase`1.selectBound(Object[] currents, Object[] arguments)
at PX.Objects.FS.AppointmentEntry.FSServiceOrder_RowSelected(PXCache cache, PXRowSelectedEventArgs e) in F:\Bld2\AC-FULL2017R201-JOB1\sources\WebSites\Pure\PX.Objects.FS\AppointmentEntry.cs:line 6983
at PX.Data.PXRowSelected.Invoke(PXCache sender, PXRowSelectedEventArgs e)
at PX.Data.PXCache.OnRowSelected(Object item)
at PX.Data.PXCache`1.set_Current(Object value)
at PX.Data.PXGraph.ExecuteSelect(String viewName, Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Data.PXGraph.ExecuteSelect(String viewName, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
at PX.Web.UI.PXDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
at PX.Web.UI.PXDataSourceView.Select(DataSourceSelectArguments arguments, PXDSSelectArguments swarguments, DataSourceViewSelectCallback callback)
at PX.Web.UI.PXFormDataProvider.DataBind()
at PX.Web.UI.PXBoundPanel.PerformSelect()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at PX.Web.UI.PXBoundPanel.OnAfterSelect(PXFormDataProvider provider)
at PX.Web.UI.PXFormDataProvider.a(IEnumerable A_0)
at PX.Web.UI.PXFormDataProvider.DataBind()
at PX.Web.UI.PXCallbackManager.a(Dictionary`2 A_0, List`1 A_1)
at PX.Web.UI.PXCallbackManager.a(PXCallbackResultMethod A_0, XmlWriter A_1)
at PX.Web.UI.PXCallbackManager.a(PXCallbackResultMethod A_0)
I have had the same issue in Service Orders page too. How do I resolve this issue?
Thanks.
This error happens because of duplicated attributes on the InventoryID field: the Append to Original option will always append the list of original attributes with your custom ones.
The error should be resolved after you switch to the Replace Original option, as shown in the screenshot below:
Well, the problem is that I have a webpart, that creates a Timer with special parameters..
When I try to create it, I get an error access denied.
The fact is that I us a system administration account, I've changed the RemoteAdministratorAccessDenied to false and added writeaccess to Sharepoint folder gor wss..
But I still get an error...
Logs are:
Files High UserAgent not available, file operations may not be optimized. at Microsoft.SharePoint.SPFileStreamManager.CreateCobaltStreamContainer(SPFileStreamStore spfs, ILockBytes ilb, Boolean copyOnFirstWrite, Boolean disposeIlb) at Microsoft.SharePoint.SPFileStreamManager.SetInputLockBytes(SPFileInfo& fileInfo, SqlSession session, PrefetchResult prefetchResult) at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBufferFactory.CreateFromDocumentRowset(Guid databaseId, SqlSession session, SPFileStreamManager spfstm, Object[] metadataRow, SPRowset contentRowset, SPDocumentBindRequest& dbreq, SPDocumentBindResults& dbres) at Microsoft.SharePoint.SPSqlClient.GetDocumentContentRow(Int32 rowOrd, Object ospFileStmMgr, SPDocumentBindRequest& dbreq, SPDocumentBindResults& dbres) at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAndMetaInfo(String bstrUrl, Byte bPageView, Byte bPageMode, Byte bGetBuildDependencySet, String bstrCurrentFolderUrl, Int32 iRequestVersion, Byte bMainFileRequest, Boolean& pbCanCustomizePages, Boolean& pbCanPersonalizeWebParts, Boolean& pbCanAddDeleteWebParts, Boolean& pbGhostedDocument, Boolean& pbDefaultToPersonal, Boolean& pbIsWebWelcomePage, String& pbstrSiteRoot, Guid& pgSiteId, UInt32& pdwVersion, String& pbstrTimeLastModified, String& pbstrContent, UInt32& pdwPartCount, Object& pvarMetaData, Object& pvarMultipleMeetingDoclibRootFolders, String& pbstrRedirectUrl, Boolean& pbObjectIsList, Guid& pgListId, UInt32& pdwItemId, Int64& pllListFlags, Boolean& pbAccessDenied, Guid& pgDocid, Byte& piLevel, UInt64& ppermMask, Object& pvarBuildDependencySet, UInt32& pdwNumBuildDependencies, Object& pvarBuildDependencies, String& pbstrFolderUrl, String& pbstrContentTypeOrder, Guid& pgDocScopeId) at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAndMetaInfo(String bstrUrl, Byte bPageView, Byte bPageMode, Byte bGetBuildDependencySet, String bstrCurrentFolderUrl, Int32 iRequestVersion, Byte bMainFileRequest, Boolean& pbCanCustomizePages, Boolean& pbCanPersonalizeWebParts, Boolean& pbCanAddDeleteWebParts, Boolean& pbGhostedDocument, Boolean& pbDefaultToPersonal, Boolean& pbIsWebWelcomePage, String& pbstrSiteRoot, Guid& pgSiteId, UInt32& pdwVersion, String& pbstrTimeLastModified, String& pbstrContent, UInt32& pdwPartCount, Object& pvarMetaData, Object& pvarMultipleMeetingDoclibRootFolders, String& pbstrRedirectUrl, Boolean& pbObjectIsList, Guid& pgListId, UInt32& pdwItemId, Int64& pllListFlags, Boolean& pbAccessDenied, Guid& pgDocid, Byte& piLevel, UInt64& ppermMask, Object& pvarBuildDependencySet, UInt32& pdwNumBuildDependencies, Object& pvarBuildDependencies, String& pbstrFolderUrl, String& pbstrContentTypeOrder, Guid& pgDocScopeId) at Microsoft.SharePoint.Library.SPRequest.GetFileAndMetaInfo(String bstrUrl, Byte bPageView, Byte bPageMode, Byte bGetBuildDependencySet, String bstrCurrentFolderUrl, Int32 iRequestVersion, Byte bMainFileRequest, Boolean& pbCanCustomizePages, Boolean& pbCanPersonalizeWebParts, Boolean& pbCanAddDeleteWebParts, Boolean& pbGhostedDocument, Boolean& pbDefaultToPersonal, Boolean& pbIsWebWelcomePage, String& pbstrSiteRoot, Guid& pgSiteId, UInt32& pdwVersion, String& pbstrTimeLastModified, String& pbstrContent, UInt32& pdwPartCount, Object& pvarMetaData, Object& pvarMultipleMeetingDoclibRootFolders, String& pbstrRedirectUrl, Boolean& pbObjectIsList, Guid& pgListId, UInt32& pdwItemId, Int64& pllListFlags, Boolean& pbAccessDenied, Guid& pgDocid, Byte& piLevel, UInt64& ppermMask, Object& pvarBuildDependencySet, UInt32& pdwNumBuildDependencies, Object& pvarBuildDependencies, String& pbstrFolderUrl, String& pbstrContentTypeOrder, Guid& pgDocScopeId) at Microsoft.SharePoint.SPWeb.GetWebPartPageContent(Uri pageUrl, Int32 pageVersion, PageView requestedView, HttpContext context, Boolean forRender, Boolean includeHidden, Boolean mainFileRequest, Boolean fetchDependencyInformation, Boolean& ghostedPage, String& siteRoot, Guid& siteId, Int64& bytes, Guid& docId, UInt32& docVersion, String& timeLastModified, Byte& level, Object& buildDependencySetData, UInt32& dependencyCount, Object& buildDependencies, SPWebPartCollectionInitialState& initialState, Object& oMultipleMeetingDoclibRootFolders, String& redirectUrl, Boolean& ObjectIsList, Guid& listId) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.FetchWebPartPageInformationForInit(HttpContext context, SPWeb spweb, Boolean mainFileRequest, String path, Boolean impersonate, Boolean& isAppWeb, Boolean& fGhostedPage, Guid& docId, UInt32& docVersion, String& timeLastModified, SPFileLevel& spLevel, String& masterPageUrl, String& customMasterPageUrl, String& webUrl, String& siteUrl, Guid& siteId, Object& buildDependencySetData, SPWebPartCollectionInitialState& initialState, String& siteRoot, String& redirectUrl, Object& oMultipleMeetingDoclibRootFolders, Boolean& objectIsList, Guid& listId, Int64& bytes) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.GetWebPartPageData(HttpContext context, String path, Boolean throwIfFileNotFound) at Microsoft.SharePoint.ApplicationRuntime.SPVirtualPathProvider.GetCacheKey(String virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate) at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) at System.Web.UI.Page.ApplyMasterPage() at System.Web.UI.Page.PerformPreInit() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) 1943e19c-0621-f067-2b10-e7a998b0b192
Publishing High [Forced due to logging gap, cached # 01/19/2015 14:47:19.27, Original Level: Verbose] Attempting to load XML from config file "{0}". 1943e19c-0621-f067-2b10-e7a998b0b192
Publishing High [Forced due to logging gap, Original Level: Verbose] ConsoleNodeCollection constructed from XML. 1943e19c-0621-f067-2b10-e7a998b0b192
Database High [Forced due to logging gap, cached # 01/19/2015 14:47:19.31, Original Level: Verbose] SQL connection time: 0.0800381054016642 for Data Source=mssql-portal;Initial Catalog=nknpz_test_Content_Portal;Integrated Security=True;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;Connect Timeout=15;Application Name=SharePoint[w3wp][2][nknpz_test_Content_Portal] 1943e19c-0621-f067-2b10-e7a998b0b192
Database High [Forced due to logging gap, Original Level: VerboseEx] Reverting to process identity 1943e19c-0621-f067-2b10-e7a998b0b192
Runtime Critical Нет доступа. 1943e19c-0621-f067-2b10-e7a998b0b192
General High Getting Error Message for Exception System.Security.SecurityException: Нет доступа. at Microsoft.SharePoint.Administration.SPPersistedObject.set_Name(String value) at PMPrimaveraIntegration.Business.PrimaveraSync.PrimaveraSyncJob..ctor(String jobTitle, SPList list, String primaveraItemId, SPSchedule schedule) at PMPrimaveraIntegration.Business.Models.JobSettingsModel.<>c__DisplayClass1f.<CreateWbsSyncJob>b__1e() at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunEleva... 1943e19c-0621-f067-2b10-e7a998b0b192ted secureCode) at PMPrimaveraIntegration.Presentation.Presenters.JobSettingsPresenter.CreateJob() at PMPrimaveraIntegration.Layouts.PMPrimaveraIntegration.JobSettings.OkClick(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) The Zone of the assembly that failed was: MyComputer 1943e19c-0621-f067-2b10-e7a998b0b192
General Monitorable Возникла неожиданная ошибка. 1943e19c-0621-f067-2b10-e7a998b0b192
Micro Trace High Micro Trace Tags: 0 ak8dj,359 ajlz0,1 aat87 1943e19c-0621-f067-2b10-e7a998b0b192
This is due to a new security feature implemented in SharePoint 2010
RemoteAdministratorAccessDenied is a persisted property which can be set to false to disable the feature. You can do this either in a Console app or use Powershell and then perform an IISReset.
//Console app code
SPWebService myService = SPWebService.ContentService;
myService.RemoteAdministratorAccessDenied = false;
myService.Update();
//PowerShell code
function Set-RemoteAdministratorAccessDenied-False() {
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration")
$null
# get content web service
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
# turn off remote administration security
$contentService.RemoteAdministratorAccessDenied = $false $contentService.Update() }
Set-RemoteAdministratorAccessDenied-False
refer to http://support.microsoft.com/kb/2564009
I have a C# solution containing Postsharp v3, Resharper 8, Redgate SqlBundle and .Net toolbet + some very large T4 template generated code.
When generating code from templates and attempting to open them up a folder on my hard disk ..\AppData\Local\Red Gate\Logs\SQL Connect 1* fills up with 50 MB log files every 4 or 5 seconds. All with very similar content.
14:49:01.331|Trace |g.TraceLoggerAdapter|1 |#1:devenv.exe Information: 0 : at at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at RedGate.SQLConnect.VsPackage.Logging.TraceLoggerAdapter.WriteLine(String message)
at RedGate.SQLConnect.VsPackage.Logging.TraceLoggerAdapter.Write(String message)
at System.Diagnostics.TraceListener.WriteHeader(String source, TraceEventType eventType, Int32 id)
at System.Diagnostics.TraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
at System.Diagnostics.TraceInternal.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
at PostSharp.VisualStudio.Services.Language.CodeParsingService.CodeElementVisitor.PostSharp.VisualStudio.Services.Language.ICodeElementVisitor.VisitCodeElement(String codeElementName, CodeElement codeElement, String semantic, ICodeLocator codeLocator)
at PostSharp.VisualStudio.Services.Language.CSharp.CSharpLanguageAdapter.VisitCodeProperty(CodeProperty codeProperty, String parentName, ICodeElementVisitor activator)
at PostSharp.VisualStudio.Services.Language.BaseLanguageAdapter.VisitCodeElement(CodeElement codeElement, String parentName, ICodeElementVisitor activator)
at PostSharp.VisualStudio.Services.Language.BaseLanguageAdapter.VisitCodeType(CodeType codeType, ICodeElementVisitor activator)
at PostSharp.VisualStudio.Services.Language.BaseLanguageAdapter.VisitCodeElement(CodeElement codeElement, String parentName, ICodeElementVisitor activator)
at PostSharp.VisualStudio.Services.Language.BaseLanguageAdapter.VisitCodeElement(CodeElement codeElement, String parentName, ICodeElementVisitor activator)
at PostSharp.VisualStudio.Services.Language.BaseLanguageAdapter.VisitCodeElement(CodeElement codeElement, ICodeElementVisitor visitor)
at PostSharp.VisualStudio.Services.Language.CodeParsingService.GetEnhancedCodeElements(FileCodeModel fileCodeModel)
at PostSharp.VisualStudio.View.Markers.TextMarkerLayer.ScanSnapshot(ITextSnapshot textSnapshot)
at PostSharp.VisualStudio.View.Markers.TextMarkerLayer.AddAdornments()
at PostSharp.VisualStudio.View.Markers.TextMarkerLayer.OnLayoutChangedDelayed(Object sender, EventArgs e)
at PostSharp.VisualStudio.View.QuietPeriodTimer.OnTick(Object sender, EventArgs e)
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
14:49:01.331|Trace |g.TraceLoggerAdapter|1 |#1:Scanning code element Petex.DP.Service.Requests.DpObject_GetDpObjectAllContainingRequest.RelatedToIDs of type vsCMElementProperty. at at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at RedGate.SQLConnect.VsPackage.Logging.TraceLoggerAdapter.WriteLine(String message)
at System.Diagnostics.TraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
at System.Diagnostics.TraceInternal.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
at PostSharp.VisualStudio.Services.Language.CodeParsingService.CodeElementVisitor.PostSharp.VisualStudio.Services.Language.ICodeElementVisitor.VisitCodeElement(String codeElementName, CodeElement codeElement, String semantic, ICodeLocator codeLocator)
at PostSharp.VisualStudio.Services.Language.CSharp.CSharpLanguageAdapter.VisitCodeProperty(CodeProperty codeProperty, String parentName, ICodeElementVisitor activator)
at PostSharp.VisualStudio.Services.Language.BaseLanguageAdapter.VisitCodeElement(CodeElement codeElement, String parentName, ICodeElementVisitor activator)
at PostSharp.VisualStudio.Services.Language.BaseLanguageAdapter.VisitCodeType(CodeType codeType, ICodeElementVisitor activator)
at PostSharp.VisualStudio.Services.Language.BaseLanguageAdapter.VisitCodeElement(CodeElement codeElement, String parentName, ICodeElementVisitor activator)
at PostSharp.VisualStudio.Services.Language.BaseLanguageAdapter.VisitCodeElement(CodeElement codeElement, String parentName, ICodeElementVisitor activator)
at PostSharp.VisualStudio.Services.Language.BaseLanguageAdapter.VisitCodeElement(CodeElement codeElement, ICodeElementVisitor visitor)
at PostSharp.VisualStudio.Services.Language.CodeParsingService.GetEnhancedCodeElements(FileCodeModel fileCodeModel)
at PostSharp.VisualStudio.View.Markers.TextMarkerLayer.ScanSnapshot(ITextSnapshot textSnapshot)
at PostSharp.VisualStudio.View.Markers.TextMarkerLayer.AddAdornments()
at PostSharp.VisualStudio.View.Markers.TextMarkerLayer.OnLayoutChangedDelayed(Object sender, EventArgs e)
at PostSharp.VisualStudio.View.QuietPeriodTimer.OnTick(Object sender, EventArgs e)
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
Any ideas how to stop this as its crippling my dev environment?
This is caused by the combination of the PostSharp and Redgate behaviors.
PostSharp produces trace messages periodically and they are not written to any file normally. You can see the messages only if you enable the diagnostics window in the advanced PostSharp options.
Redgate on the other hand installs trace listeners that catch messages including those produced by the PostSharp and write them to the log files, on top of that it seems to add a stack trace to each message (even if it's not an exception).
It's an unfortunate combination of factors. As for the PostSharp, there's a fix scheduled that will disable tracing completely unless user enables diagnostics window explicitly.
ok....So im clicking on 'Users' on the dashboard which navigates to
Orchard.Web/Modules/Orchard.Users/Views/Admin/index.cshtml
which throws an error:
Value cannot be null or empty.
Parameter name: linkText with the #Html.ActionLink(entry.User.UserName, "Edit", new { entry.User.Id })
went through it with debug and entry.user.Username returns null. I've tried with a normal user and an admin logged in....not sure why or when this started happening last time I tried the users page was working....anyone know why?
Stack:
at System.Web.Mvc.Html.LinkExtensions.ActionLink(HtmlHelper htmlHelper, String linkText, String actionName, String controllerName, RouteValueDictionary routeValues, IDictionary`2 htmlAttributes)
at System.Web.Mvc.Html.LinkExtensions.ActionLink(HtmlHelper htmlHelper, String linkText, String actionName, Object routeValues)
at ASP._Page_Modules_Orchard_Users_Views_admin_Index_cshtml.Execute() in c:\WORK\BoireannSVN\trunk\VS\Orchard1.6.1\Orchard.Source\src\Orchard.Web\Modules\Orchard.Users\Views\Admin\Index.cshtml:line 65
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at Orchard.Mvc.ViewEngines.ThemeAwareness.LayoutAwareViewEngine.<>c__DisplayClass7.<FindView>b__5(ViewContext viewContext, TextWriter writer, IViewDataContainer viewDataContainer) in C:\WORK\BoireannSVN\trunk\VS\Orchard1.6.1\Orchard.Source\src\Orchard\Mvc\ViewEngines\ThemeAwareness\LayoutAwareViewEngine.cs:line 59
at Orchard.Mvc.ViewEngines.ThemeAwareness.LayoutAwareViewEngine.LayoutView.Render(ViewContext viewContext, TextWriter writer) in C:\WORK\BoireannSVN\trunk\VS\Orchard1.6.1\Orchard.Source\src\Orchard\Mvc\ViewEngines\ThemeAwareness\LayoutAwareViewEngine.cs:line 90
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)