none
Publish web on Azure. Operation could destabilize the runtime in MVC3

    Question

  • I published my web project to Azure and when I pull it up in the browser I see the error below. I fixed the same error by disabling IntelliTrace, when I published my Web ROLE to windows azure(there is no problem on rdp). But I could not find where to disable it in Publish web settings.http://www.windowsazure.com/media/devcenter/dotnet/dev-net-getting-started-039.png

    so maybe it is not problem with IntelliTrace.

    [VerificationException: Operation could destabilize the runtime.] FluentValidation.AbstractValidator`1..ctor() in c:\Projects\FluentValidation\src\FluentValidation\AbstractValidator.cs:36 Pollmerica.Areas.Shared.Validators.Account.LogOnValidator..ctor() in D:\Code\Poll\Pollmerica\Areas\Shared\Validators\Account\LogOnValidator.cs:15

    [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) +113 System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232 System.Activator.CreateInstance(Type type, Boolean nonPublic) +83 System.Activator.CreateInstance(Type type) +6 FluentValidation.Internal.InstanceCache.GetOrCreateInstance(Type type, Func2 factory) in c:\Projects\FluentValidation\src\FluentValidation\Internal\InstanceCache.cs:58 FluentValidation.Internal.InstanceCache.GetOrCreateInstance(Type type) in c:\Projects\FluentValidation\src\FluentValidation\Internal\InstanceCache.cs:37 FluentValidation.Attributes.AttributedValidatorFactory.GetValidator(Type type) in c:\Projects\FluentValidation\src\FluentValidation\Attributes\AttributedValidatorFactory.cs:48 FluentValidation.Mvc.FluentValidationModelValidatorProvider.GetValidators(ModelMetadata metadata, ControllerContext context) in c:\Projects\FluentValidation\src\FluentValidation.Mvc3\FluentValidationModelValidatorProvider.cs:75 System.Web.Mvc.<>c__DisplayClass7.<GetValidators>b__6(ModelValidatorProvider provider) +21 System.Linq.<SelectManyIterator>d__142.MoveNext() +234 System.Linq.d__142.MoveNext() +397 System.Web.Mvc.HtmlHelper.GetUnobtrusiveValidationAttributes(String name, ModelMetadata metadata) +297 System.Web.Mvc.Html.InputExtensions.InputHelper(HtmlHelper htmlHelper, InputType inputType, ModelMetadata metadata, String name, Object value, Boolean useViewData, Boolean isChecked, Boolean setId, Boolean isExplicitValue, IDictionary2 htmlAttributes) +794 System.Web.Mvc.Html.InputExtensions.HiddenHelper(HtmlHelper htmlHelper, ModelMetadata metadata, Object value, Boolean useViewData, String expression, IDictionary2 htmlAttributes) +124 System.Web.Mvc.Html.InputExtensions.HiddenFor(HtmlHelper1 htmlHelper, Expression1 expression, IDictionary2 htmlAttributes) +90 System.Web.Mvc.Html.InputExtensions.HiddenFor(HtmlHelper1 htmlHelper, Expression1 expression) +54



    • Edited by Pollmerica Monday, February 11, 2013 10:36 PM
    Monday, February 11, 2013 10:46 AM

Answers

  • I fixed this problem by "Enable package manager restore". Right click on solution -> Enable package manager restore.
    • Marked as answer by Pollmerica Wednesday, February 13, 2013 10:34 AM
    Wednesday, February 13, 2013 10:34 AM

All replies

  • Hi

    I watched you capture.

    Sounds like you use Azure website feature, this time.

    Please choose your cloud project (not your web role project).

    Then choose publish.


    Dino He
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, February 12, 2013 5:12 AM
    Moderator
  • 

    I do that and for web role project and for cloud project. Web role site works fine, but not site with url ***.azurewebsites.net

    Tuesday, February 12, 2013 12:13 PM
  • I fixed this problem by "Enable package manager restore". Right click on solution -> Enable package manager restore.
    • Marked as answer by Pollmerica Wednesday, February 13, 2013 10:34 AM
    Wednesday, February 13, 2013 10:34 AM