Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "Ricavir"

Question

Hi,

I'm getting an error when trying to navigate to swagger ui. ASP.NET CORE + angular 6 + v5.5.1

I'm getting follwing error :

INFO  2018-10-30 08:07:44,843 [74   ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://app.com/swagger/index.html  
ERROR 2018-10-30 08:07:45,262 [74   ] Microsoft.AspNetCore.Server.Kestrel      - Connection id "0HLHTUK2KI941", Request id "0HLHTUK2KI941:00000002": An unhandled exception was thrown by the application.
System.ArgumentNullException: Value cannot be null.
Parameter name: stream
   at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIIndexMiddleware.RespondWithIndexHtml(HttpResponse response)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIIndexMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at ELEVEN_SOFT.App.Web.Startup.Startup.<>c.<<Configure>b__5_1>d.MoveNext() in C:\repos\App_AspnetZero2\aspnet-core\src\ELEVEN_SOFT.App.Web.Host\Startup\Startup.cs:line 168
--- End of stack trace from previous location where exception was thrown ---
   at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)
   at Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
 

Error is on startup.cs... App is hoted on Azure.

Any idea how to fix that ?

Hi,

I'm using Aspnetcore + angular on version v5.5.. While lokking to app logs, I have a lot of WARN lines after signalr connection or impersonated connection.

LOG LINES are :

  • AFTER IMPERSONATED connection
  • calization.RequestLocalizationMiddleware - AbpLocalizationHeaderRequestCultureProvider returned the following unsupported cultures 'null'.
  • calization.RequestLocalizationMiddleware - AbpLocalizationHeaderRequestCultureProvider returned the following unsupported UI Cultures 'null'.
  • AFTER SIGNALR connection
  • calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported cultures 'null'.
  • calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported UI Cultures 'null'.
  • calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported cultures 'null'.
  • calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported UI Cultures 'null'.

I'm getting these logs on my local server and on AZURE as well

How can I fix this ?

Hi,

I'm creating this topic following this first one : [https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=11553&p=30940#p30940]) where I was asking for implementation advice.

I'm trying to build an application that provides specific permissions according to authenticated user : 1/ Permissions for basic users > same behavior as regular aspnetzero application 2/ Permissions for "external" users > limited to very limited UI

As you can see, the goal is to limit application for users that are considered as "externals".

I'm planning to extend user entity with a boolean property called "IsExternal". This property will be set to true if an external user submits some data (like creating a ticket for assistance purpose). All other users will have this property set to false. this property will be available on angular side by using AppSessionService > this allows to restrict UI easily (like chat, account managements...) for external users.

Nevertheless, I'm facing some chalenges with this design. I would like to manage users in two different ways. I want to manage standard users with existing UI (with Angular UserComponent) and create a dedicated UI for external users.

  • How can I separate permissions for standard users and for external users ? should I do it in PermissionAppService ? Or by implementing some filtering somewhere :shock:
  • How can I separate roles for classic users and roles for external users ? With RoleManager ? With RoleAppService ?
  • How can I adapt user repository to provide standard users OR external users but never displaying both ?

Thank you for your help

Hi,

I need some advice to build an angular front end. Basically, the goal is to have a ticket system management.

Then I need to have a way for an anonymous user to submit a ticket. This ticket will be stored in database and accessible to back end users.

I would like a very simple way to submit a ticket. Just a form with a Captcha. Anonymous user has to provide its email and a request message. A submit button to send the form. if email provided is recognized by backend, then a ticket is created and stored in database. If not, a popup is shown to anonymous user displaying a message that he has not been recognized.

As a second step, this anonymous user should be able to see a list of previous requests submitted to check there status (open, close). A simple login form with an email and password is needed to have access to this list.

I can see two solutions : 1- Create an additional angular page directly to the account module (which doesn't require auth) 2- Create a specific module based on account module (but need more time to do and may be some adaptations of angular routes)

What solution would you choose in this case ?

How would you manage this new simple authentication system (email + password) ? Should I use your existing ABP user mechanism with a static role that will limit anonymous user to a specific Angular Module OR should I do it on my own with very limited features (login, logout, forgot password, create new ticket, ticket list)

Suggestions and advices would be much appreciated ;)

Hi,

Is it possible to change a user setting on client side without refreshing client angular page ?

The use case is :

  • user saves an entity by calling a server appservice
  • this appservice change a user setting "setting-A" on server side
  • if user navigates to other pages on client side AND angular application tries to read user setting "setting-A", then "setting-A" will not reflect last value stored on server side.

Is there a way to change this user setting on client side without refreshing ? If no, is there another alternative instead of having to create a dedicated appservice ?

@Alper : I would like to speedup xamarin startup and would like to have your advice.

I was thinking on following : 1 . store appcontext localy to avoid httprequest on each startup 2. display a spinner (or any animation) after 1-2 seconds before displaying login page

Thanks for your help

Question

Hi,

I've upgraded my existing project from v5.1 to v5.5.

Webpack build is very long the first time ; it takes more than 5 minutes to finish building when arriving at : "92% after chunk asset optimization SourceMapDevToolPlugin main.js generate SourceMap"

Before upgrading my project, building was very fast (less then 50s for sure)

I tried to reinstall node but same problem.

DO you have any idea to solve this ?

Hi,

I'm currently developing a basic Xamarin application (based on v5.1 template). Everything was working well.

I don't know why but know, my app fails when slash screen is displayed : the problem occurs at App.xaml.cs on InitializeComponent() method. Exception is "Specified cast is not valid". Do you know why a cast would be not valid ?

The stack trace is :

System.InvalidCastException: Specified cast is not valid. at (wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr) at Xamarin.Forms.OnPlatform1[T].op_Implicit (Xamarin.Forms.OnPlatform1[T] onPlatform) [0x00036] in D:\agent_work\2\s\Xamarin.Forms.Core\OnPlatform.cs:71 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <f32579baafc1404fa37ba3ec1abdc0bd>:0

I came back to previous GIT commits, but still same issue...

Hello,

I'm using Xamarin App v5.1 with aspcore server (also in v5.1)

When I start Xamarin app and connect a user, app language is always set to English ; even if user has set its default language to French before. Also, when I connect to the angular application, I notice that default user language has also changed to english.

Users are then obliged to set their language after each app startup (Xamarin AND Angular)!

Do you know this issue ? I don't see any existing issue on GitHub about it.

Hi,

I'm currently testing android app without any change (just assets). Everything is working well on my dev machine. But when I try to target my production server (on Azure), I can't connect.

I'm getting a token after authentication, but app throws an exception when calling ProxySessionAppService ( api/services/app/Session/GetCurrentLoginInformations)

Do you know why ? Do I need to publish my Android App first to make it work with my production server ?

Showing 51 to 60 of 93 entries