Recent Comments


re: OleDb Parameters to access FoxPro Data from .NET

Wow, this blog entry is timeless considering it's still useful after all these years! Thanks Rick.

@Victor: you can do what you're asking - that is, you can create parameterized views in a VFP data container and then select from that view via the VfpOleDB driver after setting the values of your parameterized view variables. But its not exactly obvious and requires your data be in VFP9 - at least the only way I've figured out how to do it.

Lets assume you have a parameterized view in your DBC, like this:
CREATE SQL VIEW victorsView AS ;
WHERE Depatient.pat_pk = ( ?lcpat_pk )

Now, in your C# code, you need to establish your connection, and use foxpro's EXECSCRIPT function to string several vfp commands together. Those commands, if run in VFP, will set your values for your view parameter, select from the view into a cursor, then mark that cursor as the result set to be returned. Something like this:
// Lets assume you want to pass the string 999 as your view parameter, lcpat_pk
string viewParameterValue = "999";
//Put each vfp command line into string
string vfpCommand1 = "STORE '" + viewParameterValue + "' TO lcpat_pk";
string vfpCommand2 = "SELECT * FROM victorsView INTO CURSOR curViewResults";
string vfpCommand3 = "SETRESULTSET('curViewResults')"; //Here's the part that requires VFP9, I believe
//Write those vfp command line strings into a vfp script
string vfpCR = "CHR(13)+CHR(10)";
string vfpScript = "EXECSCRIPT([" + vfpCommand1 + "]+" + vfpCR + "+[" + vfpCommand2 + "]+" + vfpCR + "+[" + vfpCommand3 + "])";
//Make that script the OleDbCommand's CommandText and execute.
OleDbCommand command = new OleDbCommand(vfpScript, connection);
OleDbDataReader reader = command.ExecuteReader();

Since I specified that the results of the query be marked as the result set to be sent back via the vfpOleDb driver, I can create a reader object using ExecuteReader or even fill a dataset. Alternatively (and I would think a better option), you could write a stored procedure in your DBC rather than string together a vfp script. Pass the value you want your view to use as a normal bind parameter as Rick described in his post.

This works for me. I've read where others claim to be able to send multiple vfp commands individually rather than using EXECSCRIPT or a stored proc. But I wasn't able to get that to work. Hope this is helpful to you, Victor, or anyone else *still* using vfp data who happens to stumble across this post. Good luck!

Constantinos Haskas

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

Anyone knows if the provider key changes or is it unique?


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

I'm curious if it would be possible to do something similar to what you have, but integrate it with Azure Active Directory for Application Roles and to allow users to manage their password resets, etc?


re: External Links in Cordova for iOS

Hey Rick,

No matter what I do I can't get links to open in Chrome on Android 5.1.1 instead of the in-app browser. I've tried your solution here and many more. I posted a StackOverflow question. Perhaps you could help?

Colin Kness
October 01, 2015

re: Azure VM Blues: Fighting a losing Performance Battle

Your are so spot on. Performance is the worst on the VM doing nothing but starting a OS. They are charging you for all there over head to get the server functionality running. Where linux is just there boom fast.

The network vpn services just go down ..take forever to come back up.

You cant move a machine from one network group to another.

on and on ...

Anders Bouvin
September 30, 2015

re: Updated ASP.NET Database Resource Provider

Hi! Great library!

I'm having trouble getting strongly typed resources to work when running my application in a console application. My application is normally run as a windows service, but for test purposes I have an optional way of running it in a console application. Since I recently changed to using west wind for globalization I haven't yet tested how the resource manager works in the windows service environment. Part of my application is a web and in that context all works as expcted.

In my test console application I instantiate my application, myApp and then on regular timer intervals a call my myApp.ProcessQueue() method. As stated above in this context I can't get the DbResourceManager to work. I have tested a new approach of using a windows forms app as a host for my application. Then it all works just fine. I'm not sure what the differens is but I wouldn't be surprised if it hade something to do with application context. Have you tested strongly typed resources in a console application (where the resources reside in a referenced assembly)? If so, how did you get it working?

Do you by any chance know if running an application as a windows service works with wwg strongly typed resources?

I actually had some trouble getting som integration tests (VS unit test) working properly with the DbResourceManager. But once I found the line of code that set the ResouerceAccessMode it worked just fine. A suggestion from my part is that you try to emphasize how to use west wind globalization outside an ASP.NET web. Just putting some instructions in a separate chapter "How to setup wwg in a non-web app". I suggest this as I scrolled passed how to do it many times and tried to search the web for other resources to guide me.

