Recent Comments



Rick Strahl
Yesterday

re: Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0

@Ed - Make sure you are on the latest RC. Otherwise you might be missing a namespace reference.


Ed
Thursday

re: Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0

would you know why adding this doesn't work?

   .SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

when running dotnet build, it returns:

    Startup.cs(29,55): error CS0103: The name 'CompatibilityVersion' does not exist in the current context

David
Thursday

re: Hosting SignalR under SSL/https

I have same problem with Junaid where my webapp is hosted on one server, but my signalR service is hosted on a different server. They are both using selfsigned certs and I've set things up properly on the server side. The problem is I get this error on the browser client side: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID

Now if I open another tab in same browser to the server hosting the signalR service and click advanced and proceed to unsafe site, then everything works. Is it possible on the javascript client side to ignore cert warnings? I know we can do this in chrome by changing the chrome setting but this would be much easier if I could do this in javascript code. I have a feeling it's not possible due to security reasons but can someone confirm? I know only other options are to get a paid cert, add cert to client's trusted root store, or have it added on the domain controllers so all computers on domain have it trusted.


Colin Riddington
Wednesday

re: Web Browser Control & Specifying the IE Version

Hi Rick First of all can I add my thanks for this webpage- now 7 years old but still the best reference for this issue

Unfortunately it hasn't solved my specific problem - perhaps you can advise:

I have been successfully using code in Access for users to get their current geolocation. It works as follows: The code loads an HTML map in IE which asks for permission to get the current location. If this is granted, data from the geo-sensor built into many PCs is obtained (where available) & the co-ordinates are displayed in the HTML file and the location is marked on the map. The data is then read by Access & used to download a Google static map centred on that location (after which other tasks are done). All worked fine until the latest Windows update to version 1803. Since then IE reports that 'the geolocation service failed' If I load the same file into Edge, the correct location is still obtained. However, Access code requiring data from a web page ALWAYS uses IE no matter what the default browser is.

I've done further tests on this issue using the following devices

  1. Win 10 tablet running version 1709, IE11 & Access 2010
  2. Virtual machine running Win 7, IE11 & Access 2010
  3. Virtual machine running Win 7, IE11 & Access 2007

All were successful However another test using Win 10 version 1803, IE11 & Access 2016 failed

The same issue can be seen by loading the w3schools geolocation feature (which uses similar code to mine) in different browsers. See W3SchoolsGeolocation web page: https://www.w3schools.com/html/html5_geolocation.asp Using Edge it works correctly Using IE since the update, clicking the TryIt button does absolutely nothing - no error but nothing happens

I'm unclear whether this is a bug or if the IE geolocation service been deliberately disabled e.g. to manage a security issue? If its a bug, what's the best way to report it to MS?


Bruno Garcia
Tuesday

re: Getting the .NET Core Runtime Version in a Running Application

A few days ago while trying to capture this information to report to Sentry.io I started a library called Sentry.PlatformAbstractions on GitHub. That is a work in progress but there's some functionality running already on the current SDK version.

So far, regarding Runtime, it can report: .NET Framework 1.0 to 4.7.2 and .NET Core (if not self contained) and Mono. There are screenshots (at the bottom) of this blog post.

