Tag Archives: JavaScript

98-375 exam passed

In my previous post I’ve promised to do some posts covering my preparation to 98-375 exam, but it turned out that I didn’t find time to do any. Sadly I’m unable to allocate time for writing here on any topics lately, and it is not that there is nothing to write about, it’s just lack of time 🙂 For example there are rather a lot of interesting stuff going on in K2 space, yet I haven’t write anything on this topic for quite some time now.

Anyhow as I passed 98-375 exam I would do a little entry about this. Here you havee my results:

Some thoughts on that now. For preparation I’ve used the following resources:

Now a little bit about these exam preparation resources. Channel 9 videos are very good as they provide complete exam overview and available for free. It is not all you need to pass the exam but watch them carefully (and maybe a few times) and you will learn not only how is this exam, but some practical things you will be definitely tested on.

LinkedIn videos are great too, but you really need to watch them more than once and do practice labs or try things you learn about otherwise knowledge retention will be weak. At the very least you want to do a 2 pass with most of the course – 1st just watch and get a broad picture, 2nd to absorb it really slowly and pay attention to details. To access these materials you have to have paid subscription, but comparing its price tag with some other training options or even books price is more than acceptable.

Lat but not least, MeasureUP practice test. It costs 88 EUR, and for this specific exam practice test content can be criticized a bit. In my opinion: 1) Content has not been updated at all since exam release. Result: 60% of links in question explanations are changed does not work (hey MeasureUP, seriously, that type of updates does not require a big investment on your side, why not invite something to do a review? I can do it in exchange for some preparation materials access 🙂 ). 2) There are some obvious typos in the test. 3) Depressingly high number of questions revolving around Windows Phone and IE10 specifics. In fact I didn’t have any of those on the exam and after taking it it feels that unlike MeasureUP practice test, exam content was updated 🙂

On my results. I’ve scored with 76 points (70 is passing threshold), and, in spite of all my complains on MeasureUP practice test content quality it was instrumental in passing exam. Even if we ignore ALM and JavaScript domains, HTML and CSS topics give you just enormous amount of things and behavioral peculiarities on which you potentially can be tested, and having some specific questions touching on all these little things really helped. I feel that practice test questions bank didn’t contain enough CSS questions (it had only 25) and my result clearly reflects that. Though I obviously don’t count me as an any kind of expert in JavaScript, I do recognize that CSS is something I need to learn more which clearly reflected in exam score.

All in all, I’m satisfied with this exam and can recommend it to anyone who want to add some sort of goal/milestone to their entry web development learning journey – good entry level exam allowing you to learn and verify knowledge of basic components of web development and get more confidence to plan next steps on that route.

What’s next? I’m going to “relax a bit” taking 2 or more Microsoft Exams related to SQL Server (more about this in next posts), and once I’m done with that I will do a “full fledged” version of 98-375 exam, i.e. 70-480 Programming in HTML5 with JavaScript and CSS3.

Please follow and like us:
error0

Starting my preparation for 98-375 exam

It has been a while since I had taken any Microsoft exam as there were rather a lot of other things happening. Finally I’ve decided to get back to certification and learning and this time it will be “fundamentals”/MTA level exam yet on topic quite new to me which will allow me to learn quite a few things. Exam I will be taking this time is Microsoft 98-375: HTML5 Application Development Fundamentals and I will probably combine prepping to this exam with doing Harvard’s CS50’s Web Programming with Python and JavaScript course on edX.

Just for tracking I’m posting my very first practice test exam attempt results below (results I’ve got more or less expected for attempt taken without any preparation at all):

98-375 practice exam attempt without preparation 🙂

As you can see exam topics grouped in 4 blocks: Code by Using JavaScript, Format the UI by Using CSS, Manage the Application Life Cycle, Build the UI by using HTML5 – quite interesting set of things to explore.

You can expect some related posts about this exam and related topics as I go through exam preparation process.

Please follow and like us:
error0

K2 5.0 unable to read CORS settings from SmO when using the Workflow REST API in JavaScript

If you are trying to use K2 Workflow REST API in JavaScript (as described in product documentation) you may see the issue described below (and you may want to upgrade to 5.1 to resolve it 😉 ).

You have CORS settings configured correctly for domain which hosts your JavaSript, i.e. you have settings similar to these:

Workflow REST API Settings

Screenshot above assumes that your JS resides within js.denallix.com domain, upon attempt to execute JS code you will be getting errors.

Using Chrome you will be getting the following error:

1 Failed to load https://k2.denallix.com/Api/Workflow/preview/workflows/?_=1523444398270: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘https://js.denallix.com’ is therefore not allowed access. The response had HTTP status code 400.

IE will also give you an error but less clear one:

SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.

Here is the screenshot of error message from Chrome browser:

And here is what you can see in Fiddler:

In case you want to reproduce this you may use sample code which returns a list of Workflows either owned or startable for the user credentials supplied from K2 documentation).

So you would expect CORS settings configured for Workflow REST API supposed to ensure we have it working fine, but it does not work. What’s wrong here?

If you enable Workflow API logging you can see the following in this log:

w3wp.exe Warning: 0 : Failed to retrieve CORS settings.
System.InvalidOperationException: Failed to determine user principal name
at SourceCode.Forms.AppFramework.ConnectionClass.HandleIdentityImpersonation(Boolean asAppPool, Action action)
at SourceCode.Forms.AppFramework.ConnectionClass.TryCredentialToken(BaseAPIConnection connection, String credentialToken, Boolean asAppPool)
at SourceCode.Forms.AppFramework.ConnectionClass.GetPoolConnection(Boolean asAppPool, Boolean& tokenApplied, String& credentialToken)
at SourceCode.Forms.AppFramework.ConnectionClass.Connect(BaseAPI baseAPI, Boolean asAppPool)
at SourceCode.Web.Api.Common.DataContexts.K2DataContext.EnsureConnectionIsOpen[T](T api)
at SourceCode.Web.Api.Common.DataContexts.K2DataContext.GetCorsSettings()

This means that when you send the request, the workflow API tries to retrieve the CORS settings from the SmartObject. When it does that, it makes a connection to host server. For some reason the connection is failing with an error “Failed to determine user principal”.

Because of this exception CORS settings are not retrieved and the list of allowed origin is empty on the web API side and this lead to the error mentioned above (The response had HTTP status code 400). In K2 5.0 something in the stack is not parsing/decoding the authentication credentials (from the state it was coming from the AJAX call) correctly and thus the identity isn’t recognized causing a failure in the connection.

If you are still on K2 Five (knowing how many people running older version I’m not very comfortable with this wording 🙂 ) your workaround for this issue is to remove the authorization header from the AJAX call and let the browser prompt you for username and password. Here is sample HTML code for that (essentially we just removing var username and war password in $.ajaxSetup):

But in case you running new and shiny 5.1 or ready to upgrade your 5.0 environment to this version, it will work just fine there without need to employ any workarounds.

And here is the ling to official KB covering the same issue: “Failed to load….No Access Control Allow Origin.”

Please follow and like us:
error0