September 30, 2015

re: AngularJs and Promises with the $http Service

Thanks for this, I was struggling about two days with proper json retrieval, until I found this article. Also love how you structured it.
Works a treat.

Brett Baggott
September 29, 2015

re: Talking about ASP.NET 5 on .NET Rocks

Great talk Rick. I liked how you weren't necessarily pro or con but tried to take a pragmatic middle ground. I completely agree with you about the "alpha" beta and thought it was funny that I was going through my beta7 to beta8 process (with still significant changes) while you were talking about how you thought beta6 (or was it beta4) was pretty much stable... But I really do think they've got it ironed out with beta8 (at least I hope so according to the roadmap).

I am _very_ encouraged by the direction of ASP.NET 5 and I feel it's completely necessary in order to stay relevant in today's development environment. You may not agree with 100% of the changes, not sure I do either, but that this level of change was needed... well, I'd like to hear anyone's argument for the alternative. And I would urge anyone with an argument to seriously consider _why_ these changes were made. In my opinion, they weren't made just to move our cheese.

September 28, 2015

September 27, 2015

re: Windows 10 Upgrade and IIS 503 Errors

As you said... Bingo! Thank you!

September 26, 2015

re: AngularJs and Promises with the $http Service

I cannot thank you enough. This is exactly what I was looking for. I just started learning AngularJS and spent hours looking for this.

Sangam Uprety
September 26, 2015

re: Translating with Google Translate without API and C# Code

Hi. Surprisingly the translation url is till active. But perhaps there is few change? When I hit the url in my browser:, it results in downloading a text file with the json output. But if I do the same with your code, it throws exception with the following message:

The remote server returned an error: (503) Server Unavailable

What could be the reason? Could you help please?

Jason Webster
September 23, 2015

re: The Rise of JavaScript Frameworks – Part 2: Tomorrow

Thanks for great articles on the JavaScript Frameworks! I agree with your overall assessment. I recently added babel to my gulp preprocessor and I'm writing my current javascript in ES6 to take advantage of the new features get myself ready.

September 22, 2015

re: Rebooting Database Localization for ASP.NET with West Wind Globalization 2.0

Very nice work Rick,i have been following & using your globalization library for past 5 years, it's a excellent update.

September 22, 2015

re: Windows 10 Upgrade and IIS 503 Errors

Rick, your the real MVP! Thanks for posting your findings - saved me an afternoon of trial and error.

September 22, 2015

re: UNC Drive Mapping Failures: Network name cannot be found

Thank you so much, I had wasted so much time on this one.

In my case the offending app that messed with my provider order was: WebDrive, a tool used to map FTP/S3/etc drives as native Windows driver letters.

Locating the provider order was much easier in the past, can't understand why Microsoft is attempting to hide it these days.

For others that could not locate the provider order despite Rick's breadcrumb menu list, don't forget to use the "Alt" key when showing the list of network adapters. Pressing ALT on this window will show the menu bar, giving you the "Advanced" option.

September 22, 2015

re: Azure VM Blues: Fighting a losing Performance Battle

Thanks for this post.
This is the same what I have experienced. I tested it last year and this year again.
I don't have large databases, lots of websites or traffic. I just want to host my website with a simple wish: FAST! But this is not possible with azure. At least not without spending hundreds of dollars per month.

Currently I am hosting a dedicated server at in Germany for around 50$. This is working very well and absolutely fast for the last 5 years. But anyway I would love to move to azure, because I don't have the time to manage updates and monitor everything. Even 100$ would be OK, as long as I know the server is stable and performs well. But I think that hosting at azure is only suitable for large companies which can save the need of one (or two) administrators. And in my case, azure is just too expensive.

I don't understand why Microsoft cannot/or don't want to have similar offers. This is the first question...
But what I understand even less, which people are using small azure instances and spend that money???

Robert Muehsig
September 15, 2015

re: Web Browser Control – Specifying the IE Version

On Windows 10 it seems easier to skew things up. If you choose a "unkown" IE Version (e.g. 0) or anything else you will just see a blank page and an endless process will run.

I ended up with these settings which seems to work with Win10 and use the latest IE11 engine:


[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]

Thanks also to this blogpost here:

September 13, 2015

re: The Rise of JavaScript Frameworks - Part 1: Today

Hey Rick, great writeup, as always.

