Base solution for your next web application

Activities of "20summers"

Nothing like the power of a reboot to fix all

Here is the error in Full

ArgumentException: The 'SiteKey' option must be provided.
PaulMiami.AspNetCore.Mvc.Recaptcha.Guards.CheckMandatoryOption(string s, string name)
PaulMiami.AspNetCore.Mvc.Recaptcha.RecaptchaService..ctor(IOptions<RecaptchaOptions> options)

TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeMethodHandle.InvokeMethod(object target, Object[] arguments, Signature sig, bool constructor)
System.Reflection.RuntimeConstructorInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Reflection.MethodBase.Invoke(object obj, Object[] parameters)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.FastCreateInstance(Type implType, Object[] arguments, ConstructorCandidate constructor)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)

ComponentActivatorException: ComponentActivator: could not instantiate PaulMiami.AspNetCore.Mvc.Recaptcha.RecaptchaService
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, bool trackedExternally)
Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, bool requiresDecommission, bool instanceRequired, out Burden burden)
Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, bool instanceRequired)
Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)
Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)
Castle.Windsor.WindsorContainer.Resolve(Type service)
Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.ResolveInstanceOrNull(Type serviceType, bool isOptional)
Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, bool isOptional)
Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetRequiredService(Type serviceType)
Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<T>(IServiceProvider provider)
PaulMiami.AspNetCore.Mvc.Recaptcha.RecaptchaServiceCollectionExtensions+<>c.<AddRecaptcha>b__0_0(IServiceProvider sp)
Castle.Windsor.MsDependencyInjection.WindsorRegistrationHelper+<>c__DisplayClass5_0.<RegisterServiceDescriptor>b__0(IKernel c)
Castle.MicroKernel.Registration.ComponentRegistration+<>c__DisplayClass89_0.<UsingFactoryMethod>b__0(IKernel k, ComponentModel m, CreationContext c)
Castle.MicroKernel.ComponentActivator.FactoryMethodActivator.Instantiate(CreationContext context)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, bool trackedExternally)
Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, bool requiresDecommission, bool instanceRequired, out Burden burden)
Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, bool instanceRequired)
Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromKernelByType(CreationContext context, ComponentModel model, DependencyModel dependency)
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromKernel(CreationContext context, ComponentModel model, DependencyModel dependency)
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveCore(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, bool trackedExternally)
Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, bool requiresDecommission, bool instanceRequired, out Burden burden)
Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, bool instanceRequired)
Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromKernelByType(CreationContext context, ComponentModel model, DependencyModel dependency)
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromKernel(CreationContext context, ComponentModel model, DependencyModel dependency)
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveCore(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context)
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, bool trackedExternally)
Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, bool requiresDecommission, bool instanceRequired, out Burden burden)
Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, bool instanceRequired)
Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context)
Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)
Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)
Castle.Windsor.WindsorContainer.Resolve(Type service)
Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.ResolveInstanceOrNull(Type serviceType, bool isOptional)
Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, bool isOptional)
Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetRequiredService(Type serviceType)
Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext)
Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider+<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+<InvokeInnerFilterAsync>d__14.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextExceptionFilterAsync>d__23.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ExceptionContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__22.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__17.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__15.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNetCore.Builder.Extensions.MapMiddleware+<Invoke>d__3.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.Owin.Mapping.MapMiddleware+<Invoke>d__0.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNetCore.Owin.WebSocketAcceptAdapter+<>c__DisplayClass6_0+<<AdaptWebSockets>b__0>d.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware+<Invoke>d__4.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
IdentityServer4.Hosting.IdentityServerMiddleware+<Invoke>d__3.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+<Invoke>d__6.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware+<Invoke>d__7.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
IdentityServer4.Hosting.BaseUrlMiddleware+<Invoke>d__3.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware+<>c__DisplayClass0_0+<<UseJwtTokenMiddleware>b__0>d.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware+<>c__DisplayClass0_0+<<UseJwtTokenMiddleware>b__0>d.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+<Invoke>d__6.MoveNext()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7.MoveNext()

