Valery's Mlog

Mindlog of a Freak
August 25th, 2016 by Valery Dachev

Aspnetcore.dll Failed to Load

Hi there!

I’ve been working with relatively new stuff these days. And I am the kind of guy who has issues… I mean software issues. And solving them could take some time and reading. So I decided to help you and myself by taking notes of some common ones and quick fixes for them.

So here goes the first one.

Symptom

A 32-bit Internet Information Server (IIS) application pool crashes. In the event log you see the following message like this:

The Module DLL C:\WINDOWS\system32\inetsrv\aspnetcore.dll failed to load. The data is the error.

and/or like this:

The Module DLL C:\WINDOWS\system32\inetsrv\httpplatformhandler.dll failed to load. The data is the error.

I guess you’re running a Windows 10 with ASP.NET Core Module (AspNetCoreModule) and/or HTTP Platform Handler Module (HttpPlatformHandlerModule) installed. And you have probably installed the Windows 10 Anniversary Update afterwards.

Cause

The Windows 10 Anniversary Update reinstalls IIS but fails to update the applicationhost.config file accordingly, causing 32-bit application pools to try to load the 64-bit version of the beforementioned assemblies.

Solution

  1. Open the %SystemRoot%\System32\inetsrv\config\applicationhost.config file with your favourite editor (running as Administrator);
  2. Locate and and remove any elements mentioning “aspnetcore.dll” and/or “httpplatformhandler.dll“;
  3. Reinstall ASP.NET Core Module and/or HTTP Platform Handler Module.

More Information

June 21st, 2012 by Valery Dachev

Eindhoven at Night

(NOTE: I am really sorry that this story turned out that long… but it could have been even worse! :P Happy reading!)

I was watching out the train window, focused on infinity © and I was still thinking about the excitement of the football game we were watching just an hour earlier at Mick O’Connell’s Irish pub in Utrecht. Even though I am not a football fan, I liked the experience so much that I was considering leaving the Dutch flag painted on my cheek until I get to Bulgaria at noon.

Wed, 13 Jun 2012, 23:59

Fortunately, the train arrived on Eindhoven Central Station right on time. I just had to go to the bus and spend a long and boring night on the airport – it wasn’t worth the risk of missing my flight in the morning. I was in a rush but I still couldn’t find a way to buy a ticket from the ticket machines on the station, neither from the desks which seemed to be closed. The ticket machine on the bus accepted coins only, so I asked the driver for help:

– Is there anywhere I can buy a tickets, because I have no coins.
– Unfortunately, I don’t have either. You have to go and change your money somewhere.
– I see… When does the next bus to the airport come?
– In the morning. The airport is closed during the night anyway.

Read the rest of this entry »

March 7th, 2012 by Valery Dachev

C#: Error Creating X509Certificate2 from a PFX or P12 File in Production

Problem

Today I stumbled upon a problem instantiating a X509Certificate2 class from a PKCS#12 container (a .pfx or a .p12 file) in production environment. For some reason I kept getting “The specified network password is not correct.” (for password-less containers) or “An internal error occurred.” (for protected ones).

Cause

The cause of the problem doesn’t seem to have much to do with the error messages. For some reason the constructor is trying to get access to the private key store although the private key is in stored in the file being opened. By default the user key store is used but ASP.NET (and probably non-interactive Windows services in general) are not allowed to open it. Chances are the user key store for the selected account doesn’t even exist.

Solution

One thing you could try is creating a user key store by logging into the account and importing a certificate in its Personal store (and then remove it again).

Another solution is to pass an additional parameter to the constructor – a flag indicating the private keys are (supposed to be) stored in the local computer – X509KeyStorageFlags.MachineKeySet, like this:
var certificate = new X509Certificate2(fileName, password, X509KeyStorageFlags.MachineKeySet);

March 2nd, 2012 by Valery Dachev

Е-Правителствена надежда

(Бележка: Този блог е личен и мненията изказани в него, в частност в тази публикацията, са лично мои и не са задължително споделени от колегите ми, фирмата, в която работя, или от нейните партньори.)

Много неща можем да кажем за електронното правителство в България. За едни това е митичното същество, за което всички говорят, но никой не е виждал. За други е морското свинче, което нито е морско, нито е свинче. За трети – просто вълшебното словосъчетание, което пълни джобовете им. По информация от медиите – около половин милиард лева за последните десет години. Десет години пълни с всевъзможни напъни, идеи и интереси, самопротиворечаща смесица от които дори се материализира в родните ни законодателство и реалност. At the end of the day имаме точно нищо завършено и функциониращо!

На фона на всичко това обаче днешния ден приключвам с голяма доза оптимизъм! Ето защо…
Read the rest of this entry »

February 19th, 2012 by Valery Dachev

(Не)сигурна кредитна карта (част 3)

В първата част на тази публикация писах за рисковете, които крият банковите карти като физически носител, докато във втората част се фокусирах върху методите за разплащане с тях в Интернет и свързаните с това рискове.

Разбира се, публикацията би била лишена от почти всякакъв смисъл, ако в последната ѝ част не стане въпрос за начините за по-сигурно пазаруване в Интернет и въобще за предпазване от злоупотреба с парите ни.
Read the rest of this entry »

February 18th, 2012 by Valery Dachev

(Не)сигурна кредитна карта (част 2)