We started using Angular (and ASP.NET MVC for the server-side API) and "Angular + Ionic" for mobile development. I basically love the idea of having the "V" part of the "MVC" rendered completely on the client, and it works like a charm for small-midsize apps. BUT sooner or later people (mostly entry-level JS devs) start facing limitations, creating workarounds, adding some spaghetti-code and hacks, and the code becomes SO ugly... So sometimes we stick to good-old Razor views just for the sake of code cleanliness

Neil Moss
September 13, 2015

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

Thank you Rick. I had indeed added the related dependencies.

Having double checked and found nothing missing according to the instructions in the post, I went to your CodePaste.NET GitHub to see what was actually in play there. (Should have done that before bothering you, but... well, next time).

The packages I was missing were these below:
 <package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net451" />
 <package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net451" />

From the title and general direction of the post, I'd got the idea that we didn't need the Microsoft.AspNet.Identity packages because we're just using the minimal OWIN classes.

Still, up and moving along now, so much obliged to you Sir.


Rick Strahl
September 12, 2015

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

You're missing the base OWin assemblies. If you had an existing project and you pulled out packages except the ones mentioned you'll lose the dependencies that get pulled in from the packages. The list I provide only works if you add the packages to a project and then pull in the related dependencies.

The best thing to figure out the assemblies if you did do this is to create a new project add the nuget references and then copy the package list.

Neil Moss
September 12, 2015

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

Hi Rick - struggling with the samples here.

I removed all the Microsoft.AspNet.Identity packages - did I go too far? If I just register the nuGet packages you suggest, the compiler doesn't like the Startup partial at all.


The UseExternalSignInCookie property doesn't exist under IAppBuilder

            // Enable the application to use a cookie to store information for the signed in user
            app.UseCookieAuthentication(new CookieAuthenticationOptions
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString("/Account/LogOn")

In class Microsoft.Owin.Security.Cookies.CookieAuthenticationOptions, AuthenticateType is a string and not an enum.

And so on..!

Can you clarify the nuGet packages and versions you're using and the namespaces you're 'using' please?


Anish George
September 11, 2015

re: AngularJs and Promises with the $http Service

Great Article man. Exactly what I was looking for. Thanks for the explanation on how to transform a regular promise into an $http compatible one.

Russ Painter
September 11, 2015

re: Upgrading ASP.NET 5 Projects between Beta Versions

Thanks Rick. Super helpful stuff.

The link for Microsoft ASP.NET and Web Tools 2015 (Beta7) for Visual Studio 2015 is

September 11, 2015

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

Thank you for taking the initiative to write this article which has helped me quite a lot!


Rick Strahl
September 10, 2015

re: Dell XPS 15 review

@Kevin - ping via email re: XPS. I'm still on the mainland so shipping is still ~$30. Probably'd be the same from Maui though. :-)

September 10, 2015

re: Dell XPS 15 review


Thanks for confirming what I thought. I am .Net/SharePoint developer, so I will need to run VMs for SharePoint. Currently, I do not develop any iOS apps. I own an IMac and I could do it on that machine if necessary... I am not a touch pad fan, I need a mouse so that sounds like a no brainer for me. Just curious how much for the XPS...I live on Oahu so shipping should be cheap!! I meet you a few years back in Vegas at one of the DevConnections...



Rick Strahl
September 10, 2015

re: Dell XPS 15 review

@Kevin - I have both the XPS and the MacBook Pro. If you plan on using Windows, stick with the XPS. The Mac is a nice and very fast machine but not worth the premium for a pure Windows machine (then again the XPS's aren't a lot cheaper these days - they started at $2,100, yikes - FWIW, I'm selling my XPS with a brand new 1TB SSD if you're interested).

The XPS is a great machine all around. Fast, great screen, just works. The only thing that I don't like about it is the terrible, terrible touch pad. The thing is nearly unusable unless you set the sensitivity to ultra-sensitive which in turn makes it error prone for typing. Battery life also isn't very good but that doesn't matter much to me as I mainly use it at home. Other than that it's a kick ass machine.

I have a love hate relationship with the MacBook Pro. On the one hand the hardware is super nice - especially the touch pad and keyboard. I do miss the touch screen. I'm running Bootcamp, and then also use the same bootcamp partition on the Mac with Parallels. Bootcamp is fast - the MBP is slightly faster than the XPS, but I do have the top of the line MBP and it's one gen later than the XPS. There are a few issues with Windows not waking up, and of course there are the funky keyboard translation issues. Running in Parallels especially can be tricky due to the Mac special keys interfering and doing funky stuff. I bought this beast mainly because I do mobile dev and for iOS development I need to have a Mac and Cordova development in general is actually much easier on the Mac. It took me a long while to get the Mac/Windows combo dialed so that it's workable but now that it's working well I'm pretty happy with it. The MBP is a completely sealed machine - you can't replace anything without voiding the warranty.