I upgraded to Visual Studio 15.7.3 last night.

When I try to logon this morning to <a class="postlink" href="http://localhost:62114/Account/Login">http://localhost:62114/Account/Login</a> I get an error:

An unhandled exception occurred while processing the request.
ArgumentException: The 'SiteKey' option must be provided.
PaulMiami.AspNetCore.Mvc.Recaptcha.Guards.CheckMandatoryOption(string s, string name)

TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeMethodHandle.InvokeMethod(object target, Object[] arguments, Signature sig, bool constructor)

ComponentActivatorException: ComponentActivator: could not instantiate PaulMiami.AspNetCore.Mvc.Recaptcha.RecaptchaService
Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstanceCore(ConstructorCandidate constructor, Object[] arguments, Type implType)
Question

Hi

I have seen the updates to the ASP.NET Boilerplate documents section ( <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents">https://aspnetboilerplate.com/Pages/Documents</a> ). Any chance we can have this functionality built into Boilerplate or share the souce code for this.

It would be nice to either show version update information or could be used as a Help section on your custom solution.

Thanks

I have created a new Area called CRM that I have in addition to the App area All is working well except the custom menu for this area This new area has its own Startup Folder with public class CRMNavigationProvider : NavigationProvider

I find when I change this line from App to CRM public const string MenuName = "CRM";

I get the following error

AbpException: There is no menu with given name: CRM Abp.Application.Navigation.UserNavigationManager+<GetMenuAsync>d__12.MoveNext()

When I change it back to App, I do not get the error, but it shows the menu from the App Area

How Do I implement a custom menu for this area?

Would you feel comfortable explaining to me how your reporting module works, as I want to build something like this, but dont know where to start.

Hi,

Would I load the Nuget for this into the Application, Core, or EntitiyFrameworkCore Projects?

I have a table where I store the current sales values that I import from an excel file.

Is there a quicker way to do this than each item being deleted?

var query = _crmOpportunityRepository
                    .GetAll();

                foreach (var item in query)
                {
                    await _crmOpportunityRepository.DeleteAsync(item.Id);
                }

Here is my code that I used...

_createorEditModal has the following :

<div class="row">
        <div class="col-md-12">
          
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="panel-title">
                        Drag n' drop uploader
                    </div>

                </div>
                <form id="upload-widget" method="post" class="dropzone" enctype="multipart/form-data" required>
                </form>
                
            </div>
          
        </div>
    </div>

_CreateOrEditModal.js has the following: you will see it returns the saved documents Id

$(document).ready(function () {
    Dropzone.autoDiscover = false;
    $(".dropzone").dropzone({
        url: "/App/Documents/UploadDocument/",
        uploadMultiple: false,
        paramName: "file",
        parallelUploads: 1,
        maxFiles: 1,
        headers: {
            "X-XSRF-TOKEN": abp.security.antiForgery.getToken()
        },
        success: function (file, response) {
            $('#form').append('<input type="hidden" name="DocumentId" value="' + response.result.id + '" />');
        }
    });
});

the Document controller:

[HttpPost]
       [AllowAnonymous]
        public ActionResult UploadDocument()
        {
            try
            {
                var documentFile = Request.Form.Files.First();

                string ext = Path.GetExtension(documentFile.FileName);

                //Check input
                if (documentFile == null)
                    throw new UserFriendlyException(L("File_Empty_Error"));

                byte[] fileBytes;
                using (var stream = documentFile.OpenReadStream())
                {
                    fileBytes = stream.GetAllBytes();
                }

                var documentFileObject = new BinaryObject(AbpSession.GetTenantId(), fileBytes);
                _binaryObjectManager.SaveAsync(documentFileObject);

                

                return Json(new AjaxResponse(new {id = documentFileObject.Id }));
            }
            catch (UserFriendlyException ex)
            {
                return Json(new AjaxResponse(new ErrorInfo(ex.Message)));
            }
        }

Thanks - will give it a try

Showing 11 to 20 of 34 entries