Recent Comments



Joel Leach
Friday

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

Hi Rick. Another great article. It'll be nice when this stuff comes along. I'm in that awkward place of working on a new app with the current versions of .NET/ASP.NET, because the new tech isn't quite ready for prime time.

Something you might find of interest is that some COM interop APIs are currently included in .NET Standard 2.0, even though COM will not be implemented on .NET Core for Windows. I wrote about that (http://weblogs.foxite.com/joel_leach/2016/10/19/com-interop-with-net-core/), and there is some ongoing discussion on GitHub (https://github.com/dotnet/standard/issues/55).


Brian
Friday

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

Thanks for the great article Rick. I've just built my first Dot Net Core/Angular 2 app and then followed your guide here and my website opened on the first try! Awesome! Thanks again, Brian.


Rick Strahl
Wednesday

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

@Simon - yeah I know that that's the case, still it's a bummer that that's the case because it does mean that many people will end up with side by side versions of Visual Studio again which is a curse. But as long as it works in VS2017 *and* 2017 provides backwards compatibility at least for all but .NET Core (original) projects I suppose its all good. I just know that I still have customers that are stuck on VS2010 due to some build system issues that never allowed them to upgrade. Heck I was like that with VS2010 due to some C++ compiler issues that weren't resolved until SP2 of VS2015. I'm hoping that won't happen again.


Simon Timms
Wednesday

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

Great article as always, Rick. I spoke to some MS devs at summit who didn't believe the new project system would be available in vs2015. There are, as you might imagine some significant changes to the project system in visual studio required which don't make sense to move backwards.


john H
Wednesday

re: Chaining the C# ?? Operator

Cool, I like this. Now, how can I do it in VB?!

change to c# vb.net was never supposed to be released


Brian
Wednesday

re: Using FontAwesome Fonts for HTML Radio Buttons and Checkboxes

Nice work, Rick! Any ideas on how this technique could be expanded to work for radios and checkboxes that have hidden labels? For instance, a table of data that has a checkbox in one of the columns. The column header gives the semantic relationship to sighted users, and of course, a hidden label that is accessible to screen readers is supplied for each checkbox. Your current implementation requires the label to be visible.

Thanks!


SPEC India
Tuesday

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

Indeed a great one Rick. I too agree with Fred. This post cleared some doubts of mine and going to share this with my team.


Vik Shah
November 28, 2016

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

0 down vote I had a same issue . I changed application pool identity to network service account . Then I explicitly set the path to dotnet.exe in the web.config for the application to work properly as @danielyewright said in his github(https://github.com/aspnet/Hosting/issues/844) comment . It works after set the path.

Thanks


NetoMeter
November 27, 2016

re: Using Let's Encrypt with IIS on Windows

We've tested successfully and published a video for both the Lets-encrypt-simple client and the ACMESharp PowerShell Module.

The Lets-encrypt-simple client seems to be more suitable for installing single domain certificates on Windows servers running IIS. The video instructions are available here:

http://www.netometer.com/blog/?p=1758

The ACMESharp PowerShell module is perfect for the automatic installation and renewal of Exchange Multiple Domain (SAN) certificates - the video demo is available here:

http://www.netometer.com/video/tutorials/How-to-Install-LetsEncrypt-Certificate-in-Exchange-Server

In the demo, we are scheduling a task in task scheduler to renew the Exchange certificate and it works flowlessly.

Regards,

Dean


Fred Peters
November 26, 2016

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

Great report, and you covered the state of ASP.Net Core with this sentence "Currently you have to know way too much about the innards of the technology to be productive."


Mark
November 25, 2016

re: Resetting Entity Framework Migrations to a clean Slate

Rick, I've often appreciated your work over the years, and had a good experience with your west wind controls a few years ago.

This is not the first time you've bailed me out or set me in a good direction. I tried some other suggestions that didn't work, this one did the trick.

Gracias.


Richard
November 25, 2016

re: Strongly Typed Configuration Settings in ASP.NET Core

How do we enable an injection of the option setting object to a data access layer in a separate project, without using IOption<>?


Chris
November 25, 2016

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

Great post Rick, as always. We looked at ASP.NET Core a while back but it was apparent that the inablity to use the features provided by System.Web as well as features missing in Entity Framework 7 meant that we held off creating / updating applications to use it. Pretty much all the stuff we write is Web Forms Websites in VB.NET using LINQ to SQL (eek!). So the ability to run cross platform is not really important to us. As you say the API coverage will improve with .NET Standard 2.0 so maybe we can look at it again then. I suspect the driver for this will be when Visual Studio 2017 is RTM. Even then the Developers are still going to need a pretty solid business case to convince our Directors that this is the way that we should be writing Web Applications going forward.


Thomas Burkhart
November 25, 2016

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

Hi Rick,

very nice post!

Brings it to the point and I hope netstandard 2.0 will be out soon. Me too am waiting for it before switching my projects.

Cheers Thomas

P.S: What's that stick on your back on the headers surfing picture


Alex
November 24, 2016

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

Good article, which to me represents the current thoughts of most .net devs.

One question though why didn't they name it the .Net Standard Interface? I think most devs would have then easily understood what MSFT were trying to do.


Rick Strahl
November 24, 2016

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

@Alex - if you want to build applications with those technologies (ie. WinForms/WCF) then you can stick with .NET Full framework. I'm pretty sure WinForms will never be ported, although there's Mono that has an implementation of it that can run on Mac and Linux. I doubt Microsoft will make a crack at providing a true cross platform UI framework in the near future, but who knows.

.NET Standard is what lays the ground work to let Microsoft and Third Parties innovate on top of the platform more easily for cross platform environments and that's the key of what this push entails I think. What you're looking for is much higher level at the Framework level.


Alex Sarafian
November 24, 2016

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

I also don't understand clearly what it is. I understand where they want to get to and it is a positive step but I think there are complicating things with too many terms.

In my opinion they should have made this very clear statement. We are building .NET cross platform from the beginning. We have ported ... and we are porting .....

This is what they are doing really but they are trying so hocus pocus to make it look as more seem less.

The parts that interest the business app I'm working on are System.ServiceModel and System.Identity and I don't believe they are supported or going to be supported in the near future although they are System assemblies. Second in priority I would like to have the System.WinForms but I don't believe they would ever port that functionality either.

Thanks for the post


Andreas
November 24, 2016

re: WCF WS-Security and WSE Nonce Authentication

i have a Problem with call the EndpoitBehavior stored in a dll and called from Windows Service. The CustomCredentials() call is not executed and the new configuration is empty. Same Source called from Application Project work fine. Any Ideas?

Here the Error Message:

The 'CustomBinding'.'http://tempuri.org/' binding for the 'PersonServicePortType'.'http://www.his.de/ws/PersonService' contract is configured with an authentication mode that requires transport level integrity and confidentiality. However the transport cannot provide integrity and confidentiality.


Lee Timmins
November 24, 2016

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

Thanks Rick. Great read and cleared up a few things. From my understanding I see .NET Standard as an abstractions model where .NET Core, .NET Framework and Xamarin are implementations.


Laurent Kempé
November 24, 2016

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

Great post Rick! It reminds me a discussion about .NET with my brother a couple weeks ago, in which we also believe that we are at a turning point for .NET At the moment the future looks promising!


Hannes Preishuber
November 23, 2016

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

Webforms (and Winforms) have a goal which differs from .net Standard. From my view .net Standard is a clean and lean approach to target any device

Webforms is a thing for a (big) server, so old .NET and big dotnet is not a issue. Especially as Webforms is often used for intranet solutions and less for kind of websites.

-Hannes


Rick Strahl
November 23, 2016

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

@Andrei - re: Making .NET Great Again. I thought about it, but given the political mood probably not the best idea :-)

@Thomas - WebForms will continue to work on full framework (ie. .NET 4.6.x etc) and according to what I heard from the ASP.NET teams will continue to get new features and enhancements that trickle down from the other technologies. It's not dead, but it won't run on .NET Core - it'll always be a full framework technology, which isn't a problem since that technology will continue forward in parallel with the .NET Core.


Jeff P.
November 23, 2016

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

Very accurate state of the union, especially the tooling comments. I've ported one of my apps without too much friction, other than the breakage from RC1 to 2 to RTM.


Thomas Hansen
November 23, 2016

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

Could you, or anybody else for that matter, answer what happens to WebForms in the future ...? Thanks for a nice writeup though, as usual ... :)