If I was purely running Windows I definitely would go with the XPS. And if you need a Mac occasionally and for an iOS build server only get a Mac mini. Much more economical.

September 10, 2015

re: Dell XPS 15 review

Rick, are you still happy with your XPS?? I am up in the air between a Mac Book Pro and XPS. I have an older XPS and want to continue with Windows...



Andras Zoltan
September 08, 2015

re: How to manage Content in NuGet Packages?

Very curious Rick:

What are you going to do now that, as of 3.1, Nuget doesn't support content any more?

I've used Nuget content extensively in the past to distribute 'bootstrapping' files; startup code with partial hooks, Razor code, View/Controller templates etc, and clearly we won't be able to do it like this any more.

I'm guessing it's going to be Bower?

September 08, 2015

re: ASP.NET MVC HttpVerbs.Delete/Put Routes not firing

I am migrating my project from MVC 4 to MVC 5 and I just have faced this ridiculous problem. Thank you very much for sharing this information, you help me save a lot of time!
Microsoft is going crazy...

September 07, 2015

re: WCF WS-Security and WSE Nonce Authentication

I need that the binding
work with the http protocol. I change de binding but I see this error "The provided URI scheme 'http' is invalid; expected 'https'."

My binding is This:
<binding name="EmisionTarjetasImplPortSoapBinding" >
<security allowInsecureTransport ="true" enableUnsecuredResponse ="true"
<textMessageEncoding messageVersion="Soap11"></textMessageEncoding>
<httpsTransport maxReceivedMessageSize="2000000000"/>

Lex Li
September 06, 2015

re: IIS SSL Certificate Renewal Pain

Have been a year and more, but finally Jexus Manager (for IIS Express) is now capable of handling basic certificate tasks, Advantages over Microsoft's IIS Manager in this area are, 1) non-admin can run it to view Server Certificates in read-only mode, 2) non-admin can perform changes following elevation prompt, 3) renewing a certificate is just like requesting a new one, 4) can generate self-signed certificate with custom CN. Limitations right now are, 1) bit length is not yet honored, 2) no prompt before removing a certificate and netsh http bindings are not validated. This tool is still in Beta phase, and the above issues are expected to be fixed pretty soon.

September 04, 2015

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

Dear MVC5 Authentication Guru,

It's very hard to find the good and usefull articles like this. Every forum or question related to MVC5 Authentication are about the default OWIN stuffs. This is the best solution i ever found for the custom Authentication Mechanizm.

I played with the code and works %100 for me for now. You should definitely write more articles about this setup. May be you can add Authorization, Roles, Multiple Roles in a single user, how to show different content in views to different users or roles, or somethink like that.



September 02, 2015

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

This is the best article about AspNet.Identity I've read ever!

September 01, 2015

re: Custom ASP.NET Routing to an HttpHandler

I downloaded the sample project and put a copy of westwind.web.dll in my own project, but the CallbackHandler in that assembly only has 2 properties—IsReusable and RouteData—no Context, Request or Response. Where can I get a compiled dll whose CallbackHandler has all 5 properties?

Doug Dodge
August 29, 2015

re: The Rise of JavaScript Frameworks – Part 2: Tomorrow

@Rick - Can't resist.. Off topic so apologies.

I noted in your two articles the words "Today" and "Tomorrow"

Reminded me of a joke; The Past, the Present and the future all got together in the same room.

It was tense. *g*

Doug Dodge
August 29, 2015

re: The Rise of JavaScript Frameworks – Part 2: Tomorrow

@Rick, The article that lit me up was <a href="">Functional Programming For The Rest of Us</href> written in June 2006 by Slava Akhmechet.

Recommended if you haven't read it yet

Rick Strahl
August 29, 2015

re: The Rise of JavaScript Frameworks – Part 2: Tomorrow

@Doug - yes I think that where we're heading. Small, single responsibility UI components that can be plugged together to create a whole. Reusability by design and testibility by simplicity. As I mentioned in the post this sounds great, but it really takes some mental adjustment to work this way effectively - it does scatter things about quite a bit and it takes a dedicated workflow to be able to keep things organized.

Doug Dodge
August 29, 2015

re: The Rise of JavaScript Frameworks – Part 2: Tomorrow