The goal is to add better more OS information (report not only Linux and kernel but which distro and for Windows, if it's Server edition or not).

Everything is open source and help would be very much appreciated!


Somnath
Tuesday

re: Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0

I have done my upgrade. the only issue I am facing is about the bootstrap css. while browsing I am not getting my css. this is my angular.json in my package I am added "bootstrap": "^4.1.1", when on angular 5 it was working. I am just generated it from .net core 2.1 angular template.

{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "Taxman": { "root": "", "sourceRoot": "src", "projectType": "application", "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist", "index": "src/index.html", "main": "src/main.ts", "tsConfig": "src/tsconfig.app.json", "progress": true, "polyfills": "src/polyfills.ts", "assets": [ "src/assets" ], "styles": [ "src/styles.css", "node_modules/bootstrap/dist/css/bootstrap.min.css" ], "scripts": [] }, "configurations": { "production": { "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true,

          "fileReplacements": [
            {
              "replace": "src/environments/environment.ts",
              "with": "src/environments/environment.prod.ts"
            }
          ]
        }
      }
    },
    "serve": {
      "builder": "@angular-devkit/build-angular:dev-server",
      "options": {
        "browserTarget": "Taxman:build"
      },
      "configurations": {
        "production": {
          "browserTarget": "Taxman:build:production"
        }
      }
    },
    "extract-i18n": {
      "builder": "@angular-devkit/build-angular:extract-i18n",
      "options": {
        "browserTarget": "Taxman:build"
      }
    },
    "test": {
      "builder": "@angular-devkit/build-angular:karma",
      "options": {
        "main": "src/test.ts",
        "karmaConfig": "./karma.conf.js",
        "polyfills": "src/polyfills.ts",
        "tsConfig": "src/tsconfig.spec.json",
        "scripts": [],
        "styles": [
          "src/styles.css",
          "node_modules/bootstrap/dist/css/bootstrap.min.css"
        ],
        "assets": [
          "src/assets"
        ]
      }
    },
    "lint": {
      "builder": "@angular-devkit/build-angular:tslint",
      "options": {
        "tsConfig": [
          "src/tsconfig.app.json",
          "src/tsconfig.spec.json"
        ],
        "exclude": [
          "**/node_modules/**"
        ]
      }
    }
  }
},
"Taxman-e2e": {
  "root": "",
  "sourceRoot": "",
  "projectType": "application",
  "architect": {
    "e2e": {
      "builder": "@angular-devkit/build-angular:protractor",
      "options": {
        "protractorConfig": "./protractor.conf.js",
        "devServerTarget": "Taxman:serve"
      }
    },
    "lint": {
      "builder": "@angular-devkit/build-angular:tslint",
      "options": {
        "tsConfig": [
          "e2e/tsconfig.e2e.json"
        ],
        "exclude": [
          "**/node_modules/**"
        ]
      }
    }
  }
}

}, "defaultProject": "Taxman", "schematics": { "@schematics/angular:component": { "prefix": "app", "styleext": "css" }, "@schematics/angular:directive": { "prefix": "app" } } }


John
May 14, 2018

re: A Small Utility to Delete Files recursively by Date

Love the app, great to see people coding C rather than scripting. Is there any way to have this tool loop thru and delete any empty folders without deleting any files?

Thought i could do like deletefiles.exe d:\folder -f but it doesn't do anything.

Thanks.

JR


Howard Cheng
May 14, 2018

re: Passing multiple simple POST Values to ASP.NET Web API

This is great work, as I am trying to make it so that a Web API method supports both GET and POST requests, as such:

[ActionName("Read")]
[HttpGet, HttpPost]
public async Task<MyObject> Read(int id)
{
    ...
}

Yes, I know all about how Web API is supposed to work, with the method names matching the HTTP verbs, but this is converting a legacy API that was actually done in MVC, so the method names and the verbs they accept cannot be changed. One thing I noticed is that parameter values that could be part of the path now have to be explicitly named. Consider the following routing:

config.Routes.MapHttpRoute(
    name: "DefaultApi",
    routeTemplate: "api/{controller}/{action}/{id}",
    defaults: new { id = RouteParameter.Optional },
    constraints: new { id = @"\d+" }
);

Now if I send a request to /api/Foo/Bar/1, I end getting the error "The parameters dictionary contains a null entry for parameter 'id' of non-nullable type ..." In this example, I can hack something together to compare the route template to the URI segments, but if I had default values for controller and/or action, then it's just a big pain in the butt.