PS! There's a "foward" up there in the beginning of your blog. I assume you meant "forward" ...


Richard
November 23, 2016

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

.NET Standard to me is analogous to classes and interfaces. .NET Standard 1.0/1.1/2.0 are interfaces, which are implemented by .NET Core Windows/.NET Core Linux/.NET Full Framework/Mono/etc x the various version numbers of those frameworks.


Andrei Rînea
November 23, 2016

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

I almost read "Making .NET great again" :)))


Andrea Angella
November 23, 2016

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

Very nice post Rick. I didn't know about the TypeForwardedToAttribute that apparently was there since NET 2. I am glad I didn't start putting my hands on .NET Core yet. I am waiting for the tooling to be ready (VS 2017 RTM?) and the official release of .NET Standard 2.


Rick Strahl
November 23, 2016

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

@Angus - it's supposed to provide a baseline that all .NET implementations on whatever platform you use. The idea is that you have the same set of features everywhere and if you build a library that targets .NET Standard it will run on any of the platforms that implement it. PCL was an interception of features - the more platforms you supported the less features you got. .NET Standard will provide a fixed base feature set.


Kevin
November 23, 2016

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

Oh No, this sentence makes me cringe.

"Looks like the Visual Studio 2017 release will take us back to the bad old days of where a new version of Visual Studio is required to go along with a specific version of .NET development "


