Error when installing uCommerce with Umbraco 7 - installation

I'm having issues when trying to install uCommerce into Umbraco 7. I have tried installing via the online package and via a local package I downloaded from their website. Both are failing with the same error message.
This is installing it on Umbraco 7.2.7 using uCommerce 6.8.2
2015-10-20 10:59:23,832 [114] ERROR Umbraco.Core.UmbracoApplicationBase - [P2760/T103/D30] An unhandled exception occurred
System.ArgumentException: The relative virtual path 'function sortCampaignItems(){
UmbClientMgr.openModalWindow('/umbraco/ucommerce/marketing/SortCampaignItems.aspx?id=' + UmbClientMgr.mainTree().getActionNode().nodeId, 'Sort',true,600,450);
}' is not allowed here.
at System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options)
at System.Web.VirtualPathUtility.ToAbsolute(String virtualPath, String applicationPath)
at Umbraco.Core.IO.IOHelper.ResolveUrl(String virtualPath)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Umbraco.Web.Editors.BackOfficeController.GetLegacyActionJs(LegacyJsActionType type)
at Umbraco.Web.Editors.BackOfficeController.Application()
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Can anyone help with any suggestions of resolving this matter? I've been at this for hours and don't seem be getting anywhere.
Thanks

Answered by Jesper Nielsen via http://eureka.ucommerce.net/#!/question/1649/Error-when-installing-uCommerce-with-Umbraco-7
Hi Andy,
I get the same error when installing on Umbraco 7.2.7. We will look into the cause of this.
I have installed version 6.8.2 of uCommerce on Umbraco 7.2.8 without problems.
Is it possible for you to use Umbraco 7.2.8?
Sorry for the inconvenience!
Kind regards, Jesper

Related

m_safeCertContext is an invalid handle - why does my code work in production but not in dev environment?

