Test if string is a guid without throwing exceptions?

I want to try to convert a string to a Guid, but I don't want to rely on catching exceptions ( for performance reasons - exceptions are expensive for usability reasons - the debugger pops up for...

Insert JSP Form Data in DataBase Using Spring Controller

i am making rest web services using spring. with the help of rest client-ui i am Easily Insert update and Delete the User. now i want to do the same things with the User JSP page but now am not...

MVC 3 Razor webgrid - how to change the table width

I have a problem where whatever I try I can't change the width of the webgrid table. It ignores the css of its parent div and changing the width of the grid using css doesn't have any...

django-cors-headers not work

django-cors-headers not work INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', ...

Change e-mail or password in AspNetUsers tables in ASP.NET Identity 2.0

I have implemented the ForgotPassword (with token reset) into my MVC 5 application. We are in production. Although this works in majority of the cases, many of our end-users are of older age and...

UserManager VerifyUserTokenAsync Always False

I'm generating a usertoken like so public async Task GenerateCode() { var code = await UserManager.GenerateUserTokenAsync("heymega", new Guid("16139fcd-7ae0-449c-ad1c-f568bbe46744")); } I...

How to join a client to group in MVC using signalR?

I looked everywhere but could not find or understand how to make a client join a SignalR group. I'm using mvc 4 with the system users. I am programming a game of online Tic-Tac-Toe. My goal is to...

ASP.net core auth cookie not being set in Google Chrome when running in dev

I have three applications in my solution, all built in asp.net core 1 MVC 6. App 1 is an MVC app used for authenticating a user. App 2 is an Angular SPA app and is the main app in the...

CQ user is not getting added into group using Java in AEM 6.2

I am trying to add a cq user in AEM a group. I using below code. Code running successfully but the user is not getting added into the group. Can you please see where I am doing a mistake? ...

com.jcraft.jsch.JSchException: connection is closed by foreign host when i use jsch to connect my ftp server

i want to start a Sftp server by embedding it in my java code . when i start the Sftp server and then start the client , the exception throws . my server code public class EmbeddedSftpServer { ...

Cannot find module environment when running in server side with Angular Universal

I have a simple Angular 4 app that I want to run in server side with Angular Universal (nodeJs server side rendering). I followed these steps to configure the Angular Universal with the...

Django filter choices in ForeignKey field in a ModelForm

How can I filter the options shown for a ForeignKey field in a Model Form? I tried to follow this thread...

extend UserManager to search User by relation (symfony3)

I installed FOSUserbundle and HWI Oauth bundle. My problem is: I want to access data from my user entity that is stored in a relation. I'd like to access the data from the fields...

ASP.NET Core MVC Dependency Injection via property or setter method

It has been well documented, how to inject dependencies into services. Question: But is it (already) possible in ASP.NET Core 2.0 to have the system's DI mechanism automatically inject a service...

Overriding OnTokenValidated JwtBearerEvents with Custom function .NET Core 2

In my API project I am handling authentication with JwtBearer (users login using Azure). When the API is called the token is being validated with the defined Azure instance and this all works...

ApplicationUserManager - UserManager throwing exception on creating new user

I am using the default ASP.net 'Register' method to create a new user from another controller: public async Task<ActionResult> SyncNewUsers() { RegisterViewModel register = new...

(admin.E116) The value of 'list_filter[3]' refers to 'groups', which does not refer to a Field

While trying to create my own user model and admin, the test gives the following error. <class 'core.account.admin.UserAdmin'>: (admin.E019) The value of 'filter_horizontal[0]' refers to...

How to return user details in response after login in django rest_framework

Hi I am beginner in Django Here I want user email and name in response after user login using api. Thanks in advance for your help. models.py I want user email and user name in response only...

type object 'User' has no attribute 'objects django

i am trying to get list of user from api with jwt token so i generated the token and with email and pass and trying to make get request with token but i get this erro: File...

.NET Core 3 dependency injection in custom validation

I want to make a custom validation attribute in .NET Core called CheckIfEmailExists. I want to make sure the user is not in my database already. So this is my create user view model: public class...

How to create an admin user with .NET Core 3 Authentication

I started my project as a .NET Core Web API project using Code-First EF (database managed via migration classes). I have my endpoints working but now need authentication. I have scaffolded...

ImportError: cannot import name '...' from partially initialized module '...' (most likely due to a circular import)

I'm upgrading an application from Django 1.11.25 (Python 2.6) to Django 3.1.3 (Python 3.8.5) and, when I run manage.py makemigrations, I receive this messasge: File...

OpenIddict migration from v2 to v3 rc1 - Login success, Authorize Failed

I have tried to migration my project from v2 to v3 and I think i have updated everything, but for some reason i can login fine and i get an access_token returned, but this access_token fails to...

How to unit test IValidatableObject Validate when it uses services for validation?

My Validate method is accessing various services for validation. These services are dependency injected and can be accessed using the validationContext.GetService method. During runtime, this...

Django claiming inconsistent migration history on first migration

I have been working on a project for a while, and I have been having no trouble with migrations. I decided reset the database and migrations, which I do from time to time. I went to delete all...

DRF auth_token "non_field_errors": [ "Unable to log in with provided credentials." ] using custom user model

I'm trying to create a rest api using an existing database. I am also using drf token authentication and have created tokens for all existing users. When I try to enter my username and password to...

Apache embeded FTPS (Mina) issue on Java11+

I have a very simple Java 8 project (FTP server), which uses Apache FTPS (Mina) server library (v. 1.1.1). It is as simple as the following code: ListenerFactory factory = new...

Core 5, PasswordSignInAsync fails to set cookie in dual Authentication scheme

I am writing a frontend/backend application. The frontend is an Angular 13 application. The backend is a combination backend API and administration web site. The backend has: Local Identity...

Static files are NotFound in ASP NET 6 with Angular 12 and IndividualAccounts Visual Studio template

We have a project that has been started 5 years ago in ASP .NET MVC 4. When DOTNET Core was released, we migrated the entire application in the Visual Studio with Angular template. Since at that...

Trouble when using ApplicationUser: IdentityUser, UserManager in clean architecture asp.net core

I am working a asp.net core 6.0 WebAPI in a clean Architecture.https://github.com/jasontaylordev/CleanArchitecture There are 4 projects in this architecture. WebApi, Infrastructure, Application...