Sure. I make it work. lets me tell what i have done
if (IsTrue("ExternalAuth.WsFederation.IsEnabled"))
{
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
app.UseWsFederationAuthentication(CreateWsFederationAuthOptions());
}
System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate
{
return true;
};
I already do that, done some adfs configuration. Now i have problem when i am trying to login with AD user. I am using _userManager.LoginAsync method to login.
var loginResult = await _userManager.LoginAsync(loginInfo.Login, tenancyName);
loginInfo.Login.LoginProvider -- http://{servername}/adfs/services/trust
loginInfo.Login.ProviderKey -- {username}@{domain}
I am getting result => AbpLoginResultType.UnknownExternalLogin. why? How can i fix that? Am i doing something wrong?
I am trying to use adfs in abp, but i am facing not lot of problems. Can you provide full solution for aspnetzero and adfs?
or give me all steps what to do including adfs configuration
thanks
I have fixed it. I install postman (chrome extension) and found problem: I was using entity object in Dto, and rewrite to use it with additional dto to mapp this entity.
thanks for responce
here appservice: public PagedResultOutput<AnnouncementListDto> GetAllAnnouncements(GetAnnouncementInput input) { var totalCount = 0; var announcements = _announcementRepository .GetAll().Include(x => x.User).Include(x => x.AnnouncementDescription);
totalCount = announcements.Count();
announcements = announcements.OrderBy(x => x.CreationTime).PageBy(input);
return new PagedResultOutput<AnnouncementListDto>(totalCount, announcements.ToList().MapTo<List<AnnouncementListDto>>());
}
here jtable definition: _$announcementsTable.jtable({
title: app.localize('Announcement'),
paging: true,
sorting: true,
multiSorting: true,
actions: {
listAction: {
method: _announcementService.getAllAnnouncements
}
},
fields: {
id: {
key: true,
list: false
},
actions: {
title: app.localize('Actions'),
width: '12%',
sorting: false,
list: _permissions.edit || _permissions.delete,
display: function (data) {
var $span = $('<span></span>');
if (_permissions.edit) {
$('<button class="btn btn-default btn-xs" title="' + app.localize('Edit') + '"><i class="fa fa-edit"></i></button>')
.appendTo($span)
.click(function () {
_EditAnnouncementModal.open({ id: data.record.id });
});
}
if (_permissions.delete) {
$('<button class="btn btn-default btn-xs" title="' + app.localize('Delete') + '"><i class="fa fa-trash-o"></i></button>')
.appendTo($span)
.click(function () {
_announcementService.deleteAnnouncement(data.record);
});
}
return $span;
}
},
announcementDescription: {
title: app.localize('AnnouncementDescription'),
width: '8%',
display: function (data) {
var descriptions = '';
for (var j = 0; j < data.record.announcementDescription.length; j++) {
if (abp.localization.isCurrentCulture(data.record.announcementDescription[j].LanguageName)) {
descriptions = data.record.announcementDescription[j];
}
};
return descriptions;
}
},
publishDate: {
title: app.localize('PublishDate'),
width: '8%',
display: function (data) {
return moment(data.record.publishDate).format('L');
}
},
expirationDate: {
title: app.localize('ExpirationDate'),
width: '8%',
display: function (data) {
return moment(data.record.expirationDate).format('L');
}
}
}
});
I am trying to use jtable and in listaction method calling appservice, but i am getting this error : "There is an action GetAnnouncements defined for api controller app/announcement but with a different HTTP Verb. Request verb is GET. It should be Post".
How can i resolve this issue?