After I enabled HTTPS in my project, I started to receive an error page with this error: m_safeCertContext is an invalid handle
The code runs great in production on the web server.
I am running Visual Studio 2017 15.3.0.
I have updated sslFlags to <access sslFlags="SslNegotiateCert" />
and I have ensured iisClientCertificateMappingAuthentication is set
to <iisClientCertificateMappingAuthentication enabled="true"></iisClientCertificateMappingAuthentication>
The below are my IIS Express application pool settings:
<applicationPools>
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="Clr4ClassicAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="Clr2IntegratedAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="Clr2ClassicAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
<add name="UnmanagedClassicAppPool" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" />
<applicationPoolDefaults managedRuntimeLoader="v4.0">
<processModel loadUserProfile="true" />
</applicationPoolDefaults>
</applicationPools>
full text from error page:
Server Error in '/' Application.
m_safeCertContext is an invalid handle.
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.Security.Cryptography.CryptographicException: m_safeCertContext is an invalid handle.
Source Error:
Line 383: HttpClientCertificate httpCert = HttpContext.Current.Request.ClientCertificate;
Line 384: X509Certificate2 x509Cert = new X509Certificate2(httpCert.Certificate);
Line 385: _subject = x509Cert.Subject;
Line 386: _sCustomerId = CustomerQueries.getCustomerId(_subject);
Line 387: LoadCustomerAttributes(CustomerQueries.getCustomerAttributes(_sCustomerId));
Source File: C:\$TFS\Reports\Projects\WebMaster\Customers\Classes\Customer.cs Line: 385
Stack Trace:
[CryptographicException: m_safeCertContext is an invalid handle.]
System.Security.Cryptography.X509Certificates.X509Certificate.ThrowIfContextInvalid() +12505161
System.Security.Cryptography.X509Certificates.X509Certificate.get_Subject() +14
ReportsRG.Projects.WebMaster.Customers.Classes.Customer.GetUserDataFromCertificate() in C:\$TFS\SMRT\Dev\ReportsRG\Projects\WebMaster\Customers\Classes\Customer.cs:385
ReportsRG.Projects.WebMaster.Customers.Classes.Customer..ctor() in C:\$TFS\SMRT\Dev\ReportsRG\Projects\WebMaster\Customers\Classes\Customer.cs:322
MVCPages.Controllers.SmrtController.Index() in C:\$TFS\SMRT\Dev\MVCPages\Controllers\SmrtController.cs:39
lambda_method(Closure , ControllerBase , Object[] ) +61
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +157
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.Async.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
System.Web.Mvc.Async.<>c__DisplayClass11_0.<InvokeActionMethodFilterAsynchronouslyRecursive>b__0() +58
System.Web.Mvc.Async.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2() +228
System.Web.Mvc.Async.<>c__DisplayClass7_0.<BeginInvokeActionMethodWithFilters>b__1(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
System.Web.Mvc.Async.<>c__DisplayClass3_6.<BeginInvokeAction>b__4() +35
System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +11
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +45
System.Web.Mvc.<>c.<BeginExecute>b__151_2(IAsyncResult asyncResult, Controller controller) +13
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +28
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9850009
System.Web.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0() +26
System.Web.StepInvoker.Invoke(Action executionStep) +107
System.Web.<>c__DisplayClass4_0.<Invoke>b__0() +23
Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule.OnExecuteRequestStep(HttpContextBase context, Action step) +64
System.Web.<>c__DisplayClass284_0.<OnExecuteRequestStep>b__0(Action nextStepAction) +56
System.Web.StepInvoker.Invoke(Action executionStep) +91
System.Web.<>c__DisplayClass4_0.<Invoke>b__0() +23
Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule.OnExecuteRequestStep(HttpContextBase context, Action step) in /_/WEB/Src/Web/Web/ApplicationInsightsHttpModule.cs:164
System.Web.<>c__DisplayClass284_0.<OnExecuteRequestStep>b__0(Action nextStepAction) +56
System.Web.StepInvoker.Invoke(Action executionStep) +91
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +9956298
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163
The call stack at least gives enough hints on what to look for next.
Line 383: HttpClientCertificate httpCert = HttpContext.Current.Request.ClientCertificate;
Line 384: X509Certificate2 x509Cert = new X509Certificate2(httpCert.Certificate);
Line 385: _subject = x509Cert.Subject;
This piece of code tries to grab the client certificate sent by the browser, and then access its Subject property. This access attempt failed and an exception happened,
[CryptographicException: m_safeCertContext is an invalid handle.]
System.Security.Cryptography.X509Certificates.X509Certificate.ThrowIfContextInvalid() +12505161
System.Security.Cryptography.X509Certificates.X509Certificate.get_Subject() +14
Since .NET Framework in general wraps up native Windows API, so the exception itself can be quite confusing.
"The code runs great in production on the web server", so that I can assume your server administrators have configured this production machine to know how to build full chains for client certificates (very common server configuration), but you might not have done the same on your development machine. Talk to the server administrators and learn what you missed.
In the meantime, you might set a break at line 384 and analyze more details of httpCert. That might help you find out what settings are missing.
I was updating the wrong ApplicationHost.config file.
The correct one is located at .vs\config in the solution root.
I was updating the one located at: C:\Users\[username]\Documents\IISExpress\config\
Once I updated the correct ApplicationHost.config file, the code started working in my local development environment.

MVC using VS: Why am I getting an error when using View() but not when I use View(viewname)?

I am getting a strange error when using the following:
public ActionResult PostToPayPal(WalkerRegoViewModel walkerVM, string submit)
...
return View(paypal);
But when I specify the ViewName it works (nothing else has changed)?
public ActionResult PostToPayPal(WalkerRegoViewModel walkerVM, string submit)
...
return View("PostToPayPal", paypal);
The error I get is:
Object reference not set to an instance of an object.
Exception Details:
System.NullReferenceException: Object reference not set to an instance of an object.
Here is the Stack Trace:
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 cf the current web request. Information regarding the origin and locaticn 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.]
Walk.Controllers.RegisterController.PostToPayPal(WalkerRegoViewModel walkerVM, String submit) in C:\dev\Walk\Walk\Controllers\RegisterController
lambda_method(Closure , ControllerBase , Object[] ) +147
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary.2 parameters) +169
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary-2
System.Web.Mvc.Async.oc.b 9_0(IAsyncResult asyncResult, Actionlnvocation innerInvokeState) +22
System.Web.Mvc.Async.WrappedAsyncResult.2.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase.1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
System.Web.Mvc.Async.oc DisplayClass11_0.b 0() +58
System.Web.Mvc.Async.oc DisplayClass11_2.b 2() +228
System.Web.Mvc.Async.oc DisplayClass7_0.b 1(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResult.1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase.1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
System.Web.Mvc.Async.oc DisplayClass3_6.b 4() +35
System.Web.Mvc.Async.oc DisplayClass3_1.b 1(IAsyncResult asyncResult) +100
System.Web.Mvc.Async.WrappedAsyncResult.1.CallEndDelegate(IAsyncResult asyncResult) +10
System.Web.Mvc.Async.WrappedAsyncResultBase.1.End() +49
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
System.Web.Mvc.oc.b 152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +11
System.Web.Mvc.Async.WrappedAsyncVoid.1.CallEndDelegate(IAsyncResult asyncResult) +29
System.Web.Mvc.Async.WrappedAsyncResultBase.1.End() +49
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +45
System.Web.Mvc.oc.b 151_2(IAsyncResult asyncResult, Controller controller) +13
System.Web.Mvc.Async.WrappedAsyncVoid.1.CallEndDelegate(IAsyncResult asyncResult) +22
System.Web.Mvc.Async.WrappedAsyncResultBase.1.End() +49

Why won't Visual Studio break on this unhandled exception?

When submitting a form, a Yellow Screen of Death appeared even while in Debug mode in Visual Studio. The problem I had is solved, it was a missing resource value, but I'm interested in why I'm not able to break on the exception.
I tried the following, but nothing changed the situation:
Stepping through the code.
Changing the Debug -> Exceptions settings.
Checking Enable .NET Framework source stepping and Enable source server support.
How can such an exception be caught, or why is it not possible to catch it?
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: value
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentNullException: Value cannot be null.
Parameter name: value]
System.ComponentModel.DataAnnotations.ValidationContext.set_DisplayName(String value) +52015
System.Web.Mvc.<Validate>d__1.MoveNext() +135
System.Web.Mvc.<Validate>d__5.MoveNext() +318
System.Web.Mvc.DefaultModelBinder.OnModelUpdated(ControllerContext controllerContext, ModelBindingContext bindingContext) +139
System.Web.Mvc.DefaultModelBinder.BindComplexElementalModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Object model) +66
System.Web.Mvc.DefaultModelBinder.BindComplexModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +1367
System.Web.Mvc.DefaultModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +449
System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) +317
System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +117
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
System.Web.Mvc.Controller.ExecuteCore() +116
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
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() +8970061
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
It is not possible to break on this exception, because Microsoft's public Symbol Server does not provide source code for everything.
Adding a breakpoint via the dialog to System.ComponentModel.DataAnnotations.ValidationContext.set_DisplayName will break, but Visual Studio will say that there is no source code available.
Looks like you have some dataAnnotationAttribute for model field, so asp.net takes care about it - before your request fires breakpoint in controller

