I'm planning to use Identity Server 4 in our B2C Site, and started learning Identity Server. For the beginning, I down downloaded Sample QuickStarts source code from your github page.(https://github.com/IdentityServer/IdentityServer4/tree/main/samples/Quickstarts)
Problem occurred soon after I started debugging '1_ClientCredentials' program, which I can't come up with the solution.
The failure occurs in the Main method of the Program class of the "Client" project.
namespace Client
{
public class Program
{
private static async Task Main()
{
// discover endpoints from metadata
var client = new HttpClient();
var disco = await client.GetDiscoveryDocumentAsync("https://localhost:5001"); **//<=Here!!**
if (disco.IsError)
{
Console.WriteLine(disco.Error);
return;
}
・・・・
The 'IsError' property of the return value of the method is always true, so the client program is not able to proceed from then on.
The url 'https://localhost:5001' is valid, as I confirmed the url'https://localhost:5001/.well-known/openid-configuration' shows the correct json output on the browser.
What I'd like to know is how to let the HttpClient instance receive resonse for the document request.
For your reference, I have put the program in question in my GitHub repository below.
https://github.com/TrailRunner-MF/Samples/tree/master/QS1_ClientCredentials
Solution name is slightly different from the original, but the action is completely the same, especially when it stops at the location I mentioned
The solution name is slightly different from the original, but program code is the same except 'IdentityServer' project output letter's on the browser.
I hope someone might download them, build them, start debugging by setting 'Client' project as a startup project, and confirm if the problem occurs or not.And show me the solution for this problem.
Thank you.
The problem was solved in a simple way.
I have to set the solution as 'Multi start up project'.
(I had thought IdentityServer and Api would be kicked automatically by dependancy relation between projects inside the solution. But it was wrong.)
The way it was done is as follows.
Select 'Property' in the context menu of the solution.
Choose 'Multi startup projects' in the Property Page Dialog.
Set the Action as 'start' for each projects.
After than, I can proceed the debugging by clicking 'Start Debugging' button as I show below.
Thank you.
Related
i tried following the steps mentioned "https://github.com/watson-developer-cloud/document-conversion-nodejs" and is able to load the app which works well with sample pdf file.
But when i try using my pdf file it throws error "Missing required parameters:
either params.file or params.document_id must be specified"
Also in the above mentioned git hub link the step 7 is not clear, it mentions run node setup.js but i am not able to find out that file.
has anybody faced this kind of issue.Kindly reply.
Thanks for pointing out the confusing step 7 in the document-conversion-nodejs repo. That's not a valid step and I've submitted a pull request to remove it.
You should be able to change the sample files with your own, if this is what you are trying to do. I would need to see some of your code to maybe figure out what is going on with it.
There is an alternative repository [watson-developer-cloud/node-sdk] that you also can use to create your NodeJS application. It also has an example (examples/document_conversion.v1.js) on how to run the service.
Besides entering your service credentials, all you need to do is place the document you want to convert in the "resources" folder and point to it in this line:
fs.createReadStream(__dirname + '/resources/YOUR_DOCUMENT')
The tutorial and the API documentation could also be of help.
I see a strange behavior with Calendar CE portlet. I just want to know what is the reason behind it.
My Calendar CE portlet (one that comes with liferay 6.2 GA3 package) was working fine but suddenly it stopped sending email notifications for Invitation(RSVP link).No errors shown in console. then after a while i discovered that using the below code in Portal-ext.properties causes this issue.
# Set whether or not private layouts are enabled. Set whether or not private
# layouts should be auto created if a user has no private layouts. If
# private layouts are not enabled, then the property
# "layout.user.private.layouts.auto.create" is assumed to be false.
layout.user.private.layouts.enabled=false
layout.user.private.layouts.auto.create=false
# Set whether or not public layouts are enabled. Set whether or not public
# layouts should be auto created if a user has no public layouts. If public
# layouts are not enabled, then the property
# "layout.user.public.layouts.auto.create" is assumed to be false.
layout.user.public.layouts.enabled=false
layout.user.public.layouts.auto.create=false
I use the above code just to disable My Profile & My Dashboard buttons in dropdown(TOP Right corner). and to disable private pages aswell.
I tested this. whenever i use the above code in portal-ext.properties Calendar can't send any emails. All other email functionalities are working same.
Please help me to fix this issue.
REF: https://www.liferay.com/community/forums/-/message_boards/message/54631418
Thanks.
After some investigation, I think I can boil down the issue to the following lines in com.liferay.calendar.notification.NotificationTemplate(Lines 182-184):
PortletURL portletURL = PortletURLFactoryUtil.create(
serviceContext.getRequest(), PortletKeys.CALENDAR,
themeDisplay.getPlid(), ActionRequest.RENDER_PHASE);
What's happening here? Well, Liferay want's to send a Link to the Calendar in the Notification Email. To do so, they have to evaluate where the portlet lives. (Meaning, where you put it ;) ) As the User does not have any pages (and therefore no Calendar portlet on a page) this method is about to fail. To be honest, I can't offer you a solution how to tackle the Problem, but at least we have an idea, WHY this is happening. You could start with some try catch blocks and some debug output to investigate further if that really IS the root of the Problem. But I am quite confident that these things correlate.
I have a form designed in GUI designer. I call it "Register" to collect information for new member registration. Some how whenever I try to open this form using showForm("Register",null), I get this error -
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at com.codename1.ui.util.UIBuilder.getFormState(UIBuilder.java:1711)
at com.codename1.ui.util.UIBuilder.showForm(UIBuilder.java:2195)
at com.codename1.ui.util.UIBuilder.showForm(UIBuilder.java:2263)
I have not been able to find any reason for this. Is Register a reserved name? What other thing can cause this? Please help, I am stuck.
You seem to be using an older version of Codename One, you need to update your client libraries in the preferences.
This can happen if you showed your current form manually (not via the GUI builder), there is a bug in the current version where showForm() tries to get the name of the currently showing form and doesn't check for null. To workaround this just use setName() on the current form or make sure that all your forms are shown via the GUI builder.
I'm really stucked at my final stage of coding. I've created a custom button in lead section and i'm calling custom setting url in javascript code.
It works very well in my developer organization but it fails when I installs this in other developer organization.
Here is the code for your reference;
{!REQUIRESCRIPT("/soap/ajax/26.0/connection.js")}
var uname = encodeURI('{!$Setup.UserDetails__c.UName__c}');
var ukey= encodeURI('{!$Setup.UserDetails__c.Sha1Key__c}');
try{
var rurl= escape('/handleapprequest?email={!Lead.Email}&fname ={!Lead.FirstName}&lastname={!Lead.LastName}&company={!Lead.Company}');
window.open('{!$Setup.UserDetails__c.Url__c}login/' + uname + '/'+ ukey +'?returnurl='+rurl, 'Send Email', 'height=600,location=no,resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=1', 1)
}catch(err)
{alert(err);}
When I install my package to different developer organization, the button which executes onClick javascript, thows an exception 'A problem with the OnClick JavaScript for this button or link was encountered: Field Setup.UserDetails_c.UName_c does not exists check spelling'
Please, let me know what is going wrong here? I've already created Beta package and I can not change or remove code from my developer org.
Thanks a lot.
Firstly, you should check whether you actually included the Custom Setting in your package. If you don't do that then it just won't exist in the new org.
Even if you do have the Custom Setting in the package, you still have to put a value in it in the destination org. Packages include metadata only, not data, and so you'll have to add a row to this custom setting for your button to pick it up. You can do this manually in the destination org, or you can do it automatically with a post-install trigger. Even if you've got a beta managed package, you can still add objects and code to it, by the way.
This question has been asked before but 1) the user never accepted an answer 2) none of them stand out as better than the others (votes-wise) and 3) the asker seems to have forgotten about it. So I'm going to ask it again so I can get to an accepted answer. And some of the users in the thread have said that some of the solutions didn't work. Sorry for cluttering up the place, but I promise to get to the bottom of this.
I ran into this problem the other day when I was looking at my Silverlight app in Firefox. I made a change to the location of an image and it didn't move. I assumed I did it wrong, but then I looked at IE7 and the image was in the right place. Turns out Firefox was displaying a cached version of the file; the changes I made didn't show up.
This is a larger problem: if I change my app (let's say it's an urgent typo correction) how can I force the end user to see the most current version of my Silverlight app? Is isolated storage (Heuer's blog) really the only way to force an update from the server side? Clearing the Firefox cache is not going to work for a push update; I need the update to propagate without the end user doing anything.
Update: Dino Esposito has some ideas about controlling this, specifically using the Expires property of the Response object. Haven't had a chance to try this yet.
Can you encode the version number or timestamp in the filename? That way, if the page changes, Firefox will notice that it points to a completely different resource and will reload it.
First, you need to build your application after every layout or code change. Silverlight is not HTML, it's code that runs locally.
Second, the actual solution to this:
page.xaml loads, kicks off an async on the web service that sits on the underlying page
webservice detects Firefox
if Firefox, tell the response that it expires immediately
[OperationContract]
public bool DetectFirefox()
{
if ((HttpContext.Current.Request.Browser.Browser == "Firefox") &&
((HttpContext.Current.Request.Browser.MajorVersion >= 2)))
{
HttpContext.Current.Response.Expires = -1;
}
return true;
}
The only caveat here is that you'll need to add that code before you want it to kick in. Otherwise FF3 will be running the old version of your code that doesn't have the response expiration.