Furthermore, ideally you'd want to apply any constraints as well, so that /api/Foo/Bar/Baz gets a 404 error instead of a FormatException. At this point it's clear I'd be reinventing the wheel, so do you know if that's all doable via the framework somehow?


Alex
May 14, 2018

re: .NET Standard 2.0 - Making Sense of .NET Again

This article does shed light on the current state of things, but as someone who builds/sells a commercial .NET app - this is still very confusing, not just to me - to my customers.

I 100% with MS on going cross platform, but look at what they did with MS SQL Server running on *nix. It JUST WORKS. You don't have to learn any new concepts, literally just run one lins in terminal - and voila, you have an SQL Server running on linux, all the existing tools recognize it. I do understand what's behind it (abstraction layer that mimics WinAPI basically, it can't be done with NET Framework) but, man, its confusing even for us (ppl who spent decades on .NET) not to mention kids whoa re new to the MS ecosystem.


Richard
May 14, 2018

re: ASP.NET Core and CORS Gotchas

Thank You, Thank You, Thank You for this. I got my "CorsPolicy" working for a Get. Then I added a Post method and it didn't work. This article helped me resolve the issue so Thank You!!!!


Luis Abreu
May 14, 2018

re: Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0

Regarding your rant, the new style has one advantage over the previous approach: you're not changing the Observable's prototype 😃


Mark Harpenau
May 13, 2018

re: Calling JavaScript functions in the Web Browser Control

Yay Thank you Rick! I just found this blog, and it helped me solve an issue that i've tried to solve unsuccessfully for years with my custom VFP Html editor. ...Because you mentioned the golden tidbit about having to supply a dummy parameter to the webbrowser window node functions, even though a function may not require one. This solved the reason that document.parentWindow.getSelection() (also available as document.getSelection() ) wasn't working in ie11. i've had to keep the webbrowser at ie10 (via the browserEmulation registry setting) because getSelection() wouldn't work until i read your blog and tried it with a dummy parameter. Your blogs are so useful! Even after 10 years!

In case this helps anyone, here are 2 clips of VFP code...

This code is how i successfully get the current selection range (and parent node) of where the current cursor is:

* m.toWebEdit.xoHostIe.xoie is a ref to instance of webbrowser control

m.lo1= m.toWebEdit.xoHostIe.xoie.document

IF TYPE("m.lo1.getselection") = "O"			&& if ie11
	m.lo1= m.lo1.getselection(.f.).getRangeAt(0)    && pass dummy param .f.
	m.lo2= m.lo1.startcontainer     && node containing current selection
ELSE
	m.lo1= m.lo1.selection.createRange()
		&& createrange() does not work in ie11. we get obj with no props

	IF TYPE("m.lo1.item") = "O"
		m.lo2= m.lo1.item				&& ex. will be img if img selected
	ELSE 
		m.lo2= m.lo1.parentElement		&& elem containing current selection
	ENDIF 
ENDIF

And this code below allows inserting text at the current selection. Note: pasteHtml() is not avail in ie11:

* m.to1 is a ref to current selection.
* m.tcText is text to insert

IF TYPE("m.to1.createContextualFragment") = "O"			&& if ie11
	m.to1.insertNode(m.to1.createContextualFragment(m.tcText))
ELSE
	IF TYPE("m.to1.text") <> "C"
		dspmsg("!O1", "The cursor is not within a Text area")
		RETURN .f.
	ENDIF 
	m.to1.pasteHTML(m.tcText)
ENDIF


Rick Strahl
May 13, 2018

re: Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0

@Pepe - for which part? ASP.NET Core or Angular?

For JavaScript I'm sad to say that seems to be the norm. ASP.NET Core seems to have sufficiently stabalized that there are literally no changes beyond updating packages and perhaps making very minor adjustments in the startup configuration usually only if you want to take advantage of new features. I'd argue the ASP.NET team is doing a good job now (not so much around v1 - v2) to keep updates sane.

Angular is another story, but since V4 things have also stabilized. The rxJS changes are dreadful (both in terms of what's required to update and actual implementation details, but hopefully this is a one time thing and I guess they deliberated around this and this syntax will be used going forward for the long term.


Pepe Marino
May 13, 2018

re: Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0

I agree with the above statement: I spend more time investigating and troubleshooting than doing actual work. Every step is extremely painful.


Rick Strahl
May 11, 2018

re: A WebAPI Basic Authentication Authorization Filter

@Bart - thank you. Fixed. I think the Message Handler article has that fixed but I failed to fix it here.


Bart
May 11, 2018

re: A WebAPI Basic Authentication Authorization Filter

As @Zygimantas pointed out, the

var tokens = authHeader.Split(':'); 

should instead be

var tokens = authHeader.Split(':', 2);

to make sure passwords which contain a : will be handled correctly.


roll the ball
May 10, 2018

re: Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0

The runtime should provide more info so we don't have to spelunk around and hack at this.


Chris Curtis
May 09, 2018

re: Configuring LetsEncrypt for ASP.NET Core and IIS

This was very handy, thanks for the solution. There is a bug on solution 4 however, where you use WebRootPath, which puts you in the wwwroot folder. IHostingEnvironment.ContentRootPath gets you into the root of the site where you need to be.

Not a bug, but the this.HostingEnv needs to be injected by the parent controller, and if the developer has a route on the controller the routing won't work.

To account for all of these, the following can be dropped into pretty much any controller and work:

[HttpGet("/.well-known/acme-challenge/{id}")]
public IActionResult LetsEncrypt(string id, [FromServices] IHostingEnvironment env)
{
    var file = Path.Combine(env.ContentRootPath, ".well-known", "acme-challenge", id);
    return PhysicalFile(file, "text/plain");
}

Alina
May 03, 2018

re: Using FiddlerCore to capture HTTP Requests with .NET

Hi, i trying fiddlercore with filter and a domain name but when surfing in other website i don't need to capture it increase memory used by the application. Is there a solution for purge fiddlercore?

Regards

Alina


John J Schultz
May 03, 2018

re: Accepting Raw Request Body Content in ASP.NET Core API Controllers

The string comparison against "text/plain" or "application/octet-stream" fails when the browser includes other elements in the content-type field, e.g. "text/plain; charset=utf-8". I changed the check to .contains() to get the middleware to work. Without it, I was getting 415 (media not supported errors).. which led me to the cause.


Robt. P.
May 02, 2018

re: WCF WS-Security and WSE Nonce Authentication

Thanks very much, Mr. Strahl! This was just the right amount of information (and a bit more - we didn't need the digest for the particular web service we're talking to) and better summarized than any of the related spots. Search engines did you (and the rest of us) right by putting this page in the first few hits.

@tmanthey - even with logMessage set to true, svcTraceViewer elides the attributes from the elements within a UserNameToken (at least the version I'm using does). I found WcfSoapLogger to be helpful in this regard.

Note that the WCF sources are available online (but these may be of limited help. And, as you noted, you ain't gonna get a nonce out of Microsoft's extensive Ws-* code. They state this explicitly.)

Finally, I think it's somewhat more maintainable to write the XML with something like XLinq (more maintainable but less efficient, which doesn't really matter for the bandwith we're dealing with). On the chance that I'm not the only one who cares, I'm including the relevant snippet:

            var ws2004Prefix = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-";
            var u = (XNamespace)(ws2004Prefix + "wssecurity-utility-1.0.xsd");
            var o = (XNamespace)(ws2004Prefix + "wssecurity-secext-1.0.xsd");
            var pwdTextType =   (ws2004Prefix + "username-token-profile-1.0#PasswordText");
            var base64Type  =   (ws2004Prefix + "soap-message-security-1.0#Base64Binary");
            var xDoc = new XDocument(
                new XElement("root",
                    new XAttribute(XNamespace.Xmlns + "o", o),
                    new XElement(o + "UsernameToken",
                        new XAttribute(u + "Id", token.Id),
                        new XAttribute(XNamespace.Xmlns + "u", u),
                        new XElement(o + "Username", userToken.UserName),
                        new XElement(o + "Password", new XAttribute("Type", pwdTextType), userToken.Password),
                        new XElement(o + "Nonce",    new XAttribute("EncodingType", base64Type), nonce) /*,
                        new XElement(u + "Created",  DateTime.UtcNow)*/ )));

            xDoc.Root.Element(o + "UsernameToken").WriteTo(writer);

Homer
April 29, 2018

re: Web Browser Control & Specifying the IE Version

I'll echo the many other comments - fantastic article. My language is Delphi 2007, and the Registry Hack was exactly what I needed. Works fantastic in HKCU. Like you, I use inno setup, so your example saved me a little time there. Perhaps most importantly, you deserve recognition, not only for a great article, but for how well you support and respond to all the comments that have been made over the years. Hats off to you.


Joseph Ollero
April 27, 2018

re: Using Let's Encrypt with IIS on Windows

Great post by the way!

Have you ever tried using lets encrypt on a web farm environment that utilizes a "Shared Configuration"? Example: 6 web servers hosting the same sites and they get their content and configuration on 1 shared location.

Thanks for any comments!


Javed Ur Rehman
April 26, 2018

re: Restricting Input in HTML Textboxes to Numeric Values

I like your tutorial about restricting input in text box, i also recently publish tutorial about it, i hope you will like it too https://www.allphptricks.com/insert-only-numbers-using-jquery/


Rick Strahl
April 23, 2018

re: Getting the .NET Core Runtime Version in a Running Application

@Bruce, MV10 - exactly my point. The runtime should provide this info so we don't have to spelunk around and hack at this. There should be a way to know what the actually running runtime instance is.

Given what we have though I think this at least gives us a way to differentiate versions and what it's meant to run under. Not perfect - agreed, but... 😃


MV10
April 23, 2018

re: Getting the .NET Core Runtime Version in a Running Application

In addition to what Bruce mentions, there is an open issue on one of the .NET Core github repos about this problem. (Target is also a tricky question because different parts of the app could have different-but-compatible targets.)


Rick Strahl
April 19, 2018

re: Using plUpload to upload Files with ASP.NET

@eyb - You can probably just recompile the project in 2.0...

But then Why??? Time to upgrade to 4.x and get the benefits of performance improvements and additional features with backwards compatbility. In most cases existing 2.0 code will just run in 4.x.


Eyb
April 19, 2018

re: Using plUpload to upload Files with ASP.NET

@Rick Strahl

I would like to ask if there is any .NET 2.0 version of plUpload out there? I'm just curious because this is the current version of my client. If you can walk me through I would highly appreciate. Thanks!


James
April 17, 2018

re: Html and Uri String Encoding without System.Web

This article needs an update to cover the System.Net.WebUtility class available in .NET Framework 4 and higher.


Sandhya
April 17, 2018

re: Hosting the Razor Engine for Templating in Non-Web Applications

Hi, Is using this RazorEngine (or similar dlls) still the only way to use a templating engine from a Windows Service or a singleton running in asp.net? Or are there any new approaches?


Raimund Popp
April 17, 2018

re: Publishing and Running ASP.NET Core Applications with IIS

this is the great and only article explaining all the trouble, when someone tries to publish a asp core application. so far i a really p.. by developing asp mvc core 2, because all the difficult work which is done fails when developers try to go online. there are no comments or help stuff on mvc core sites. All what i could find is the former framework errors, and asp errors. couldn't the ms-guys write the trouble for iis write somewhere down as simple examples? so far: thanks for your explanations and: i am really disappointed on ms, leaving the developers in the darkness of finding out solutions for themself... days later.


Ravi keshwani
April 16, 2018

re: Self-Hosting SignalR in a Windows Service

Hi Rick,

PRODUCTION ISSUE ---

I have implemented one feature using this url https://www.c-sharpcorner.com/article/monitor-inside-your-running-services-using-signalr-and-wcf/ .. except the nancy package.. and its working perfectly on my development machine .. but on production server where there is IIS 7.5 and Windows server 8 .. it is not generating the signalr/hub file and my connection.hub is found undefined..

my question was .. say for eg .. I am having a production website as "https://mywebsite.com" which runs on port 443 .. on which url and port should I run the signalR url from windows service from webapp.start(url) ?

Please help me as its a production issue 😃


user135711
April 15, 2018

re: No Empty Selector in jQuery

@Dave's comments are great. One correction (I think) is that using $(this).parent().hide() would hide the handler or el depending on where div is appended, while the original intended to always hide the el which closable was called on. Right?


Bruce
April 13, 2018

re: Getting the .NET Core Runtime Version in a Running Application

With Minor-Version Roll-forward coming in Core 2.1, the target framework you built the app for may not be the one it eventually finds itself running on.


Juri P
April 13, 2018

re: Accepting Raw Request Body Content in ASP.NET Core API Controllers

Hi, Rick. Do you know you know if there's any difference in performance (or any other trade-off) when reading the text/plain string from the Request.Body instead of the application/json and [FromBody] approach? Thanks for the post.


SamRay1024
April 12, 2018

re: Bootstrap Modal Dialog showing under Modal Background

I ran into the same problem and I found another solution that was fine for my use case : move the .modal-backdrop div which is inserted to the DOM under on modal opening next to the modal.

var $Modal = $('#my-modal);
			
$Modal.modal('show');

if ($Modal.parent().get(0).tagName != 'BODY')
	$('.modal-backdrop').insertAfter($Modal);

It works fine since when the modal is closed, the .modal-backdrop is removed.


MohammadBagher
April 12, 2018

re: Using Cordova and Visual Studio to build iOS Mobile Apps

hello and thanks for this article, i have a problem with my first iOS build... the iOS platform in VS2017 did not add and shows me some error :

MSBUILD : cordova-build error : Error: Failed to fetch platform ios@4.2.0 MSBUILD : cordova-build error : Adding the Cordova platform failed

i tried manually & same result. android BUild is OK. remoteBuild (on terminal) on iOS is ok too.

could you please help me ?

thanks in adv.

Regards

MB


Steve Collins
April 02, 2018

re: Easy Configuration Binding in ASP.NET Core - revisited

Hi Rick,

This and your previous post on configuration inspired me to write 3 posts on my blog. The latest is at https://stevetalkscode.co.uk/configuration-bridging-part-3 which takes Todd's idea of using a lambda a step further by using a bridging class which allows injection of other classes into the settings class for functionality such as settings validation and decryption.

Would appreciate your thoughts.

Steve


Denis Bill
March 30, 2018

re: Dealing with Anti-Virus False Positives

I can only ever remember them jumping in my face screaming when all was good really. Some time ago I was trying to compress and embed a .NET assembly to make a smaller single-EXE distributable.


Glade Mellor
March 29, 2018

re: Bootstrap Modal Dialog showing under Modal Background

I just commented out the position: fixed style in the _modal.css file for .modal-backdrop and that seems to work for me.

// Modal background .modal-backdrop { /* commented out position: fixed - bug fix */ //position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: $zindex-modal-backdrop; background-color: $modal-backdrop-bg; // Fade for backdrop &.fade { opacity: 0; }

Thanks for the guidance!


Thanh Doan
March 28, 2018

re: Accessing Configuration in .NET Core Test Projects

Hi Rick,

Thank you for your great post. I followed your post and now I am able to run some tests for my configuration. I am using XUnit.

However, I am trying to test the way I managed secret/sensitive data configuration. Basically, I will have a default appsettings.json which has sensitive data configuration is empty of null like yours. I want to override those data configuration by Environment Variables. Therefore, I am using IFixture in XUnit to read an json file in order to set up the Environment variables. If I put tests into two different projects such as Dev Test in Dev project(not using IFixture) and Stagging Test in Stagging project using IFixture then they are all green. However, I put it into same project then some failed.

Any ideas for that issue?

Thanks


MarkL
March 28, 2018

re: Web Browser Control & Specifying the IE Version

On your link to the MSDN page on the registry settings "(taken from MSDN here)", the shortcut is wrong. It should be "browser-emulation", not "browser_emulation".

It would appear that this shortcut changed when the MSDN article was moved from the referenced location to an archived ("previous-versions") location.


Gfw
March 26, 2018

re: Using Let's Encrypt with IIS on Windows

I know this is an old thread, but after a few years of using Win-simple, it is now failing to add or renew a certificate for one of my websites. I also tried Certify and had similar errors. From Win-simple...

[INFO] Plugin IISBinding generated target [IISBinding] yyyz.net (SiteId 21) [ @ C:\WebSites\yyyZLtd\wwwroot] [INFO] Authorize identifier: yyyz.net [INFO] Authorizing yyyz.net using http-01 validation (SelfHosting) [INFO] Answer should now be browsable at http://yyyz.net/.well-known/acme-challenge/LeSrNar5ASGN8NikDQQpyqhc05kCT5itxtrAkoKpSKs [EROR] Authorization result: invalid [EROR] NullReferenceException: Object reference not set to an instance of an object.

Any suggestions or guidance?


Rick Strahl
March 24, 2018

re: Creating an ASP.NET Core Markdown TagHelper and Parser

Thanks for catching that Damien - didn't even think about that... added.


Damian Edwards
March 23, 2018

re: Creating an ASP.NET Core Markdown TagHelper and Parser

Great stuff Rick. You might want to look at passing a null encoder to the GetContent calls though, as Razor attempts to HTML encode all content before you get it. See https://github.com/DamianEdwards/TagHelperPack/blob/master/src/TagHelperPack/MarkdownTagHelper.cs#L22 for an example.


Webkahve
March 23, 2018

re: Creating an ASP.NET Core Markdown TagHelper and Parser

I was using the WebApiContrib.Core.TagHelpers.Markdown by Filip W.

But it didn't get any update for quite some time...


Rick Strahl
March 20, 2018

re: Easy Configuration Binding in ASP.NET Core - revisited

@Todd - yes that looks like a good solution although as long as we know that the config isn't being re-read on every request 😃


John
March 18, 2018

re: Automating IIS Feature Installation with Powershell

Thanks for posting Rick, very useful.

I got an error on Windows 2016 (1607):- IIS-NetFxExtensibility, IIS-NetFxExtensibility45, IIS-ASPNET45 all errored with:

Enable-WindowsOptionalFeature : One or several parent features are disabled so current feature can not be enabled.

I enabled the following feature and then the above worked: NetFx4Extended-ASPNET45

Enable-WindowsOptionalFeature -Online -FeatureName NetFx4Extended-ASPNET45

Mike Jansen
March 14, 2018

re: Multi-Targeting and Porting a .NET Library to .NET Core 2.0

Hey Rick -- so helpful! I've been wanting to convert my CommonFramework libraries to .NET Core and typically got waylaid by the effort and other demands. .NET 2.0 supports so much more and now what you've described in this article for multi-targeting, I got my main library converted over and usable in other projects within a matter of hours. You hit everything I needed to get going quickly. I love the multi-targeting vs using a .NET Standard library in a .NET Framework project -- it's exactly what I wanted to do. Thanks again.

P.S. We met MANY years ago when I worked for PrimePro Data in North Canton. I think you were brought in for some FoxPro consulting at the time. I've casually followed your writings since then and have gleaned many useful ideas. Thanks for your contributions to the .NET community over the years!