Security Exception with medium trust, ninject and entity framework

I keep getting this exception whenever I try running my project in medium trust. The project is MVC Forum, and even though I don't need to run any of my own sites in medium trust, I figure I better make it work in the medium trust environment anyway.
I'm using Ninject for DI (the DLL that works in medium trust), and that works - the MVC controllers are loaded with constructor injection as expected.
The "funny" thing is that the method (in my code) that fails, take 2 arguments, these are both loaded from the database using entity framework, so I have no idea why this fails, when entity framework clearly already work in other parts of the code.
What is the reason behind this exception? It's like looking for the famous needle in a haystack.
Here's the stacktrace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31
System.Security.CodeAccessPermission.Demand() +46
System.Data.Common.Internal.Materialization.Translator.DemandMemberAccess() +50
System.Data.Common.Internal.Materialization.Shaper`1..ctor(DbDataReader reader, ObjectContext context, MetadataWorkspace workspace, MergeOption mergeOption, Int32 stateCount, CoordinatorFactory`1 rootCoordinatorFactory, Action checkPermissions, Boolean readerOwned) +165
System.Data.Common.Internal.Materialization.ShaperFactory`1.Create(DbDataReader reader, ObjectContext context, MetadataWorkspace workspace, MergeOption mergeOption, Boolean readerOwned) +93
System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute(ObjectContext context, ObjectParameterCollection parameterValues) +736
System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +149
System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +44
System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +182
System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1(IEnumerable`1 sequence) +41
System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle(IEnumerable`1 query, Expression queryRoot) +59
System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +150
System.Data.Entity.Internal.Linq.DbQueryProvider.Execute(Expression expression) +102
System.Linq.Queryable.FirstOrDefault(IQueryable`1 source) +265
ApplicationBoilerplate.DataProvider.EntityFramework.Repository`1.ReadOne(ISpecification`1 spec) +217
mvcForum.Web.Extensions.ForumExtensions.GetAccess(Forum forum, Group group) +129
mvcForum.Web.Extensions.ForumExtensions.GetAccess(Forum forum) +895
mvcForum.Web.ViewModels.ForumViewModel..ctor(Forum forum, Int32 topicsPerPage) +1353
mvcForum.Web.Areas.Forum.Controllers.HomeController.Index() +1260
lambda_method(Closure , ControllerBase , Object[] ) +74
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +208
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) +263
System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +263
System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +263
System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +263
System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
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) +343
System.Web.Mvc.Controller.ExecuteCore() +116
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
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() +8970061
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
Small update, I'm using code first. Thanks for looking!
This looks like the exception you get if your entity classes contain properties that are not public--i.e. they are internal, protected, or private. EF5 and below only support mapping to public properties when running in a partial trust environment.