Angus McIntyre
November 23, 2016

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

I'm still not sure what .Net Standard is meant to achieve. Is it intended as a slicker development pipeline for PCLs?


Angela
November 21, 2016

re: Adding minimal OWIN Identity Authentication to an Existing ASP.NET MVC Application

Just adding a comment for other people who are new to 3rd party provider login... In the code it states

    // these values are stored in CodePasteKeys.json
    // and are NOT included in repro - autocreated on first load
    if (!string.IsNullOrEmpty(App.Secrets.GoogleClientId))
    {
        app.UseGoogleAuthentication(                
            clientId: App.Secrets.GoogleClientId,
            clientSecret: App.Secrets.GoogleClientSecret);
    }

The App is not resolved. It is probably a class that he dumps reading of his json file into.

Either way, I was not familiar with 3rd party providers. So I searched the web for clientId and Google authentication and what i found was you have to register with those providers you website applications so you can interact with them. And in the case of google they will give you a clientid and a clientsecret that you will use when contacting them to verify a user.

Just thought a put a note here in case anyone else who is unfamiliar with working with third party logins did not understand. I would say if you are not using third party login you can probably comment out that code. That is what i am doing for now.


Nigel Belham
November 21, 2016

re: Strongly Typed Configuration Settings in ASP.NET Core

Hi Rick. RE "Adding services.AddSingleton(Configuration) fixes this issue."

Using ASP.NET Core I found that I had to specify the IConfigurationRoot Interface.

services.AddSingleton(Configuration); Which can be simplified to... services.AddSingleton(Configuration); Hope this helps.

JohnM
November 18, 2016

re: Debugging Application_Start and Module Initialization with IIS and Visual Studio

Thought I'd add my experience today with Visual Studio 2015 Enterprise. Tried using

System.Diagnostics.Debugger.Break(); ...with no luck.

Found elsewhere suggestion to use:

System.Diagnostics.Debugger.Launch(); ...which worked.


Ash
November 17, 2016

re: Custom Message Formatting in WCF to add all Namespaces to the SOAP Envelope

Run into this issue with the Royal Mail API last year. Your solution is very similar to what I come up. I would advise against editing the WCF generated files though. Implement an IOperationBehaviour class instead which makes use of the message formatter and attach this to each operation as a behaviour. My solution for Royal Mail DMO C# using SOAP can be found here: http://stackoverflow.com/questions/31595770/c-sharp-wcf-namespaces-move-to-header-use-ns-prefix


Matt
November 14, 2016

re: XmlWriter and lower ASCII characters

Janosch is correct. The supplied regular expression removes commas. Use the updated one instead! [\u0000-\u0008\u000B\u000C\u000E-\u001F]

I don't know if Rick reads these comments on such an old article, but updating the original text would be great.

Thanks

FWIW: here is my code to strip out all invalid characters before writing a dataset to XML

foreach (DataRow dr in rsFiltered.Tables[0].Rows)
{
            foreach (DataColumn c in dr.Table.Columns)
            {
                if (c.DataType == typeof(String))
                {
                    dr[c] = ValidationHelper.ClearInvalidXML(dr[c].ToString());
                }
            }
        }

Pascal
November 14, 2016

re: Using Let's Encrypt with IIS on Windows

Thanks a lot for this post. I used LetsEncrypt-Win-Simple and got my site with a valid certificate in 5 minutes!

I have updated the scheduled task with my local admin user to also work when not logged in. Works like a treat.

The last step for me is now to redirect the HTTP site to HTTPS and let Google know about it.

Really cool, thanks.


John McDonald
November 14, 2016

re: Excluding the node_modules Folder in Visual Studio WebSite Projects

Very informative post. Having read your post I decided to develop Web Application for my official website http://essaydune.com/blog/. I find Web Application to be a very convenient way for client to reach my services through smartphone applications any time and any place they want. I will be waiting for the newest version of Visual Studio 2017 tool.


Rick Strahl
November 13, 2016

re: Introducing Markdown Monster - a new Markdown Editor

@Alan - I haven't heard of AsciiDoc, but I will certainly take a look. If there's a decent parser story for it, it wouldn't be too hard to hook that up.

Could you post an issue on Github? https://github.com/RickStrahl/MarkdownMonster/issues

Sam Murray
November 12, 2016

re: Adding minimal OWIN Identity Authentication to an Existing ASP.NET MVC Application

Hi Rick,

