Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to parse certain values from an invisible cmdline Pin
wesley994626-Aug-18 13:37
wesley994626-Aug-18 13:37 
AnswerRe: How to parse certain values from an invisible cmdline Pin
OriginalGriff26-Aug-18 21:25
mveOriginalGriff26-Aug-18 21:25 
AnswerRe: How to parse certain values from an invisible cmdline Pin
Matias Lopez31-Aug-18 8:54
Matias Lopez31-Aug-18 8:54 
QuestionC# float variable are losing their decimals after being inserted on MySQL database Pin
Member 1394865826-Aug-18 2:18
Member 1394865826-Aug-18 2:18 
QuestionRe: C# float variable are losing their decimals after being inserted on MySQL database Pin
Richard MacCutchan26-Aug-18 2:56
mveRichard MacCutchan26-Aug-18 2:56 
AnswerRe: C# float variable are losing their decimals after being inserted on MySQL database Pin
OriginalGriff26-Aug-18 4:04
mveOriginalGriff26-Aug-18 4:04 
AnswerRe: C# float variable are losing their decimals after being inserted on MySQL database Pin
Richard Andrew x6426-Aug-18 4:16
professionalRichard Andrew x6426-Aug-18 4:16 
AnswerRe: C# float variable are losing their decimals after being inserted on MySQL database Pin
MadMyche27-Aug-18 9:38
professionalMadMyche27-Aug-18 9:38 
GeneralRe: C# float variable are losing their decimals after being inserted on MySQL database Pin
Richard Andrew x642-Sep-18 5:20
professionalRichard Andrew x642-Sep-18 5:20 
QuestionHow to get all excel cell data and update new data under specific cell using c# Pin
Sammed24-Aug-18 2:36
Sammed24-Aug-18 2:36 
QuestionC# List<Task> Execution Order Pin
Kevin Marois23-Aug-18 8:22
professionalKevin Marois23-Aug-18 8:22 
AnswerRe: C# List<Task> Execution Order Pin
Richard Deeming23-Aug-18 8:37
mveRichard Deeming23-Aug-18 8:37 
GeneralRe: C# List<Task> Execution Order Pin
Kevin Marois23-Aug-18 9:00
professionalKevin Marois23-Aug-18 9:00 
GeneralRe: C# List<Task> Execution Order Pin
Bernhard Hiller23-Aug-18 21:40
Bernhard Hiller23-Aug-18 21:40 
QuestionUnzip file from resources Pin
JCompier21-Aug-18 19:15
JCompier21-Aug-18 19:15 
AnswerRe: Unzip file from resources Pin
OriginalGriff21-Aug-18 19:34
mveOriginalGriff21-Aug-18 19:34 
AnswerRe: Unzip file from resources Pin
Daniel Pfeffer21-Aug-18 20:52
professionalDaniel Pfeffer21-Aug-18 20:52 
GeneralRe: Unzip file from resources Pin
JCompiler22-Aug-18 2:33
JCompiler22-Aug-18 2:33 
GeneralRe: Unzip file from resources Pin
Richard Deeming22-Aug-18 2:43
mveRichard Deeming22-Aug-18 2:43 
GeneralRe: Unzip file from resources Pin
JCompiler22-Aug-18 3:05
JCompiler22-Aug-18 3:05 
GeneralRe: Unzip file from resources Pin
JCompiler22-Aug-18 4:30
JCompiler22-Aug-18 4:30 
GeneralRe: Unzip file from resources Pin
Richard Deeming22-Aug-18 4:42
mveRichard Deeming22-Aug-18 4:42 
AnswerRe: Unzip file from resources Pin
jschell25-Aug-18 4:36
jschell25-Aug-18 4:36 
GeneralRe: Unzip file from resources Pin
Richard Deeming28-Aug-18 3:06
mveRichard Deeming28-Aug-18 3:06 
QuestionUse custom services inside OAuthorizationProviders Pin
Member 1204569221-Aug-18 3:39
Member 1204569221-Aug-18 3:39 
Im currently developing a token based web api.

In my startup.cs, I have the following code:
C#
OAuthAuthorizationServerOptions OAuthServerOptions = new OAuthAuthorizationServerOptions()
        {
            AllowInsecureHttp = true,
            TokenEndpointPath = new PathString("/token"),
            AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(30),
            Provider = new SimpleAuthorizationServerProvider(),
            RefreshTokenProvider = new SimpleRefreshTokenProvider()
        };


Here is some code from my SimpleAuthorizationServerProvider:
C#
public class SimpleAuthorizationServerProvider : OAuthAuthorizationServerProvider
    {
        private readonly IAuthService _authService;

        public SimpleAuthorizationServerProvider(IAuthService authService)
        {
            _authService = authService;
        }
     }


The problem I have is that I get the following error in my startup.cs:
There is no argument givet that corresponds to the required formal parameter 'authService' of SimpleAuthenticationProver.SimpleAuthenticationprover(IAuthService)

I also get the same for SimpleRefreshTokenProvider, because Im using my authservice there too.

So how can I fix this In a nice way? I want to use my authservice inside my providers.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.