Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I can't seem to get this to work on my local server but I'm able to run my project on other servers just fine. I am not sure why I can't get it to run locally.
System.Web.HttpException: Request is not available in this context
[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpContext.get_Request() +12741358
Sitecore.Security.Authentication.FormsAuthenticationHelper.GetCurrentUser() +134
Sitecore.Security.Authentication.AuthenticationHelper.GetActiveUser() +24
Sitecore.Security.AccessControl.ItemAccess.IsAllowed(Item item, AccessRight accessRight) +39
Sitecore.Data.Managers.ItemProvider.ApplySecurity(Item item, SecurityCheck securityCheck) +113
Sitecore.Data.Managers.ItemManager.GetItem(ID itemId, Language language, Version version, Database database) +257
Sitecore.Data.TemplateRecords.GetTemplate(ID templateID, Language language) +168
Sitecore.Sharedsource.Tasks.TemplateConfigurationBuilder.Create(Database database, XmlNode configNode) +386
Sitecore.Sharedsource.Tasks.NewsMover.AddTemplateConfiguration(XmlNode configNode) +69
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +193
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties) +832
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +759
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +296
Sitecore.Events.EventSubscribers.Add(String eventName, XmlNode configNode) +235
Sitecore.Events.Event.GetConfigSubscribers() +379
Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters) +373
Sitecore.Data.DataProviders.Sql.SqlDataProvider.SetProperty(String parameterName, String value, CallContext context) +313
Sitecore.Data.DataProviders.DataProvider.SetProperty(String name, String value, CallContext context, DataProviderCollection providers) +138
Sitecore.ContentSearch.Maintenance.IndexDatabasePropertyStore.Set(String key, String value) +229
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +193
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties) +832
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +759
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +296
Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +666
Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration() +261
Sitecore.ContentSearch.SolrProvider.SolrContentSearchManager.get_Cores() +77
Sitecore.ContentSearch.SolrProvider.CastleWindsorIntegration.WindsorSolrStartUp.Initialize() +57
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12962661
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12979668
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12819261
May or may not help, but according to MSDN, this exception will be thrown if your web application is running under IIS 7 in Integrated mode. Are you aware if that's the case?
Edit: Reading further it seems it's a combination of IIS 7 in integrated mode, plus accessing a request object from a method that was eventually called by Application_Start
Related
Locally the project works, the issue is when released on Azure Web App.
`public List GetAllExpantedTextAds(long adGroupId)
{
List expandedTextAds = new List();
GoogleAdsClient client = new GoogleAdsClient();
GoogleAdsConfig config = (client.Config as GoogleAdsConfig);
GoogleAdsServiceClient googleAdsService = client.GetService(Services.V10.GoogleAdsService);
// Create a selector.
string searchQuery = $#"SELECT
ad_group.id,
ad_group_ad.ad.id,
ad_group_ad.ad.expanded_text_ad.headline_part1,
ad_group_ad.ad.expanded_text_ad.headline_part2,
ad_group_ad.ad.expanded_text_ad.path1,
ad_group_ad.ad.expanded_text_ad.path2,
ad_group_ad.ad.expanded_text_ad.description,
ad_group_ad.status
FROM ad_group_ad
WHERE
ad_group_ad.ad.type = EXPANDED_TEXT_AD
AND ad_group_ad.status = 'ENABLED'";
if (adGroupId != null)
{
searchQuery += $" AND ad_group.id = {adGroupId}";
}
// Create a request that will retrieve all ads using pages of the specified page size.
SearchGoogleAdsRequest request = new SearchGoogleAdsRequest()
{
CustomerId = customerId.ToString(),
PageSize = PAGE_SIZE,
Query = searchQuery
};
//try
//{
// Issue the search request.
PagedEnumerable<SearchGoogleAdsResponse, GoogleAdsRow> searchPagedResponse =
googleAdsService.Search(request);
// Iterates over all rows in all pages and prints the requested field values for
// the ad in each row.
foreach (GoogleAdsRow googleAdsRow in searchPagedResponse)
{
Ad ad = googleAdsRow.AdGroupAd.Ad;
ExpandedTextAdInfo expandedTextAdInfo = ad.ExpandedTextAd;
Console.WriteLine("Expanded text ad with ID {0}, status '{1}', and headline " +
"'{2} - {3}' was found in ad group with ID {4}.",
ad.Id, googleAdsRow.AdGroupAd.Status, expandedTextAdInfo.HeadlinePart1,
expandedTextAdInfo.HeadlinePart2, googleAdsRow.AdGroup.Id);
// Prints the ad text asset detail.
expandedTextAds.Add(expandedTextAdInfo);
}
//}
//catch (GoogleAdsException e)
//{
// Console.WriteLine("Failure:");
// Console.WriteLine($"Message: {e.Message}");
// Console.WriteLine($"Failure: {e.Failure}");
// Console.WriteLine($"Request ID: {e.RequestId}");
// throw;
//}
return expandedTextAds;
}`
Below follows the error I get.
[AmbiguousMatchException: Multiple custom attributes of the same type found.]
System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) +110
System.Runtime.InteropServices.RuntimeInformation.get_FrameworkDescription() +88
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +92
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +190
System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) +57
System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) +21
Grpc.Core.Internal.PlatformApis.TryGetFrameworkDescription() +83
Grpc.Core.Internal.PlatformApis..cctor() +92
[TypeInitializationException: The type initializer for 'Grpc.Core.Internal.PlatformApis' threw an exception.]
Grpc.Core.Internal.PlatformApis.get_FrameworkDescription() +0
Grpc.Core.Internal.UserAgentStringProvider..cctor() +25
[TypeInitializationException: The type initializer for 'Grpc.Core.Internal.UserAgentStringProvider' threw an exception.]
Grpc.Core.Internal.UserAgentStringProvider.get_DefaultInstance() +0
Grpc.Core.Channel.EnsureUserAgentChannelOption(Dictionary2 options) +89 Grpc.Core.Channel..ctor(String target, ChannelCredentials credentials, IEnumerable1 options) +169
Grpc.Core.Channel..ctor(String host, Int32 port, ChannelCredentials credentials, IEnumerable1 options) +68 Google.Ads.GoogleAds.Lib.CachedChannelFactory.CreateChannel(GoogleAdsConfig config) +567 Google.Ads.GoogleAds.Lib.CachedChannelFactory.GetChannel(GoogleAdsConfig config) +882 Google.Ads.GoogleAds.Lib.GoogleAdsServiceClientFactory.CreateChannel(GoogleAdsConfig config) +71 Google.Ads.GoogleAds.Lib.GoogleAdsServiceClientFactory.GetService(ServiceTemplate2 serviceTemplate, GoogleAdsConfig config) +102
Google.Ads.GoogleAds.Lib.GoogleAdsClient.GetService(ServiceTemplate`2 serviceTemplate) +170
portalcouponology.Classes.GoogleAdsAPI.GetAllExpantedTextAds(Int64 adGroupId) in D:\a\9\s\portalcouponology\Classes\GoogleAdsAPI.cs:810
portalcouponology.pages.store.WebForm1.loadGoogleAds(String custid) in D:\a\9\s\portalcouponology\pages\store\edit-merchant.aspx.cs:82
portalcouponology.pages.store.WebForm1.Page_Load(Object sender, EventArgs e) in D:\a\9\s\portalcouponology\pages\store\edit-merchant.aspx.cs:42
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
System.Web.UI.Control.OnLoad(EventArgs e) +79
System.Web.UI.Control.LoadRecursive() +130
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2850
i am facing below exception when i am trying to use bundle transformer to transform .less file, this issue seems to occur intermittently and not always.
As i can see there is some Win32 Exception in JavascriptEngineSwitcher, can some one help with actual cause of this issue.
Below is the stacktrace:
System Configuration being Used:
OS: Windows Server 2008R2
IE: IE8 (Internet Explorer Version 8)
System.Web.HttpException: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'.
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage)
at System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)
at System.Web.Mvc.ViewPage.RenderView(ViewContext viewContext)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.
at System.Web.UI.Page.HandleError(Exception e)
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.Mvc.ViewPage.ProcessRequest(HttpContext context)
at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass4.<Wrap>b__3()
at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func)
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at JavaScriptEngineSwitcher.Core.Utilities.Utils.CreateInstanceByFullTypeName[T](String fullTypeName)
at JavaScriptEngineSwitcher.Core.JsEngineSwitcher.CreateJsEngineInstance(String name)
at BundleTransformer.Less.Compilers.LessCompiler..ctor(Func`1 createJsEngineInstance, CompilationOptions defaultOptions)
at BundleTransformer.Less.Translators.LessTranslator.Translate(IList`1 assets)
at BundleTransformer.Core.Transformers.TransformerBase.Translate(IList`1 assets, Boolean isDebugMode)
at BundleTransformer.Core.Transformers.CssTransformer.Transform(IList`1 assets, BundleResponse bundleResponse, VirtualPathProvider virtualPathProvider, HttpContextBase httpContext, Boolean isDebugMode)
at BundleTransformer.Core.Transformers.TransformerBase.Process(BundleContext context, BundleResponse response, Boolean isDebugMode)
at System.Web.Optimization.Bundle.ApplyTransforms(BundleContext context, String bundleContent, IEnumerable`1 bundleFiles)
at System.Web.Optimization.Bundle.GetBundleResponse(BundleContext context)
at System.Web.Optimization.BundleResolver.GetBundleContents(String virtualPath)
at System.Web.Optimization.AssetManager.EliminateDuplicatesAndResolveUrls(IEnumerable`1 refs)
at System.Web.Optimization.AssetManager.DeterminePathsToRender(IEnumerable`1 assets)
at System.Web.Optimization.AssetManager.RenderExplicit(String tagFormat, String[] paths)
at ASP._Page_XXXXXXX_YYYYYY_ZZZZZ__Head_cshtml.Execute() in c:\*******\*******\*******\*******\*******\*******\*******\_Head.cshtml:line 13
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at AW.Web.Mvc.BaseView`1.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper htmlHelper, String partialViewName)
at ASP.xxxxx_yyyyy_zzzzz_aaaaa_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
JavaScriptEngineSwitcher.Core.JsEngineLoadException: During loading of MSIE JavaScript engine error has occurred.
See more details:
The requested lookup key was was not found in any active activation context.
at JavaScriptEngineSwitcher.Msie.MsieJsEngine..ctor(MsieConfiguration msieConfig)
System.ComponentModel.Win32Exception: The requested lookup key was was not found in any active activation context.
at MS.Win32.HwndWrapper..ctor(Int32 classStyle, Int32 style, Int32 exStyle, Int32 x, Int32 y, Int32 width, Int32 height, String name, IntPtr parent, HwndWrapperHook[] hooks)
at System.Windows.Threading.Dispatcher..ctor()
at MsieJavaScriptEngine.ActiveScript.ActiveScriptJsEngineBase..ctor(String clsid, String engineModeName, String lowerIeVersion, Boolean useEcmaScript5Polyfill, Boolean useJson2Library)
at MsieJavaScriptEngine.MsieJsEngine..ctor(JsEngineMode engineMode, Boolean useEcmaScript5Polyfill, Boolean useJson2Library)
at JavaScriptEngineSwitcher.Msie.MsieJsEngine..ctor(MsieConfiguration msieConfig)
For correct working of the MSIE JavaScript Engine it is recommended to install Internet Explorer 9 and above on a server.
You have 2 variants to solve this problem:
Install Internet Explorer 9 or above on server.
Use a JavaScriptEngineSwitcher.V8 package (requires the Visual C++
Redistributable Packages for Visual Studio) instead of the
JavaScriptEngineSwitcher.Msie package.
BundleTransformer.Less will not work without a Internet Explorer 9 or above (an “Out of stack space” error will occur).
This error will occur when executing a large amount of JS code, i.e. most part of the Bundle Transformer modules will cause this error.
I'm getting this error when trying to publish any item from Sitecore to the web. Was working fine the other day, not sure what I did to crash this.
Job started: Publish to 'web'|#Exception:
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. --->
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.InvalidOperationException:
Root item is not defined at
Sitecore.Diagnostics.Assert.IsNotNull(Object value, String message)
at Sitecore.Search.Crawlers.DatabaseCrawler.Initialize(Index index)
at Sitecore.Search.Index.AddCrawler(ICrawler crawler) --- End of
inner exception stack trace --- at
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[]
arguments, Signature sig, Boolean constructor) at
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
Object[] parameters, Object[] arguments) at
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[]
parameters) at
Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[]
properties) at
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode,
String[] parameters, Object obj, Boolean assert, Boolean deferred,
IFactoryHelper helper) at
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode,
String[] parameters, Boolean assert, IFactoryHelper helper) at
Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode,
String[] parameters, Boolean assert) at
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode,
String[] parameters, Object obj, Boolean assert, Boolean deferred,
IFactoryHelper helper) at
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode,
String[] parameters, Boolean assert, IFactoryHelper helper) at
Sitecore.Configuration.Factory.CreateObject(String configPath,
String[] parameters, Boolean assert) at
Sitecore.Search.SearchManager.get_SearchConfiguration() at
Sitecore.Data.Managers.IndexingManager.UpdateIndexAsync(Database
database) at Sitecore.MainUtil.RaiseEvent[T](EventHandler1
subscribers, Object sender, T eventArgs) at
Sitecore.Data.Engines.HistoryEngine.RegisterItemSaved(Item item,
ItemChanges changes) at System.EventHandler1.Invoke(Object sender,
TEventArgs e) at
Sitecore.Data.Engines.EngineCommand2.RaiseEvent[TArgs](EventHandler1
handlers, Func2 argsCreator) at
Sitecore.Data.Engines.EngineCommand2.Execute() at
Sitecore.Data.Engines.DataEngine.SaveItem(Item item) at
Sitecore.Data.Managers.ItemProvider.SaveItem(Item item) at
Sitecore.Data.Items.ItemEditing.AcceptChanges(Boolean
updateStatistics, Boolean silent) at
Sitecore.Data.Items.EditContext.Dispose() at
Sitecore.Publishing.PublishHelper.CopyToTarget(Item sourceVersion)
at Sitecore.Publishing.PublishHelper.PublishVersionToTarget(Item
sourceVersion, Item targetItem, Boolean targetCreated) at
Sitecore.Publishing.Pipelines.PublishItem.PerformAction.ExecuteAction(PublishItemContext
context) at
Sitecore.Publishing.Pipelines.PublishItem.PerformAction.Process(PublishItemContext
context) at (Object , Object[] ) at
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at
Sitecore.Publishing.Pipelines.PublishItem.PublishItemPipeline.Run(PublishItemContext
context) at
Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1
entries, PublishContext context) at
Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1
entries, PublishContext context) at
Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1
entries, PublishContext context) at
Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1
entries, PublishContext context) at
Sitecore.Publishing.Pipelines.Publish.ProcessQueue.Process(PublishContext
context) at (Object , Object[] ) at
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at
Sitecore.Publishing.Pipelines.Publish.PublishPipeline.Run(PublishContext
context) at Sitecore.Publishing.Publisher.PublishWithResult()
--- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[]
arguments, Signature sig, Boolean constructor) at
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
Object[] parameters, Object[] arguments) at
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[]
parameters) at (Object , Object[] ) at
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at
Sitecore.Jobs.Job.ThreadEntry(Object state)
It looks like the index configuration is corrupted.
Go to /sitecore/admin/showconfig.aspx page and find:
<locations hint="list:AddCrawler">
Check every location under that node - they all should have <Root> tag with the proper location root specified.
You can check Sitecore logs. As per my finding it is occurred because I've specified wrong username/password in connectionstrings.config. Please make sure username and password is correct.
I've an MVC 5 app (.NET 4.5.1) running on Windows 2008 R2 (IIS 7.5)
The following exception keeps being thrown periodically when running load tests. Unfortunately, I can't reproduce locally and am rather stuck, so am hoping the community may have more ideas. (Update: have now been able to reproduce under load)
Looking at the source for FilterProviderCollection.GetFilters suggests that its possibly the dependency resolver - but without more information, I'm reluctant to simply replace the library. Currently its using SimpleInjector.
If this is the case, my guess would be its caused by app pool recycles, but haven't been able to confirm this (enabling logging of all causes for a recycle in the app pool gave me nothing useful)
After much searching, I did find a few references to it potentially being Glimpse. I've confirmed this isn't the case. I've also stripped and rebuilt the project to help gain confidence that its not simply nuget-package upgrade weirdness.
Any suggestions as to what could be causing it, or how I may add extra logging to catch more information would be appreciated. Thanks.
Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
at System.Web.Mvc.FilterProviderCollection.GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
at System.Web.Mvc.ControllerActionInvoker.GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TState](AsyncCallback callback, Object callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext)
at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TState](AsyncCallback callback, Object callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext)
at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TState](AsyncCallback callback, Object callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Update 1
I've been able to find a method to replicate on the test environment:
Put a constant load on the app (as few as 20 virtual users)
Manually recycle the app pool (repeatedly until failure triggered)
Recycling the app pool without load does not seem to trigger the failure.
More worrying, setting "Disable Overlapped Recycle" to True doesn't stop them from occurring. This, I had assumed would stop any recycling issues as it tears the worker process down completely before starting a new one.
Update 2
Global.asax and associated config doesn’t look (to me) to be too far off the default templates. See what you think?
public class MyHttpApplication : HttpApplication {
public MyHttpApplication() {
SimpleInjectorConfig.InitializeContainer(); //seems to need to be in ctor to support HttpModule dependencies
}
protected void Application_Start() {
MvcHandler.DisableMvcResponseHeader = true;
AreaRegistration.RegisterAllAreas();
ViewEngineConfig.RegisterViewEngines(ViewEngines.Engines);
WebApiConfig.Register(GlobalConfiguration.Configuration);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BinderConfig.RegisterGlobalBinders(ModelBinders.Binders);
}
The various XxxConfig classes are pretty much out of the template.
public static class FilterConfig {
public static void RegisterGlobalFilters(GlobalFilterCollection filters) {
filters.Add(new AuthorizeAttribute());
}
}
public static class SimpleInjectorConfig {
/// <summary>Initialize the container and register it as MVC Dependency Resolver.</summary>
public static void InitializeContainer() {
var container = new Container();
container.Options.AllowResolvingFuncFactories();
RegisterServices(container);
container.RegisterMvcControllers(Assembly.GetExecutingAssembly());
container.RegisterMvcIntegratedFilterProvider();
container.RegisterWebApiControllers(GlobalConfiguration.Configuration);
//container.Verify(); //see http://bit.ly/YE8OJj for more info
DependencyResolver.SetResolver(new SimpleInjectorDependencyResolver(container));
GlobalConfiguration.Configuration.DependencyResolver = new SimpleInjectorWebApiDependencyResolver(container);
}
Update 3
When run with overlapped recycling off, I was able to obtain the following variant stack traces.
[IndexOutOfRangeException: Index was outside the bounds of the array.]
System.Collections.Generic.Enumerator.MoveNext() +112
System.Linq.<ConcatIterator>d__71`1.MoveNext() +643
System.Linq.Buffer`1..ctor(IEnumerable`1 source) +520
System.Linq.Enumerable.ToArray(IEnumerable`1 source) +103
System.Web.Mvc.FilterProviderCollection.GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +89
System.Web.Mvc.ControllerActionInvoker.GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +38
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +333
System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +45
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +111
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +150
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext) +203
System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +879
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +150
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext) +154
System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +527
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +108
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +111
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +150
System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object callbackState, BeginInvokeDelegate`1 beginDelegate, EndInvokeVoidDelegate`1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext) +203
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +665
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +12638163
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
and
[IndexOutOfRangeException: Index was outside the bounds of the array.]
System.Collections.Generic.Enumerator.MoveNext() +112
System.Linq.<OfTypeIterator>d__aa`1.MoveNext() +344
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +536
System.Linq.Enumerable.ToList(IEnumerable`1 source) +80
SimpleInjector.SimpleInjectorMvcExtensions.RegisterMvcIntegratedFilterProvider(Container container) +271
WebProject.SimpleInjectorConfig.InitializeContainer() in c:\...\App_Start\SimpleInjectorConfig.cs:35
WebProject.MyHttpApplication..ctor() in c:\...\Global.asax.cs:14
ASP.global_asax..ctor() in c:\...\App_global.asax.3szzcx02.0.cs:0
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +159
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +256
System.Activator.CreateInstance(Type type, Boolean nonPublic) +127
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +14259433
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +200
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +83
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +246
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +178
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333
The following line is causing you trouble:
public MyHttpApplication() {
SimpleInjectorConfig.InitializeContainer(); //seems to need to be in c...
}
The MyHttpApplication can be called multiple times in that causes multiple containers to be created that each try to register itself as filter provider using RegisterMvcIntegratedFilterProvider. You should make sure that only one container instance is created for that app domain so you only have to call RegisterMvcIntegratedFilterProvider once.
First, thanks go to Steven for his help in analyzing the issue.
Turns out the problem was due to the innocuous placement of SimpleInjectorConfig.InitializeContainer.
While the ASP.NET runtime ensures that Application_Start will only be called once, it can create multiple HttpApplications. Having the call in the ctor meant that what should have been run-once initialization ended up being called a bunch of times when recycled under load.
public MyHttpApplication() {
SimpleInjectorConfig.InitializeContainer(); //WRONG
}
Moving this to Application_Start resolves the immediate problem.
protected void Application_Start() {
SimpleInjectorConfig.InitializeContainer();
}
Given the call was only in the Ctor for IHttpModule support, I also had a further step in enabling dependencies to be injected into IHttpModule's. HttpModuleMagic works well for this.
I am writing an asp.net mvc3 web application. I want to use a sqlite database. Unfortunatly I get an SqliteException saying "unable to open database".
Spring-Version: 1.3.2
NHibernate-Version: 3.2
DbProvider/Connectionstring:
<db:provider id="employeesDbProvider"
provider="SQLite-1.0.72"
connectionString="Data Source=.\Database\Employees.db3;Version=3;">
</db:provider>
Stacktrace:
bei System.Data.SQLite.SQLite3.Open(String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLite3.cs:Zeile 239.
bei System.Data.SQLite.SQLiteConnection.Open() in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteConnection.cs:Zeile 1022.
bei NHibernate.Connection.DriverConnectionProvider.GetConnection()
I even tried setting the DataSource to an absolut path (C:\temp\database\Employees.db3) but the same SqLiteException is thrown.
Update:
Stacktrace shown on error page:
[SQLiteException (0x80004005): Unable to open the database file]
System.Data.SQLite.SQLite3.Open(String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLite3.cs:239
System.Data.SQLite.SQLiteConnection.Open() in c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteConnection.cs:1022
NHibernate.Connection.DriverConnectionProvider.GetConnection() +155
NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Prepare() +41
NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect dialect, IConnectionHelper connectionHelper) +105
NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory sessionFactory) +151
NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners) +1012
NHibernate.Cfg.Configuration.BuildSessionFactory() +162
Spring.Data.NHibernate.LocalSessionFactoryObject.NewSessionFactory(Configuration config) in c:\_prj\spring-net\trunk\src\Spring\Spring.Data.NHibernate20\Data\NHibernate\LocalSessionFactoryObject.cs:952
Spring.Data.NHibernate.LocalSessionFactoryObject.AfterPropertiesSet() in c:\_prj\spring-net\trunk\src\Spring\Spring.Data.NHibernate20\Data\NHibernate\LocalSessionFactoryObject.cs:706
Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InvokeInitMethods(Object target, String name, IConfigurableObjectDefinition definition) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\AbstractAutowireCapableObjectFactory.cs:1294
Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.ConfigureObject(String name, RootObjectDefinition definition, IObjectWrapper wrapper) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\AbstractAutowireCapableObjectFactory.cs:1890
Spring.Objects.Factory.Support.WebObjectFactory.ConfigureObject(String name, RootObjectDefinition definition, IObjectWrapper wrapper) in c:\_prj\spring-net\trunk\src\Spring\Spring.Web\Objects\Factory\Support\WebObjectFactory.cs:450
Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\AbstractAutowireCapableObjectFactory.cs:921
[ObjectCreationException: Error creating object with name 'employeesSessionFactory' defined in 'file [C:\Develop\ASP.Net-Schulung\Mitarbeiterverwaltung.Web\bin\Config\Spring.Database.config.xml] line 16' : Initialization of object failed : Unable to open the database file]
Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\AbstractAutowireCapableObjectFactory.cs:938
Spring.Objects.Factory.Support.AbstractObjectFactory.CreateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\AbstractObjectFactory.cs:2144
Spring.Objects.Factory.Support.WebObjectFactory.CreateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments) in c:\_prj\spring-net\trunk\src\Spring\Spring.Web\Objects\Factory\Support\WebObjectFactory.cs:299
Spring.Objects.Factory.Support.AbstractObjectFactory.GetObjectInternal(String name, Type requiredType, Object[] arguments, Boolean suppressConfigure) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\AbstractObjectFactory.cs:2065
Spring.Objects.Factory.Support.AbstractObjectFactory.GetObject(String name) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\AbstractObjectFactory.cs:1826
Spring.Objects.Factory.Support.DefaultListableObjectFactory.PreInstantiateSingletons() in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Objects\Factory\Support\DefaultListableObjectFactory.cs:505
Spring.Context.Support.AbstractApplicationContext.Refresh() in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Context\Support\AbstractApplicationContext.cs:1017
Spring.Context.Support.MvcApplicationContext..ctor(MvcApplicationContextArgs args) in c:\_prj\spring-net\trunk\src\Spring\Spring.Web.Mvc\Context\Support\MvcApplicationContext.cs:75
Spring.Context.Support.MvcApplicationContext..ctor(String name, Boolean caseSensitive, String[] configurationLocations) in c:\_prj\spring-net\trunk\src\Spring\Spring.Web.Mvc\Context\Support\MvcApplicationContext.cs:47
_dynamic_Spring.Context.Support.MvcApplicationContext..ctor(Object[] ) in c:\_prj\spring-net\trunk\src\Spring\Spring.Web.Mvc\Context\Support\MvcApplicationContext.cs:50
Spring.Reflection.Dynamic.SafeConstructor.Invoke(Object[] arguments) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Reflection\Dynamic\DynamicConstructor.cs:116
Spring.Context.Support.RootContextInstantiator.InvokeContextConstructor(ConstructorInfo ctor) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:563
Spring.Context.Support.ContextInstantiator.InstantiateContext() in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:508
Spring.Context.Support.ContextHandler.InstantiateContext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:351
Spring.Context.Support.ContextHandler.Create(Object parent, Object configContext, XmlNode section) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Context\Support\ContextHandler.cs:289
[ConfigurationErrorsException: Error creating context 'spring.root': Unable to open the database file]
System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) +199
System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) +1153
System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) +1468
System.Configuration.BaseConfigurationRecord.GetSection(String configKey) +41
System.Web.HttpContext.GetSection(String sectionName) +52
System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName) +57
System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey) +6
System.Configuration.ConfigurationManager.GetSection(String sectionName) +78
Spring.Util.ConfigurationUtils.GetSection(String sectionName) in c:\_prj\spring-net\trunk\src\Spring\Spring.Core\Util\ConfigurationUtils.cs:71
Spring.Context.Support.WebApplicationContext.GetContextInternal(String virtualPath) in c:\_prj\spring-net\trunk\src\Spring\Spring.Web\Context\Support\WebApplicationContext.cs:335
Spring.Context.Support.WebApplicationContext.GetRootContext() in c:\_prj\spring-net\trunk\src\Spring\Spring.Web\Context\Support\WebApplicationContext.cs:223
Spring.Context.Support.WebSupportModule.Init(HttpApplication app) in c:\_prj\spring-net\trunk\src\Spring\Spring.Web\Context\Support\WebSupportModule.cs:175
System.Web.HttpApplication.InitModulesCommon() +172
System.Web.HttpApplication.InitModules() +43
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +828
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +304
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327
I did a quick test with SQLite, Spring.Net and it fails with the same error, however when I used slashes instead of backslashes in the connection string it magically starts to work.
<db:provider id="employeesDbProvider"
provider="SQLite-1.0.72"
connectionString="Data Source=c:/temp/Database/Sample.db3;Version=3;">
</db:provider>
Edit:
I tested a bit further to find out where the file is stored if I use the dot prefix e.g. ./Employees.db3. In IISExpress it is stored in C:\Program Files (x86)\IIS Express most likely not what you did expect.
In IIS7 it simply fails with the Unable to open the database file error, ihmo because it tries to write to the Temporary ASP.NET Files folder.
The safest bet is to use
<db:provider id="employeesDbProvider"
provider="SQLite-1.0.72"
connectionString="Data Source=|DataDirectory|Sample.db3;Version=3;">
</db:provider>
Wich is the App_Data folder of your MVC application.
I used SQLite 1.0.80.0 for my tests. Keep in mind that SQLite does not create the directory and needs ACL write rights.