Base solution for your next web application

Activities of "ecairncross"

Hi There,

I'm using the latest framework version(1.0) and trying to get notifications to work, but I'm not getting any response in the client when inserting something like this in my controller:
abp.event.on('abp.notifications.received', function (userNotification) { abp.log.debug(userNotification); });

I have tried using all 3 different publish types from the Documentation(General, user and entity specific), and what I've noticed is that while [AbpUserNotifications] and [AbpTenantNotifications] has new rows when I publish with _notificationPublisher.PublishAsync(...), there is no new entry in [AbpNotifications]. I'm guessing that this has something to do with the problem, but I'm not sure what the solution would be...

Any help would be great! Thanks

_notificationPublisher.PublishAsync(

Hi There,

So I've got my site running fine on Microsoft Azure, but as soon as I try to access the site via a custom domain, I get errors on any Web Api calls made to methods with the [AbpAuthorize] attribute.

The error is: Abp.WebApi.ExceptionHandling.AbpApiExceptionFilterAttribute

Message: No Language Defined!

Exception: System.ApplicationException: No language defined! at Abp.Localization.MultiTenantLocalizationDictionaryProvider.GetDefaultDictionary() at Abp.Localization.MultiTenantLocalizationDictionaryProvider.get_DefaultDictionary() at Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource.GetStringOrNull(String name, CultureInfo culture, Boolean tryDefaults) at Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource.GetString(String name) at Abp.Authorization.AuthorizationHelper.<AuthorizeAsync>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Authorization.AuthorizationHelper.<CheckPermissions>d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Authorization.AuthorizationHelper.<AuthorizeAsync>d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nito.AsyncEx.AsyncContext.<>c__DisplayClass3.<Run>b__1(Task t) at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nito.AsyncEx.AsyncContext.Run(Func`1 action) at Abp.Authoriz

Any Help would be great. This ONLY happens via my custom domain, if I run the site via the azure path it runs fine!

Thanks!

Hi There,

So I've recently checked the audit logs, and one entry that keeps coming up is:

DEBUG 2016-09-09 05:42:22,415 [69 ] Abp.Auditing.WebAuditInfoProvider - System.Net.Sockets.SocketException (0x80004005): No such host is known

Am I missing some sort of configuration setting so that I get this error?

Thanks for your help!

Hi There, I've just updated all my projects and fixed all the breaking changes. My solution builds fine, but falls over at runtime. The stacktrace is the following:

[NullReferenceException: Object reference not set to an instance of an object.] Abp.Web.Mvc.Controllers.AbpController.SetCurrentMethodInfoAndWrapResultAttribute(ActionExecutingContext filterContext) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Mvc\Web\Mvc\Controllers\AbpController.cs:302 Abp.Web.Mvc.Controllers.AbpController.OnActionExecuting(ActionExecutingContext filterContext) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.Web.Mvc\Web\Mvc\Controllers\AbpController.cs:289 System.Web.Mvc.Controller.System.Web.Mvc.IActionFilter.OnActionExecuting(ActionExecutingContext filterContext) +24 System.Web.Mvc.Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex) +184 System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__31(AsyncCallback asyncCallback, Object asyncState) +75 System.Web.Mvc.Async.WrappedAsyncResult1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30 System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +114 System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate1 endDelegate, Object tag, Int32 timeout) +97 System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters, AsyncCallback callback, Object state) +181 System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState) +904 System.Web.Mvc.Async.WrappedAsyncResult1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30 System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +114 System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate1 endDelegate, Object tag, Int32 timeout) +71 System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +307 System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +46 System.Web.Mvc.Async.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +43 System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +114 System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object callbackState, BeginInvokeDelegate1 beginDelegate, EndInvokeVoidDelegate1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext) +83 System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +362 System.Web.Mvc.Controller.<BeginExecute>b__14(AsyncCallback asyncCallback, Object callbackState, Controller controller) +32 System.Web.Mvc.Async.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +35 System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +114 System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object callbackState, BeginInvokeDelegate1 beginDelegate, EndInvokeVoidDelegate1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext) +101 System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +338 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +30 System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +53 System.Web.Mvc.Async.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +43 System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout) +114 System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object callbackState, BeginInvokeDelegate1 beginDelegate, EndInvokeVoidDelegate1 endDelegate, TState invokeState, Object tag, Int32 timeout, SynchronizationContext callbackSyncContext) +83 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +290 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +67 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +30 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +103 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Any help would be greatly appreciated!

Answer

Hey,

I've tried overriding those methods, returning an arbitary value just so i can see if the debugger goes into the methods, but it never ends up there. It goes into the PermissionChecker constructor, but never finds itself in the overridden methods, and therefore never never applies custom logic. Any ideas?

Answer

Yep, that did the trick!

Any idea of how to implement custom authorization using the ABPAuthorize attribute? I don't see any examples for overriding the attribute...

Thanks again.

Question

Hi There,

I've created a Project based on ABP + ModuleZero template, but when I try to login as admin with the default password(AM4OLBpptxBYmM79lGOX9egzZk3vIQU3d/gFCJzaBjAPXzYIK3tQ2N7X4fcrHtElTw==), I get an invalid password exception. I've tried creating the project twice, and the password in the db is definitely correct, but I can't seem to get around this error.

Also, this means that because I can't log a user in, abpauthorize always fails. Is there a way to disable the abpauthorize login check, or override the abpauthorize function to implement custom authorization attributes?

Thanks a lot!

Hi There,

Thanks again for the fantastic work on the Framework. I followed the test tutorial you made on Code Project, and everything was working fine, but now I'm getting this error message from Effort, and ALL my tests fail. I'm not sure what I changed to create the error, but I can't seem to find a way to fix it...

I've tried the suggestions in the error, but no luck. Any help would be much appreciated!!

Effort.Exceptions.EffortException : The Effort library failed to register its provider automatically, so manual registration is required.

a) Call the Effort.Provider.EffortProviderConfiguration.RegisterProvider() method at entry point of the application

or

b) Add the following configuration to the App.config file: <system.data> <DbProviderFactories> <add name="Effort.Provider" invariant="Effort.Provider" description="Effort.Provider" type="Effort.Provider.EffortProviderFactory, Effort" /> </DbProviderFactories> </system.data>

<entityFramework> <providers> <provider invariantName="Effort.Provider" type="Effort.Provider.EffortProviderServices, Effort" /> </providers> </entityFramework> ---- System.InvalidOperationException : The Entity Framework was already using a DbConfiguration instance before an attempt was made to add an 'Loaded' event handler. 'Loaded' event handlers can only be added as part of application start up before the Entity Framework is used. See <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkId=260883">http://go.microsoft.com/fwlink/?LinkId=260883</a> for more information.

Hi There,

First, thanks for a fantastic framework!

I'm busy trying to set up an application, but I'm using claims authorization. This requires that I apply [Authorize] to my methods in the WebApi project, but since the API is Dynamically generated, I'm not sure how to do this.

I've tried creating web api controllers(using AbpWebApiController) and securing the methods like that, but how do I then call the services using constructor injection? Is this possible? I basically just want to be able to call the Application layer services from the Web Api layer, but I'm not sure how to do this, since I'm struggling to resolve the App Service interface from the Controller(Web Api is looking for a default constructor, and when I use IocManager.Instance.IocContainer.Resolve, the services don't seem to work).

Any help would be greatly appreciated...

Thanks!

Showing 1 to 9 of 9 entries