Kerberos Double-Hop Issue between IIS and SSAS [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Can I turn off impersonation just in a couple instances
I've created an application that, when uploaded to my server throws the following exceptions:
[Win32Exception (0x80004005): No credentials are available in the security package]
[AdomdConnectionException: Authentication failed.]
Here is my connection string:
public AdomdConnection conn = new AdomdConnection("Data Source=BTN-SQL1;Initial Catalog=BTNTurboAnalysisServices;Integrated Security=SSPI;SSPI=Kerberos;Persist Security Info=False;");
Its worth noting that BTN-SQL1 is on a different server to my web server and I'm also using Windows Authentication with Impersonation enabled.
Below is my stack trace:
[Win32Exception (0x80004005): No credentials are available in the security package]
Microsoft.AnalysisServices.AdomdClient.NTAuthentication.GetOutgoingBlob(Byte[] incomingBlob, Boolean& handshakeComplete) +424
Microsoft.AnalysisServices.AdomdClient.XmlaClient.Authenticate(ConnectionInfo connectionInfo, DateTime startTime) +175
[AdomdConnectionException: Authentication failed.]
Microsoft.AnalysisServices.AdomdClient.XmlaClient.Authenticate(ConnectionInfo connectionInfo, DateTime startTime) +1308
Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenTcpConnection(ConnectionInfo connectionInfo) +498
Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession) +1142
Microsoft.AnalysisServices.AdomdClient.XmlaClientProvider.Connect(Boolean toIXMLA) +267
Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP) +235
Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open() +973
btn_intranet.Areas.Sales.Controllers.HomeController.CumulativeChart(String month, String year) in <path to file>/HomeController.cs:69
lambda_method(Closure , ControllerBase , Object[] ) +182
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +264
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +129
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +798650
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +314
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +798704
System.Web.Mvc.Controller.ExecuteCore() +159
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +54
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375
Any help would be appreciated, thanks!
I've managed to solve the problem. Basically I just disabled impersonation for the specific methods that were causing the problem by using the solution found here:
Can I turn off impersonation just in a couple instances

Resources