@Rick - Great article as always; thanks. Also, a big shout out to Pluralsight. Before their recent move their old office was about 3/4 of a mile from where I live. Great folks and product(s). So, having no time whatsoever :) to take advantage of my Pluralsight membership nor to keep up with the recent changes like React & Flux the article summed up for me nicely what I do think, if I am reading this all correctly, the larger directional move of our industry. I appreciate you doing all the heavy lifting (again *s*).

In the abstract sense all of the changes in these new products seem to me to be moving in the direction of the Functional programming model. I heard small objects, each with a discreet task, with predictable results for predictable input. Maybe I'm misunderstanding but it sure seems that way.


August 28, 2015

re: Building a better .NET Application Configuration Class - revisited

Hi Rick

Thanks for your blog post

I am using a console application to test your code. But with the console application, there are no dlls so what should i put after type="" ??

any pointers would be appreciated, because I am young to .net and it would take me a long time to work it out otherwise.


    <section name="MyCustomConfiguration" requirePermission="false"

August 28, 2015

re: Azure VM Blues: Fighting a losing Performance Battle

Thank you for this post! I've been looking all over for other opinions on Azure because I am definitely getting frustrated. I am in the same boat right now as far as having a physical server and trying to move to Azure VMs. It's definitely tough to see what kind of hardware specs I will get with Azure compared to what I currently have on my physical server, but I really need to move to a hosted solution. I am looking to move around 10 sites to an Azure VM while also running a local SQL Server instance and right now I am on the Standard A0 instance to keep the monthly cost down, but I'm not sure it is going to be enough with 0.25 Cores & 0.75 GB of memory. I have also been looking at AWS and it seems that the RDP isn't as slow but I'm still going to get minimal resources unless I want to fork out a bunch of money (personal budget here as well). I really need to find something that provides decent resources and won't suck my wallet dry, and I don't need all the bells and whistles as far as the admin side goes.

August 27, 2015

re: Windows 10 RTM Upgrade and Driver Update Issues

This fix assumes you know which driver is failing. What do you do if you cannot tell what is causing the install failure?

Torgeir Helgevold
August 27, 2015

re: The Rise of JavaScript Frameworks – Part 2: Tomorrow

@Rick:It's a fair point that similarity is relative, but I don't think components offer better modularity than Angular 1.x. Granted, it's true that the api surface of Angular is too complex, but if you model your directives with all your logic in directive controllers, there is not much of a difference between Angular 1.x "components" and Angular 2.0 components - at least on the surface. I also attribute some of the "cleanliness" of Angular 2.0 to the new direction of using TypeScript. In fact if people started using TypeScript with Angular 1.x I bet people would praise Angular 1.x code as well :-)

There are however other benefits to Angular components under the hood. They have promised to decouple the components from the runtime environment, which means we get some of the same benefits as React offers.

As far as migration goes... I disagree with you that it's unwise to migrate a project to the next version of the framework. Picture a multi year project. Going forward with yesterdays's technology is undesirable for a few reasons. 1) Hard to attract talent 2) You end up losing out on the new cool features of the next version.
That said. In light of the recent news that Angular 1.x and Angular 2.0 will be able to coexist in the same project, we pretty much get the migration for free.

Rick Strahl
August 26, 2015

re: The Rise of JavaScript Frameworks – Part 2: Tomorrow

@Corey -

> Rick watching one of my courses? Achievement unlocked! :)

LOL. I struggle as much as everybody else trying to keep up with all this change and Pluralsight has been a good resource for high level exploration... finding time for watching a multi-hour course even at x2 speed is the biggest problem :-)

Rick Strahl
August 26, 2015

re: The Rise of JavaScript Frameworks – Part 2: Tomorrow

@Torgeir - Similar is a relative term. Directives in Angular 1.x are a terrible API construct in terms of implementation. Angular 2's implementation of a component is much cleaner and because of it components can serve multiple purposes as components and controllers. My point in the post is that Angular is consolidating things into simpler constructs and less API surface which makes things easier to work with.

As to new concepts - there are plenty in Angular 2. Today few people really build modular applications with Angular. Most people build essentially complex controllers with directives as needed to handle reusable features or for interfacing with the DOM directly to abstract low level logic. In Angular 1 you'd be crazy to build a modular application out of directives only.

Backwards compatibility and the ability to migrate is overrated. If you have a running application there's no great need to migrate it. I would not recommend going down that road unless you're planning to do a major rewrite/refactor anyway. 'Migration' rarely makes sense IMHO it's just running in a hamster wheel and not making any progress while wasting development resources.

If you really want to take advantage of Angular 2 (or any of the other frameworks) you'll want to go full bore and do ES6 modules, and classes etc. Porting an app from ES5 to that will not be a weekend job...