В първата част на тази публикация писах за рисковете, които крият банковите карти като физически носител. В тази част ще стане въпрос за сигурността на разплащанията с тях в Интернет, а в следващата ще видим как да внесем известна доза сигурност при заплащането на стоки и услуги онлайн.

Методите за разплащане с банкови карти Интернет не са много и зависят от това, което съответният търговец предлага. Всеки от тези методи решава някои проблеми, запазва други и създава нови. Нека видим какви!

Read the rest of this entry »

February 3rd, 2012 by Valery Dachev

Couchsurfing in Istanbul (part 2)

(03.2.2012: I know the events took place more than two years ago and I also know I should have turned this draft into a post back then… but still I’d better do that later than never.)

Saturday

We overslept and missed the boat trip we planned for the morning so we went the meeting in Fatih where lots of landmarks of Istanbul and former Constantinopole are located. Finding a place to park in this district is a difficult task during holidays so we did it in Karaköy and crossed the Galata bridge walking. On the top of this two-level bridge you could see a huge number of fishermen waiting for their catch to get bored of the muddy water and take a trip to someone’s plate in a nearby restaurant. However we were in a hurry so I ate something as simple as “balık ekmek” (bread with fish) right on the street. :)

We climbed the road to Ayasofiya and Topcapı Sarayı but we couldn’t actually see much as you could spend a whole day in the castle… and we had about half an hour. People were waiting for us in a cafe nearby. As soon as we got together we visited Sultanahmet Cami. Although it is known as The Blue Mosque it doesn’t seem blue at all but it was definitely impressive! We took some photos and went on. Near Mehmet Akif Ersoy park we saw a band of about 20 people playing an Ottoman military march everybody seemed to know. After visiting the famous Kapalıçarşı and buying souvenirs and (of course) Turkish delight we crossed Galata bridge again to get back to Karaköy. In caffeehouses around you could see people smoking nargile, drinking tea and playing traditional games like Tavla and Okey almost on the street. It’s their way to relax during holidays and we gave it a try. It works!

Read the rest of this entry »

January 6th, 2012 by Valery Dachev

Bluetooth Mouse Problems in Windows 7

It’s been several years already since I bought my first Microsoft Bluetooth Notebook Mouse 5000 for my personal laptop (HP Compaq 8510w) and during all of this time it has worked flawlessly. Recently I decided to buy (the latest version of) the same mouse for my work laptop (HP ProBook 6550b) and that’s when the problems began – it used to stop working with or without being used, with old or new batteries, after a short or a long period – no pattern at all! The issue proved to be quite easy to fix but it took some time to solve. I hope this one will help save your laptop a few hits.
Read the rest of this entry »

June 22nd, 2011 by Valery Dachev

Prepare a USB Memory Stick to Install/Rescue Microsoft Windows 7

I wonder why Microsoft still haven’t made a tool to create a bootable USB memory stick from a Windows installation CD, especially in the netbooks era when having no CD-ROM device is quite normal. It’s my third time to install Microsoft Windows 7 from a USB memory stick and I guess I would need one if I need to boot Windows in rescue mode.

So here’s a note to myself on how to prepare a USB memory stick for installation quickly on Microsoft Windows…
Read the rest of this entry »

June 20th, 2011 by Valery Dachev

Удостоверяване на самоличност

На вниманието на другаря Многознаещ служител на Митница “Аерогара София”: За ваш срам (защото един митнически служител би следвало да познава касаещата работата му нормативна уредба) и за мое удовлетворение (просто защото ми е кеф да съм прав), проверих и действително съм прав за факта, че свидетелството за управление на МПС е валиден документ удостоверяващ самоличността ми на територията на Република България и, ако ме спре полицейски служител, иска или не, ще трябва да я признае. И, за да попълня пропуска в познанията ви, следва цитат от актуалния към момента Закон за българските лични документи, но ще се постарая при следващата ни среща да ви го навра в лицето (цитата де!), за да чуя какво ще ми философствате този път! Та цитирам:

ЗАКОН ЗА БЪЛГАРСКИТЕ ЛИЧНИ ДОКУМЕНТИ (ЗАГЛ. ИЗМ. – ДВ, БР. 82 ОТ 2009 Г.)

Глава първа. БЪЛГАРСКИ ЛИЧНИ ДОКУМЕНТИ (ЗАГЛ. ИЗМ. – ДВ, БР. 82 ОТ 2009 Г.)
Раздел I. Общи разпоредби

Чл. 3. (3) Свидетелството за управление на моторно превозно средство удостоверява правоспособността за управление на моторно превозно средство, а за български граждани – и самоличността на територията на Република България, чрез съдържащите се в него данни.

Глава четвърта. СВИДЕТЕЛСТВО ЗА УПРАВЛЕНИЕ НА МОТОРНО ПРЕВОЗНО СРЕДСТВО
Раздел I. Общи положения

Чл. 50. (2) (Изм. – ДВ, бр. 108 от 2000 г., в сила от 29.12.2000 г., изм. – ДВ, бр. 82 от 2009 г.) Свидетелството за управление на моторно превозно средство служи и като идентификационен документ за самоличност на български граждани на територията на Република България.

Благодаря за вниманието!

P.S. Да послужи и на всички онези, които ми мрънкат задето си ходя само с шофьорска книжка, а не нося лична карта! Гледайте си работата!

%d bloggers like this: