After a few days running our Orchard CMS homepage our site went offline. A site restart was not sufficient. I had to restart/recycle the application pool. Then the site was running again. The error log shows the following message.
I have my Orchard site running on a network mapping. So I think such an error could happen after connection interrupt to the network drive?
2014-09-09 01:39:29,260 [8] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default
(null)
System.ArgumentException: Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.
bei System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
bei Orchard.Data.Conventions.RecordTableNameConvention..ctor(IEnumerable`1 descriptors)
bei Orchard.Data.Providers.AbstractDataServicesProvider.CreatePersistenceModel(ICollection`1 recordDescriptors)
bei Orchard.Data.Providers.AbstractDataServicesProvider.BuildConfiguration(SessionFactoryParameters parameters)
bei Orchard.Data.SessionFactoryHolder.<>c__DisplayClass5.<BuildConfiguration>b__2()
bei Orchard.Data.SessionConfigurationCache.GetConfiguration(Func`1 builder)
bei Orchard.Data.SessionFactoryHolder.BuildConfiguration()
bei Orchard.Data.SessionFactoryHolder.GetConfiguration()
bei Orchard.Data.SessionFactoryHolder.GetSessionFactory()
bei Orchard.Data.SessionLocator.Demand()
bei Orchard.Data.SessionLocator.For(Type entityType)
bei Orchard.Data.Repository`1.get_Table()
bei Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor()
bei Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings)
bei Orchard.Environment.DefaultOrchardHost.<CreateAndActivateShells>b__7(ShellSettings settings)
2014-09-09 01:39:29,979 [8] Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default
(null)
Just found out it is actually a server farm. It is not synced sometimes. So I guess this is the cause. The error message would match then, as it tries to add a key that has been added already. When the two fileservers are not synchronised it is random what you get and to which instance you are talking.
Related
I have got the below error after running the VitroCommerce which is required for open commerce manager:
ERROR DETAILS
Following errors were detected during this operation.
* [2/26/2015 2:37:26 PM] System.Deployment.Application.InvalidDeploymentException (Zone)
- Deployment and application do not have matching security zones.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
What browser did you use? Only Internet Explorer works "out of the box". Other browsers need addons to enable this feature.
I have deployed one Lightswitch application. Details are:
Used VS2013
Have HTML Client for application
Have desktop client deployed in web for role/users/permission management
Used windows authentication and allow access to only those mentioned in aspnet provider database(desktop client)
IIS7.5
I am getting some error when I access the page, it give be below error.
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.]
Microsoft.LightSwitch.Utilities.Server.Internal.ServerRequestSecurityState.GetSecurityGroupsForCurrentUser(IWindowsIdentity identity) +56
Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsWindowsUserRegistered(IPrincipal principal, ServerRequestSecurityState state) +373
Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsUserRegistered(IPrincipal principal) +317
Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.AuthenticateRequest(HttpContextBase context, HttpStatusCode& status, Exception& authException) +201
Microsoft.LightSwitch.WebHost.Implementation.LightSwitchHttpModule.HandlePostAuthenticateRequest() +201
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +164
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446
Following is the warning logged in event log.
+ System
- Provider
[ Name] ASP.NET 4.0.30319.0
- EventID 1309
[ Qualifiers] 32768
Level 3
Task 3
Keywords 0x80000000000000
- TimeCreated
[ SystemTime] 2014-08-01T15:03:43.000000000Z
EventRecordID 107901
Channel Application
Computer <DELETED>
Security
- EventData
3005
An unhandled exception has occurred.
8/1/2014 8:33:43 PM
8/1/2014 3:03:43 PM
e6e596e599ff4465968b9afeb7739958
183
58
0
/LM/W3SVC/8/ROOT-1-130513779129486922
Full
/
D:\PublishedWebsites\CustomerComplaints\
<DELEED>
8976
w3wp.exe
IIS APPPOOL\CustomerComplaints
NullReferenceException
Object reference not set to an instance of an object. at Microsoft.LightSwitch.Utilities.Server.Internal.ServerRequestSecurityState.GetSecurityGroupsForCurrentUser(IWindowsIdentity identity) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsWindowsUserRegistered(IPrincipal principal, ServerRequestSecurityState state) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsUserRegistered(IPrincipal principal) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.AuthenticateRequest(HttpContextBase context, HttpStatusCode& status, Exception& authException) at Microsoft.LightSwitch.WebHost.Implementation.LightSwitchHttpModule.HandlePostAuthenticateRequest() at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
http://<CurrentMachine>:8451/CustomerComplaints/
/CustomerComplaints/
::1
False
IIS APPPOOL\CustomerComplaints
34
IIS APPPOOL\CustomerComplaints
False
at Microsoft.LightSwitch.Utilities.Server.Internal.ServerRequestSecurityState.GetSecurityGroupsForCurrentUser(IWindowsIdentity identity) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsWindowsUserRegistered(IPrincipal principal, ServerRequestSecurityState state) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.IsUserRegistered(IPrincipal principal) at Microsoft.LightSwitch.Utilities.Server.Internal.SecurityHelper.AuthenticateRequest(HttpContextBase context, HttpStatusCode& status, Exception& authException) at Microsoft.LightSwitch.WebHost.Implementation.LightSwitchHttpModule.HandlePostAuthenticateRequest() at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I believe it is something wrong with my IIS settings, but not sure. I tried to search cause and solution but not getting any clue.
I am configuring MS Dynamics connector for synchronising MS CRM 2011 and MS AX 2012.
It has been working fine with some Entities, but I cannot get the Account to work.
I have enabled the Address during the configuration and I can sync Customer Services with their Adresses into CRM's account, but not the other way around.
I have enabled the tracing for the connector and here is the error I get:
12/17/2013 14:21:27: task 2a6bcf1c-d62a-4f5d-af04-a465d48eb61f is WaitingToRun
12/17/2013 14:21:27: task 2a6bcf1c-d62a-4f5d-af04-a465d48eb61f is Running
12/17/2013 14:21:27: RetryTask starts execution. This is RetryTask attempt 3.
VERBOSE TID:TP-33 [2013-12-17T15:21:27.6853306+01:00]: [Retry : Retry key : [999999999911, e3187a8a-2567-e311-9f44-0050569239ef]] has started to read.
VERBOSE TID:TP-33 [2013-12-17T15:21:27.6853306+01:00]: Making "Retrieve" request on entity "" with conditions "" to CRM.
WARNING TID:TP-50 [2013-12-17T15:21:30.9146341+01:00]: An unrecognized exception was thrown [mscorlib::0x80131501].
ERROR TID:TP-50 [2013-12-17T15:21:30.9146341+01:00]: [Account to Customer Service] has encountered an error while reading records. Processing will be aborted. Error text: A record level exception has occurred for record [999999999912, 10d0bb3d-2667-e311-9f44-0050569239ef]. Error text : Request Failed. See the Exception Log for details.
--- Exception Dump ---
Caught Exception: [Microsoft.Dynamics.Integration.Service.Tasks.RecordException] A record level exception has occurred for record [999999999912, 10d0bb3d-2667-e311-9f44-0050569239ef]. Error text : Request Failed. See the Exception Log for details.
Stack trace:
Inner Exception: [System.ServiceModel.FaultException`1[schemas.microsoft.com.dynamics._2008._01.documents.Fault.AifFault]] Request Failed. See the Exception Log for details.
Stack trace:
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
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 ConnCustomerOrgService.create(ConnCustomerOrgServiceCreateRequest request)
at ConnCustomerOrgServiceClient.create(CallContext CallContext, AxdConnCustomerOrg ConnCustomerOrg)
at Microsoft.Dynamics.Integration.Adapters.AX2012.DynamicServiceObjectProviderBase.WriteObject(Object value)
at Microsoft.Dynamics.Integration.Service.Tasks.RecordWork.DoRecordWork(DbMap map, Object key, OperationType operationType, DateTime startTime, String loggingSourceName)
task Account to Customer Service log event : Warning ...
task 6ef94c7f-a5cf-46bc-8be6-93fb2f06dc80 retry at 12/17/2013 14:21:30.
task Account to Customer Service progress at 100% ...
How is it possible to solve it?
I am having a strange error with publishing my website to Azure. I published it to the service using VS 2010 but then have run into this error in connecting my database to the website. The login page works, as do most of the pages on the site, even those that rely on the very same database. The page with the issue comes up with the following text:
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.]
MAO.Controllers.ReviewController.Index() +603
lambda_method(Closure , ControllerBase , Object[] ) +62
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +214
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +55
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +253
System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +21
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +253
System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +21
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +191
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +324
System.Web.Mvc.Controller.ExecuteCore() +106
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +91
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +34
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +19
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +48
System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9629708
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
The error occurs within the following section of code:
public ActionResult ShortDateResponse(int reviewId, int questionId, string response) {
if (string.IsNullOrEmpty(response)) {
var answer = repository.GetAnswerByQuestionId(reviewId, questionId);
if (answer != null) {
repository.DeleteAnswerById(answer.Id);
}
} else {
try {
DateTime date = DateTime.ParseExact(response, "MM/yyyy", CultureInfo.InvariantCulture);
repository.ShortDateResponse(reviewId, questionId, date);
} catch (Exception fe) {
throw new ArgumentException("Date format should be MM/yyyy", fe);
}
}
return Json(new {
success = true,
error = "none"
});
}
on this line:
DateTime date = DateTime.ParseExact(response, "MM/yyyy", CultureInfo.InvariantCulture);
As such, it seems to me the code is not responsible.
I have tried uploading the database to Azure multiple different ways, and according to the various Microsoft tutorials, and have reviewed others who have presented very similar questions on SO and other places. At this point I am not sure how to move forward, so I'm asking.
Initially, I used SQL Management Studio 2008R's "Extract Data-Tier Application" and "Import Data-Tier Application" to load the schema for the database, then "Export Data" and "Import Data" to load up the data onto the server. I ensured that the commandtimeout variable was sat to 0 for all tables so nothing would get lost along the way, and sure enough, everything showed up on the Azure database.
When this presented the aforementioned error, I attempted to use the "Generate scripts" to upload the schema, in case there had been some error with my previous process. I then used Export/Import Data to put the data on the website. I received the same error.
This website does work properly on internal servers, an has been deployed successfully elsewhere, but I'd like to migrate to Azure if possible. Also, I have checked the uploaded website linked to local SQL servers and it has worked properly, so the issue lies in the upload of the SQL database to Azure servers.
I am aware that many people with this error have been able to solve it by editing their connection strings within web.config. I have looked into this, and have manually edited my connection string via Filezilla to the format put forth on various websites, to no avail.
I would really appreciate any insights you have, and let me know if you need more details. Thank you!
One thought is that it might be the firewall rule on the SQL Azure instance. In the Windows Azure Management Portal, go to the "Configure" page for that SQL Azure server. Is it set to "Yes" for allow windows azure services?
Can you also post the code for the controller action MAO.Controllers.ReviewController.Index() so we can see where the null reference exception occurs?
I am trying to deploy an Orchard website to a Windows 2008 R2 server using Microsoft web deploy. Web matrix is able to add the test files but as soon as it comes time to publish, I get the following error
Unable to publish. Unable to publish.
Error detail:
(2011/12/10 05:59:03 PM) An error occurred when the request was processed on the remote computer.
at Microsoft.Web.Deployment.StatusThreadHandler.CheckForException()
at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentWellKnownProvider provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.WebMatrix.Deployment.MsDeployWorker.Execute(Boolean pullback)
Missing source parameter 'Database Password' (Password for the Database Username.). This must be set for successful synchronization.
at Microsoft.Web.Deployment.ParameterizationRuleHandler.PreSync(DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable)
at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentWorkerRequest workerRequest)
I am using Sql Compact but I can't figure out what the problem might be.
Didn't WebMatrix ask you for the connection string of the remote database? The password should be specified in there.
See http://help.webcontrolcenter.com/KB/a1508/webmatrix-web-deploy-settings.aspx