Just wanted to say a quick thanks for this blog entry. It covers a lot of the little things that places like StackOverflow and other blogs miss out.

Made my life a lot easier!

Thanks.
Sam.

James
November 11, 2016

re: Windows Update Hell

Same problem. I also read your excellent posts on FiddlerCore in the past and then came across this site again when Googling the update issues, makes me wonder if this issue affects users with Visual Studio installed, or perhaps it's just a coincidence?

Whoever
November 10, 2016

re: Westwind Application Configuration Updates

I have similar issue as Reuben. In a web application, all sections and config values are automatically created. But with console app, nothing happened. If I manually create those sections, it can read. But new value is not auto added to app.config. It's an empty console app, just the package, a ApplicationConfiguration class and default initialize in main.

Not that it's a deal breaker, but the auto create value feature is too good and addictive ^_^

Rick Strahl
November 10, 2016

re: External JavaScript dependencies in Typescript and Angular 2

Jonas - I know you can do that, but when you do you have to be careful to declare things in the right order in your module configuration files to ensure things can depend on each other. I'm using Angular 2 in this case and I had major issues trying to get jQuery, Bootstrap and Toastr to all work properly when bundled. It works, but frankly it's easy to reason about the libraries if they are loaded old school than bundled in and since there will be very, very limited amounts of these I figure that's ok. Going forward I hope we'll see more module friendly implememntations even of older libs that will make this less of an issue.

Jonas
November 10, 2016

re: External JavaScript dependencies in Typescript and Angular 2

If you are using a module bundler like WebPack, I would advise to bundle everything and not load some libraries via <script> tag!

i.e. you can load bootstrap by just importing it:

import "bootstrap"

-> this pulls bootstrap into your bundle, when it is installed via npm

To expose modules as globals you should use the "webpack.ProvidePlugin", then you don't need your hack ...

Hope this helps.

Johan
November 10, 2016

re: Missing PageMethods on an MS AJAX Page?

Hi!
I realize this is an old blogpost but for anyone else having this problem: try putting the code-behind inline in the actual aspx page - this works for me.

<script language="C#" runat="server"> 
 
            [System.Web.Services.WebMethod]
            public static void GetDetails(string Id)
            {
                // Do stuff here.
            }
 
        </script> 
        <script type="text/javascript">
            function GetDetails(Id) {
                PageMethods.GetDetails(id);
            }
            GetDetails(42);
</script>

Rick Strahl
November 09, 2016

re: Using Let's Encrypt with IIS on Windows

Let's Encrypt really needs a Web site as it needs to validate the website's domain. You can create a certificate through a Web site and then perhaps use the generated cert for other purposes assuming it's the same type of certificate that is compatible.

Michael
November 09, 2016

re: Using Let's Encrypt with IIS on Windows

Do you know of a way to use let's encrypt for local certificates such as remote desktop? I have self-signed certificates so it is "encrypted", but that pesky warning message pops up every time. Also, is there a way to use LE with Windows Server Essentials Remote Web Access tool?

Torsten
November 09, 2016

re: C# NumberFormat Sections

Suggestion: add link to the documentation for this feature:
https://msdn.microsoft.com/en-us/library/0c899ak8(v=vs.110).aspx

Chris
November 07, 2016

re: First Steps: Exploring .NET Core and ASP.NET Core

I am coming from a pure javascript background using Node and found this tutorial helpful for learning about asp.net in general and how I can use Core on my Mac. Great article. I wish someone would write an article like this but "ported" to the Node user as I see this as MS's way of trying to lure those of use more used to Node than asp.net

FSmall
November 07, 2016

re: Creating STA COM compatible ASP.NET Applications

Rick,

Since it appears Web API is not supported for calling a FoxPro MTDLL, could something like the following work?

var th = new Thread(ExecuteCreateFiles);
th.SetApartmentState(ApartmentState.STA);
th.Start();
th.Join();
 
//...
 
private void ExecuteCreateFiles()
{
  dynamic fox = ComHelper.CreateObject("myFoxProCOM.FindInfo");
  dynamic abc = fox.CreateFiles();
}


Essentially this is creating a new thread, setting it to STA and executing the FoxPro COM. I don't need anything back from the COM. Perhaps a true/false that it completed would help. (The Join tells the process to wait until the thread is finished processing -- I need the files to exist before I can continue.) What drawbacks are there with this methodology? What kind of additional load is being created on the server?

I have also thought about creating a .NET service (that can be run in STA mode) and calling it from my Web API project. Do you think this would create less of a load then my previous idea?

One last question. All your articles that I have read speak about the MTDLL's. Does STDLL's have the same issues in .NET as MTDLL's? I have been using a STDLL in a classic ASP website for about 10 years with no known issues.

Thanks for the help!

Frank S.