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

Activities of "entripy"

I am struggling to enable OpenIDConnect authentication using core and Angular. I've update my appSettings files like below but can't get things to work. I've tried numerous other combinations as well with no luck.

"OpenId": { "IsEnabled": "true", "Authority": "https://login.microsoftonline.com/xxxxxxxxxxxxxxxxxxxxxxxxxxx/v2.0", "ClientId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "LoginUrl": "https://login.microsoftonline.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/oauth2/v2.0/authorize", },

Hi, I am using following ajaz call with abp.ajax to controller.

$("#mapBtn").on("click", function (e) {
            var data = buildDataObject();
            abp.ajax({
                url: "Map",
                data: JSON.stringify({
                ColumnName1: $("#selector1").val(),
                HasHeader: $("#selector2").is("checked"),
                
            }),
                content: "application/json; charset=utf-8",
                type:'post'
            }).done(function (data) {
                abp.notify.success('Created  ');});
          
        });

My model class:

public class MyClass {
        public string ColumnName1 { get; set; }
        public bool HasHeader { get; set; }
    }

My controller action is as follows: I used [DisableValidation] on the controller.

[HttpPost]
public async Task<ActionResult> Map([FromBody] MyClass data)
        {
                       // data  is null 
            return View("Import");
        }

data is always null. When I replaced myclass with dynamic type; i do get data back but its not in a format I can convert to my model. Can you point me to what is missing?

I am working on ASP.NET Zero which is built on ASP.NET Core. I was getting a bad request error when I used KendoUI Upload control on one of my pages. After lot of research and investigation, I realized the HTTP POST Ajax request is failing with 400 bad request error. My code samples below have some commented line for other scenarios I test. None of the existing posts in stack over flow solved my issue. I Below is my ajax call:

$.ajax({ url: "/test/TestCall", type: 'Post', /* data: JSON.stringify({ "Param1": "test" }), dataType:"json", processData: false, */// tell jQuery not to process the data contentType: "application/json", // tell jQuery not to set contentType success: function (result) { var res = result; }, error: function (jqXHR) { var z = 3; }, complete: function (jqXHR, status) { var x = 10; } }); My Controller code is: I also tried without extending from MyTestProjectControllerBase and just using the Controller base class. It did not work.

public class TestController : MyTestProjectControllerBase { public IActionResult Index() { return View(); }

[HttpPost] public ActionResult TestCall() { //return Content("Name is:" ); return new ContentResult() { Content = "test" }; } } What am I missing? I tried using postman and I see this additional information 'Request cannot be fulfilled due to bad syntax'

could not figure it out after spending good 8 hours on this issue. Not sure if the issue is with Asp.net core or asp.net zero. Any pointers would be greatly appreciated.

Hi,

We had a hard time using Azure AD for authentication with ASP.Net Zero (ASP.NET Zero Core & jQuery). Our understanding is to use OpenID Connect for authentication. It took us to the Microsoft login page and we can see the reply URL ('/signin-oidc') with a 'Identity.External' cookie. But it redirected us to the application login page. After stepping through the 'ExternalLoginCallback' action method, we realized that the 'GetExternalLoginInfoAsync' returned null.

This is the only change we made to the appsettings.json file.

"OpenId": { "IsEnabled": "true", "Authority": "https://login.microsoftonline.com/{tenant_id}/v2.0", "ClientId": "{Client_id}", "ClientSecret": ""
}

Are we missing some configurations for OpendId to work? is there any way for us to retrieve error messages from 'GetExternalLoginInfoAsync'?

Thank you.

Showing 1 to 4 of 4 entries