Web API – ConfigureAwait(true) not working as I thought

I’m having some trouble understanding the in’s and out’s of “continueOnCapturedContext” from a .NET v4.6 WebAPI 2 standpoint.

The problem I’m having is there doesn’t appear to be any difference between ConfigureAwait(true) and ConfigureAwait(false).

I’ve put together a sample app that demonstrates what’s happening:

    public async Task<IHttpActionResult> Get(bool continueOnContext)
    {
        int beforeRunningExampleThreadId = Thread.CurrentThread.ManagedThreadId;
        int runningExampleThreadId = await ExecuteExampleAsync(continueOnContext).ConfigureAwait(continueOnContext);
        int afterRunningExampleThreadId = Thread.CurrentThread.ManagedThreadId;

        return Ok(new
        {
            HasSyncContext = SynchronizationContext.Current != null,
            ContinueOnCapturedContext = continueOnContext,
            BeforeRunningExampleThreadId = beforeRunningExampleThreadId,
            RunningExampleThreadId = runningExampleThreadId,
            AfterRunningExampleThreadId = afterRunningExampleThreadId,
            ResultingCulture = Thread.CurrentThread.CurrentCulture,
            SameThreadRunningAndAfter = runningExampleThreadId == afterRunningExampleThreadId
        });
    }

    private async Task<int> ExecuteExampleAsync(bool continueOnContext)
    {
        return await Task.Delay(TimeSpan.FromMilliseconds(10)).ContinueWith((task) => Thread.CurrentThread.ManagedThreadId).ConfigureAwait(continueOnContext);
    }

read more

Google Analytics Split Test -> Redirecting

I have a problem… I have set up a Google Analytics split test. If you go to www.meebility.com you will see that Google is adding some GET parameters. But that isn’t the problem…

The problem is, if you klick on a link in the menu you get redirected to to homepage by Google Analytics… But I don’t get why and how I can turn this off… Does anybody know how to solve this problem?

I have even googled but didn’t found anybody with this problem…

Kind regards and Thanks

read more

IdentityServer4 only authenticates localhost

This may be related to my other question here however because of that it is hard to know.

I am hosting IdentityServer4 and it seems to be working perfectly if all requests are coming from localhost. Anything else it is rejecting however I can log in fine through the web interface.

I am still in development and I am just testing things however I am using

AddDeveloperSigningCredential()

Is this the problem?

IdentityServer4 only authenticates localhost

How to detect statements made about entities using NLP

I want to research using NLP to detect negative/non-constructive comments, i.e. those that frequently arise when discussing politics online. I am curious to know that if given a sentence like this:

You’re a liberal dweeb. Clinton is ruining the US with her inappropriate behavior as president.

Whether it’s possible to not only deduce the entities (you, Clinton) using NER but also get a tree of the statements made about each entity:

+-----------------+                             +------------------------+
|                 |                             |                        |
|                 |                             |                        |
|       you       |                             |          Clinton       |
|                 +------+                      |                        +------+
|                 |      |                      |                        |      |
+--+--------------+      |                      |                        |      |
   |                     |                      +--+---------------------+      |
   |                     |                         |                            |
   |                     |                         |                            |
 +-+-------+        +----+-----+                   |                  +---------+----------+
 |         |        |          |              +----+---------+        |                    |
 |         |        |   dweeb  |              |              |        |                    |
 |  liberal|        |          |              |  ruining US  |        | has inappropriate  |
 |         |        +----------+              |              |        | behavior as pres.  |
 +---------+                                  |              |        |                    |
                                              +--------------+        +--------------------+

read more

NY federal court decision threatens embedding and linking across the web

The judge’s decision disregards existing law and if upheld could expose bloggers and publishers to potential copyright lawsuits.

The post NY federal court decision threatens embedding and linking across the web appeared first on Search Engine Land.

Please visit Search Engine Land for the full article.

NY federal court decision threatens embedding and linking across the web