Base solution for your next web application

Activities of "feryat.olcay"

Hi,

We got the following error.

"System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."

When we debugged our project, we realized that the token was not valid. First, we got the encrypted token, and then we needed to encode it for the SignalR URL.

Code :

                ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;
                var token = await _zenoApi.GetTokenAsync(true);
                var tokenEncode = System.Web.HttpUtility.UrlEncode(token);
                
                HubConnection connection = new HubConnectionBuilder()
               .WithUrl($"{_options.ZenoURL}signalr-data-collector?enc_auth_token={tokenEncode}")
               .WithAutomaticReconnect()
               .Build();

               await connection.StartAsync();

            

It's working now :) Thanks for your feedback.

Hi,

Yes, we tried with "https" and it is working with below code block on localhost. But, it is NOT working on IIS Server.

                ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;
                var token = await ZenoService.GetTokenAsync();   
                HubConnection connection = new HubConnectionBuilder()
               .WithUrl($"{_signalrUrl}?enc_auth_token={token}")
               .WithAutomaticReconnect()
               .Build();

                await connection.StartAsync();
                .
                .
                .

static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; }

Is there any specific control SignalR IIS Server.

Hi,

Prerequisites What is your product version? 11.3.0

What is your product type (Angular or MVC)? Angular

What is product framework type (.net framework or .net core)? .NET Core

We got the same error. In our scenario, we want to connect to the API with SignalR from a console application. We do not get any problems on local with Angular app and console app. When we deploy the API to IIS, we get the following error after run the Console App. Do you have a suggestion?

"AspNetCore.Server.IIS.Core.IISHttpServer - Connection ID "17582052955455006947", Request ID "8000a8e4-0002-f400-b63f-84710c7967bb": An unhandled exception was thrown by the application. System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."

Thank you for your support.

Hi,

Prerequisites What is your product version? 11.3.0

What is your product type (Angular or MVC)? Angular

What is product framework type (.net framework or .net core)? .NET Core

We got the same error. In our scenario, we want to connect to the API with SignalR from a console application. We do not get any problems on local with Angular app and console app. When we deploy the API to IIS, we get the following error after run the Console App. Do you have a suggestion?

"AspNetCore.Server.IIS.Core.IISHttpServer - Connection ID "17582052955455006947", Request ID "8000a8e4-0002-f400-b63f-84710c7967bb": An unhandled exception was thrown by the application. System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."

Thank you for your support.

<div class="form-group"> <label for="BillingHorizonPoolCredit_EffectiveDate">{{ l('EffectiveDate') }} *</label> <div class="input-group"> <div class="input-group-prepend"> <button class="btn btn-primary" type="button" (click)="dp.toggle()"> <i class="fa fa-calendar-day p-0" style="color: white" aria-hidden="true"></i> </button> </div> <input type="datetime" class="form-control" datePickerLuxonModifier #dp="bsDatepicker" bsDatepicker [bsConfig]="{ adaptivePosition: true }" [isUtc]="true" [maxDate]="billingHorizonPoolCredit.effectiveEndDate" [(date)]="billingHorizonPoolCredit.effectiveDate" [(ngModel)]="billingHorizonPoolCredit.effectiveDate" id="BillingHorizonPoolCredit_EffectiveDate" name="BillingHorizonPoolCredit_EffectiveDate" required /> </div> <validation-messages [formCtrl]="dp"></validation-messages> </div>

<div class="form-group"> <label for="BillingHorizonPoolCredit_EffectiveEndDate">{{ l('EffectiveEndDate') }}</label> <div class="input-group"> <div class="input-group-prepend"> <button class="btn btn-primary" type="button" (click)="dp.toggle()"> <i class="fa fa-calendar-day p-0" style="color: white" aria-hidden="true"></i> </button> </div> <input type="datetime" class="form-control" #dp="bsDatepicker" datePickerLuxonModifier bsDatepicker [bsConfig]="{ adaptivePosition: true }" [isUtc]="true" [minDate]="billingHorizonPoolCredit.effectiveDate" [(date)]="billingHorizonPoolCredit.effectiveEndDate" [(ngModel)]="billingHorizonPoolCredit.effectiveEndDate" id="BillingHorizonPoolCredit_EffectiveEndDate" name="BillingHorizonPoolCredit_EffectiveEndDate" /> </div> <validation-messages [formCtrl]="dp"></validation-messages> </div>

Hi,

thank you for the return. I upgraded the version of PrimeNG to "13.0.4" but the problem is still same. "primeng": "^13.0.4",

Is that possible to you connect to my computer .

Regards

Hi,

Thank you for your support. new version and the code block helped me.

Regards

Hi,

Any idea?

Showing 1 to 8 of 8 entries