.net-core

Does .NET Core 2.0 have SFTP client? [closed]

我们两清 提交于 2021-02-18 10:14:38
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Improve this question Needing to use an SFTP client and looking to build it in a .NET Core 2.0 application. I was wondering if SFTP is already part of .NET standard 2.0 or will I need to use a 3rd party library for this, e.g. SSH.NET? 回答1: There's no SFTP client in any current version

Optional Model Properties Binding in .NET Core MVC

六眼飞鱼酱① 提交于 2021-02-18 08:42:31
问题 I have created one AccountModel which has following properties public class AccountModel { [Required] [EmailAddress] public string Email { get; set; } [Required] [StringLength(10, MinimumLength = 6)] public string Password { get; set; } [NotMapped] // Does not effect with your database [Compare("Password")] [BindRequired] public string ConfirmPassword { get; set; } } I am trying to use same model for SignUp and SignIn . This model is perfectly working for signup but when I am using same model

Asp Core: Azure Ad Auth + custom JWT + custom Identity store

江枫思渺然 提交于 2021-02-18 08:41:21
问题 With ASP.NET Core 2.0 I try to achieve the following: Authentication via Azure AD (registered App) Custom JWT as the authentication scheme to make the the web app auth work across servers/instances be able to save the bearer to login with desktop clients Have a custom identity store to introduce custom roles, policies, and other. All these parts have working examples, but while trying to combine them I stumbled over some problems. The Web Api + Azure Ad Auth example uses JWT Tokens for

How to add claims to windows user

半腔热情 提交于 2021-02-18 05:42:07
问题 I have a dotnet core api app with windows app enabled. We have bunch of users which have special permission 'admin' and are stored in database, rest all have default permission 'user'. I want users to have extra claims who all are in database. Also I want to store more information like emailid, employee number(which I have to query from LDAP manually) What I thought is I will have one api, say api/auth which will capture the current user and add claims based on database and ldap query and

How to add claims to windows user

随声附和 提交于 2021-02-18 05:42:04
问题 I have a dotnet core api app with windows app enabled. We have bunch of users which have special permission 'admin' and are stored in database, rest all have default permission 'user'. I want users to have extra claims who all are in database. Also I want to store more information like emailid, employee number(which I have to query from LDAP manually) What I thought is I will have one api, say api/auth which will capture the current user and add claims based on database and ldap query and

CORS Policy has been blocked my subdomain

喜你入骨 提交于 2021-02-17 05:37:28
问题 I have a same domain, one of them is domain without prefix www. For example, https://www.example.com https://example.com First domain works fine because it is default domain. But second one has gives error when I do CRUD or accessing any api service. Access to XMLHttpRequest at 'https://www.example.com/hubCon/negotiate' from origin 'https://example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow

CORS Policy has been blocked my subdomain

99封情书 提交于 2021-02-17 05:37:08
问题 I have a same domain, one of them is domain without prefix www. For example, https://www.example.com https://example.com First domain works fine because it is default domain. But second one has gives error when I do CRUD or accessing any api service. Access to XMLHttpRequest at 'https://www.example.com/hubCon/negotiate' from origin 'https://example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow

DB2 .Net Connector error : AESEncryptADONet

人盡茶涼 提交于 2021-02-17 05:33:06
问题 I have a very simple .Net Core app trying to create and open a connection to a DB2 database (on AS/400). I have this error when I try to create the DBConnection object, with the message: ERROR 58005 SQL0902 There are no context policies. Function: AESEncryptADONet . There are no more details, unfortunately. 回答1: We meet the same error and solved it by setting Path of environment variables on Windows / Linux ( LD_LIBRARY_PATH ) / MacOS ( DYLD_LIBRARY_PATH ). For example: Our environment: ASP

Null ref when calling .ToList() within a Select function

拟墨画扇 提交于 2021-02-17 05:18:50
问题 in my .NET Core 3.1 application, I am getting a null reference exception when I include .ToList() on the following emailAddress =... line: var customersTask = eshop.TieredCustomer .Where(customer => customer != null) .Where(customer => customer.SendPriceListAutomatically.HasValue && customer.SendPriceListAutomatically.Value && customer.DistributionList.HasValue && !string.IsNullOrWhiteSpace(customer.Emails)) .Select(customer => new Customer { distributionList = customer.DistributionList.Value

Why .NET Standard 2 build references many assemblies instead of single netstandard.dll assembly

不打扰是莪最后的温柔 提交于 2021-02-17 05:16:30
问题 Unlike .NET Standard 1, .NET Standard 2 introduces a single netstandard.dll reference assembly. However, when compiling (with .NET Core SDK 2.2.203) with dotnet build we can see that it adds references to many assemblies (113), all under netstandard.library/2.0.3/build/netstandard2.0/ref/*.dll . One of these references is netstandard.dll . $ grep TargetFramework *.csproj <TargetFramework>netstandard2.0</TargetFramework> $ dotnet build --verbosity normal | grep -o netstandard.library/2.0.3