Recent Comments



Rick Strahl
Yesterday

re: Filtering List Data with a jQuery-searchFilter Plugin

@derek - that's what the targetSelector option is supposed to provide. Doesn't that work for you?

Patrick
Yesterday

re: External Links in Cordova for iOS

Great article, ran into this same problem. From the plugin docs, I think the
window.open
in your
vm.openAmazonUrl
function should include a "_system" argument to trigger the external browser launch?

Derek
Yesterday

re: Filtering List Data with a jQuery-searchFilter Plugin

This is wonderful! Is there anyway that I could include a class on one of the div's, call it say 'searchable' and only have the script search that field, but still display all the other info in the search results.

I was thinking something like
<div class="time-entry-right searchable">


Cheers

Derek

Aaron Gray
Tuesday

re: The broken Promise of the Mobile Web

Very thoughtful post. Your idea that losing app store sales is likely a primary reason mobile O/S's are not prioritizing making web apps better was quite interesting. :-)

Ken
Tuesday

re: Web Browser Control – Specifying the IE Version

Hi

I've played with various settings but still end up with some problems. The application targeting runs fine in a desktop browser that has the enterprise mode set on. Is there some way I can set Enterprise mode for what runs in the library

Thanks
Ken

Rick Strahl
Monday

re: Strongly typed AppSettings Configuration in ASP.NET 5

@veljkoz - ASP.NET separates the source code from the Web content and source and support files like the .config/.json files are not accessible through the browser. The only content accessible from the Web has to go into the wwwroot folder.

veljkoz
Monday

re: Strongly typed AppSettings Configuration in ASP.NET 5

Hi,

Great article, but my only remaining concern is for security - the .json files could be easily referenced from client side (e.g. malicious user knowing the existance of such config.json could simply open it up in his browser) - so all that was previously protected by putting it in web.config (IIS made sure visitors don't get to it) is now open for viewing - connection strings, sensitive server settings etc...

Is the config.json protected somehow, or we need to do some manual work there?

Thanks,
Veljko

Paul
Monday

re: Strongly typed AppSettings Configuration in ASP.NET 5

Any idea why we are supposed to inject IOptions<AppSettings> rather than just AppSettings? Would be cleaner IMO if it worked that way.

Jason G
July 23, 2015

re: Strongly typed AppSettings Configuration in ASP.NET 5

Ok so i was actually able to get the IOptions stuff working again using Rooc's suggestion to use the GetConfigurationSection method instead of GetSubKey which disappeared.

It looks like it is also possible to access the AppSettings in a strongly typed manner using ConfigurationBinder with the following syntax:

var someString= ConfigurationBinder.Bind<AppSettings>(_configInstance).SomeProperty;


However i am getting a very strange issue where it will return the property value only if it is set at the class level, not in the config.json file. Not sure if that is a bug or what. I'm running on beta5. I have not debugged into it to see whats actually going on with that behavior but surely it should return the value in the json file as well.

Doug S
July 22, 2015

re: WCF WS-Security and WSE Nonce Authentication

Many thanks. I'm consuming a Java service that was failing due to the missing EncodingType attribute on nonce. And, bonus- you let me cut the WSE cord.

Rick Strahl
July 22, 2015

re: Strongly typed AppSettings Configuration in ASP.NET 5

@Dan, @Json - AppSettings are gone and there's currently no replacement. If you are using full framework you can still add a reference to System.Configuration and probably get at the keys - the configuration will be available in that case. But Core doesn't have any access to that.

Jason g
July 22, 2015

re: Strongly typed AppSettings Configuration in ASP.NET 5

Hey great write-up this helped me a lot.

Like Dan, I'm am no longer able to figure out the appsettings stuff with the RTM release. A lot of this code is basically no longer valid. Could you comment on this if you are able to find out what happened?

Dan
July 21, 2015

re: Strongly typed AppSettings Configuration in ASP.NET 5

It looks like this AppSettings concept has been removed from the release. Is this the case? I can't seem to find an alternative for it and the scaffolded pages no longer use them.

Stefan
July 21, 2015

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

Hi Rick,

I noticed some inconsistencies in the information in the blog post.

NativeScript is licensed under Apache 2.0 license, which is a permissive OS license (visible in the bottom of the page you linked for this product).

Also Kendo UI has an open source subset, called Kendo UI Core, again licensed under Apache 2.0: http://www.telerik.com/kendo-ui/open-source-core

jimM
July 21, 2015

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

Excellent write up Rick!!... I've been using MeteorJs... love it... it uses mongodb by default.. but sql coming soon..

Chris Madden
July 21, 2015

re: Azure VM Blues: Fighting a losing Performance Battle

I also learned that network xfer is also limited by virtual machine size and it is different for send/recv. For example for a 4 vCPU A3 instance you can send around 45MB/s, while that same VM can receive 90MB/s. If you increase to a 8 vCPU A4 instance you can push about 200MB/s send or recv, or about 175MB/s simultaneously.

Rick Strahl
July 20, 2015

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

@rdog - It looks like a nice small implementation of a rendering engine, but it doesn't really qualify as a full framework. Similar to reactJs, but smaller in scope. I haven't played with it though, but might actually have a few good use cases for it.

@SEO - SEO is important but we're talking about apps vs. content pages. I think document centric and SEO sensitive content will continue to be served as server rendered content primarily. The focus for these frameworks however are applications - that don't necessarily require heavy SEO beyond initial start page. I haven't heard much about the Googles client side SEO features and how well that's actually working - be curious to hear if anybody has experience with that and what the results are.

Additionally the new frameworks all have some support for initial server rendering of content and then handing off to client side rendering so you can get the benefit of traditional SEO in addition to any script based SEO improvements that Google can provide.

SEO
July 20, 2015

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

I think this trend will depend primarily on Google (SEO). I don't know whether this is really the case with a SPA.

rdog
July 19, 2015

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

Hi rick,

What are your thoughts on Riot.js

Rick Strahl
July 19, 2015

re: Dell XPS 15 review

@Fabian - I think Windows 10 will make the multi-monitor stuff easier. I'm running it here and being able to control each monitors scaling settings individually makes it much easier.

FWIW, I run 2 monitors and the laptop screen in my office setup using both the HDMI and DVI outs for the two monitors. Never had a problem with that. The laptop screen makes for the third screen. It just works.

I haven't seen the sleep problems you describe nor the slow performance. But - if you do run into this sometimes an occasional reboot will fix any odd issues I've had. Most of the problems I've run into had to do with the video drivers and video driver updates so I'm weary of those. I have the nVidia update panel up and set to manual to avoid frequent updates once I have a working driver.

Rick Strahl
July 19, 2015

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

@Tune - yes I plan on talking about Aurelia. Like you I really like what I see with it, especially compared to he weirdness that Angular 2 seems to be turning into :-) but both look really nice in terms of functionality. Like the first post though I don't want to get mired in the details of each framework though, but deal with the overall concepts and effects on the development community.

Tune
July 19, 2015

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

Hi Rick,
Great post (as always) on your great blog!

Will the follow up ("The Rise of JavaScript Frameworks - Part 2: Tomorrow"?) feature Aurelia? (the resurrection of Durandal)
http://aurelia.io/

Fabian
July 19, 2015

re: Dell XPS 15 review

I have pretty much the same machine as you ordered.

I’m working on it for some months now and I have some mixed feelings. Basically the machine is great.

When working remote I’m keeping my resolution at 2880. But because of the high resolution of the screen, it doesn’t get blurry. Windows doesn’t scale good and I’m hoping this will be better when Windows 10 is arrived.

At the office I have connected a Dell UP3214Q (31,5” and 3840x2160). And it gave some trouble. It can’t be connected easily. You need to combine two screens to one. You see this because sometime one part of the screen is slower than the other part. And it hits the limit of the graphic card. Netflix full screen is a bit slow.
Also the XPS can’t handle two screens (combine to a 3840x3160) and the laptop screen. But you need to open the laptop to start hem. What turns the XPS screen on. Force windows to increase the font-size to 150%. And you need to logoff to restore this to 100%

But the most part I’m frustrated about. He doesn’t wake-up well. Turning the machine on results often in a total freeze of the machine. No, I don’t have any hardware attached to it and it happens when I’m on the road or at the office. I know it must be some drivers issue..but I must always keep in mind that I must hard reset my laptop at the next start up. Not very productive.

Oh and..sometimes he is verrryyy sloowwww. This is often when he’s back out of sleep when I did work in Visual Studio. I guess is has something to do with debugging mode…and it looks to be a driver issue also.

Sum: great laptop with bad drivers and could use a docking

Rick Strahl
July 16, 2015

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

@quinton - there are resource folders that hold template icons. You need to replace the icons for each platform with your own artwork. It's in the res folder off the root where you can icons, screens and native folders each of which has subfolders for each of the platforms with placeholder images that you need to replace.

quintonn
July 16, 2015

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

How do you set the app icon and splash screen for apple using cordova?
I have updated the res/icons and res/screens folders for ios but when I upload the ipa file in itunesconnect it still shows the default cordova icon (some weird face).
Any advice/info on this?

Rick Strahl
July 15, 2015

re: Multiple Desktops in Windows

@Dan - the gestures would have to come from mouse drivers. I think the Syntaptics drivers have a bunch of mouse gestures you can define but it will take Windows 10 specific drivers that can recognize multiple desktops.

Not holding my breath though, since PC touchpads are so freaking crappy compared to the MacBook's touch pad. Clearly touchpads on pc's are treated like an afterthought.

Mel
July 15, 2015

re: Self-Hosting SignalR in a Windows Service

How can I host a SignalR client in a Windows Service so that I can have it send emails in response to 'failure' messages received and how would I keep it open/running till the service is stopped?

RM
July 13, 2015

re: Web Browser Control – Specifying the IE Version

Hi Rick,

I have added Registry key to HKEY_CURRENT_USER and Wow6432Node folder and script error problem is resolved. Thanks a lot for this nice post.

But now HTML is not rendering properly. Any specific reason? This is a production issue and need to be fixed ASAP. DocType is XHTML 1.0 Transitional.

dox
July 13, 2015

re: Multiple Desktops in Windows

i find this better than the Systernals version

https://github.com/octalmage/mdesktop

Dan
July 11, 2015

re: Multiple Desktops in Windows

Love the newer builds of win10 on my laptop, but I do miss the 3 finger swipe left and right from OSX for multiple-desktop navigation. Been looking all over for something that would enable that.

Rick Strahl
July 10, 2015

re: Filtering List Data with a jQuery-searchFilter Plugin

@Darek - in this case the other drop downs are filtered on the server - otherwise the list would be too big and would require to have all the data on the client. So any of the other filters cause the server to re-render the page with the retrieved items. In this case it's an ASP.NET app that redraws the entire page, but you could also refresh the data from the data with an AJAX call.

If you need to filter all that data via AJAX in combination I would probably just run the query on the server and feed all the data based on all the filters and you'd get the same effect albeit a bit slower since the data would come from the server.

Nick Hoffman
July 10, 2015

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

Besides being a great tech article, being a MetalHead I love the sample app...

Abhijeet P
July 10, 2015

re: Use IIS Application Initialization for keeping ASP.NET Apps alive

Hi Rick,
This only seems to work for the default website, the app initilization module will only perform the initialization for localhost:80 , so if you create a new website and want to use this feature you are SOL.
Also, "https" is not supported which makes the usability of this feature pretty darn useless IMHO

Darek
July 09, 2015

re: Filtering List Data with a jQuery-searchFilter Plugin

Hello there,
great solution, thanks for that :)

I'm wondering if u could provide example with dropdown as we can see on that .gif image. First filter by "customers" or wathever and then search by input field inside those "customers". How to merge them together actually ?

Cheers,
Darek.

Agustin
July 07, 2015

re: Caveats with the runAllManagedModulesForAllRequests in IIS 7/8

Hey there Rick.
I had this issue, a custom HttpApplication, defined in global.asax, was not firing its events for non-managed requests.
Toggling runAllManagedModulesForAllRequests=true was doing the trick. But I was not able to find a freaking reason or explanation as to why it was like that.
Until I found this article. It gave me closure !
Thanks :)

Jeremy Holt
July 06, 2015

re: Strongly typed AppSettings Configuration in ASP.NET 5

When using WebApi 2 my web.config was

<connectionStrings>
    <add name="RavenHQ" connectionString="Url=http://localhost:8080;Database=ModelFarmDb" />    
</connectionStrings>


I would initialize my RavenDb with

 var documentStore = new DocumentStore
            {                
                ConnectionStringName = "RavenHQ",
                Conventions = new DocumentConvention
                {
                    IdentityPartsSeparator = "-"
                }
            };


Raven would pick up the ConnectionStringName from the web.config. When deployed on Azure, it too would happily pick up the ConnectionStringName.

I can't work out how to write the config.json file to do the same thing.

I've tried

{
    "Data": {
        "RavenHQ": {
            ConnectionString: "Url=http://localhost:8080;Database=ModelFarmDb"
        }
    }
}


but it doesn't work. Any suggestions on how to directly map the web.config sections to config.json so as not to break other libraries that assume a web.config?

The app is running under IIS Express locally and is a web app on Azure.

Many thanks
Jeremy

AndriusK
July 06, 2015

re: Windows 10 Upgrade and IIS 503 Errors

Hi Rick,

at iis.net forum I found solution to fix urlrewrite module.
https://forums.iis.net/t/1223556.aspx

Machine: Windows 10,x64, build 10130
IIS 10.0 urlwrite fix

Open Regedit > HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp
Edit "MajorVersion" and set the "DECIMAL" value to 9
Hit F5 while in Regedit
Now go install the ReWrite 2.0 module:

https://www.microsoft.com/web/gallery/install.aspx?appid=urlrewrite2

Change the "MajorVersion" back to "DECIMAL" value of 10 (HEX= a)
Hit F5 while in Regedit Close Regedit

Run> inetmgr
URL Rewrite icon is finally visible.

Chris
July 04, 2015

re: Strongly typed AppSettings Configuration in ASP.NET 5

I noticed that in this article you are setting up a logging configuration. I cannot find any articles that explain how to log to a file with asp.net 5, and hoping you could shed some light. I want to use the native logging classes as opposed to a third-party solution such as serilog. Thanks.

Stuart
July 04, 2015

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

Hi, Thanks for this great piece of work... I'm just starting on a new project and thinking of using this...

I do however have a slightly more complex requirement..

As the project will be a multi tennanted application I would like to have your current solution with some extra functionality allowing the resources to be customised in a hierarchical way. e.g. application out the box should be multicultured / multilingual and every tennant gets that set of resources by default (set by sysadmin) - however if a particular tennant wishes to override a resource (potentially in multiple languages) they will have the ability to do that for only their views. Was planning on holding the tennantid as a session variable.

Just to be really awkward I would like to further extend this idea of hiearchy as each of my tennants will poentially have multiple 'portfolios' winthin the application and I would like to have the concept of overrides at this level too. Again portfolio-id would be held as a session variable... If no overirde exists I would like to use the values specified in the next hiearchy level up. Would also want to cache as much as possible to prevent numerous db calls.

EZE
July 03, 2015

re: Azure VM Blues: Fighting a losing Performance Battle

We're trying to run a VEEAM server in Azure as a target. We wanted our backups in Azure so that we could restore them in a DR scenario, or maybe restore for DEV testing. However, even the VEEAM server is horribly slow (A3 standard). Same type of delays as described. Veeam uses local Disk for a simple SQL install, and WAN Accelerator cache. Striped 4TB of disk for backups themselves, but simple file transfers within the VM are lucky to get over 10MB/s. GUI slowness is blatantly apparent. I too thought about doing an affinity group, but Microsoft is strongly recommending against them now, and not giving the ability to create them in the new portal. I really wanted Azure to be part of our future infrastructure (VM's, services, Hyper-v Replica), but I am incredibly disappointed. Having to rethink our entire DR and infrastructure strategy...

Rick Strahl
July 02, 2015

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

@Amine - good suggestions. I have to take a look and see how feasible it is to have all resources in the list. We do need to know what the active resourceset is in order to perform some perfunctionary operations.

Could you create an Issue on Github so this can be tracked? https://github.com/RickStrahl/Westwind.Globalization/issues

twomm
July 01, 2015

re: Auto Selecting Cultures for Localization in ASP.NET

Yes, I will try the outlined approach and if I see any issues, I will use a module.
Thanks for your answer.

Rick Strahl
July 01, 2015

re: Auto Selecting Cultures for Localization in ASP.NET

@twomm - I think you should be fine because anything you do in the GetHandler happens before the MVC routehandler gets control of the request. I think you do want to try and set the culture/uiCulture as soon as possible in order to make sure that all aspects of the request like authentication get to use the current culture settings. THat's generally why you want to do things in the BeginRequest() cycle if possible.

But if you're changing culture based on the route you have no choice to do it until later, unless you create a module that looks at the URL and figures out the route culture earlier in the cycle (which wouldn't be difficult to do since you know what the culture Urls look like).

Bassem Mohsen
July 01, 2015

re: HttpWebRequest and Ignoring SSL Certificate Errors

To elaborate on Michael Bray's comment, here is how you skip the certificate validation for a particular request without affecting the rest of the application.

httpWebRequest.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => true;

This code requires .NET 4.5 or a later version.

Shawn
July 01, 2015

re: Using FontAwesome Fonts for HTML Radio Buttons and Checkboxes

I'm having the same issue as those above with chrome and firefox. I'm toying with it now, but please let me know of any suggestions. So far, no luck with the IDs.

twomm
July 01, 2015

re: Auto Selecting Cultures for Localization in ASP.NET

Hi Rick,

nice post, as usual!

I am wondering if you could give some input on the following. It is a bit more about routing, but related to the topic:
I am using MVC and have to support URLs, that contain the culture and the same URLs, that do not.
So basically, I have one route with "culture" in the URL and a matching route without culture in the URL, where I set the culture to a defaults "notset".

            routes.MapRoute(
                name: "Default",
                url: "{culture}/{controller}/{action}/{id}",
                defaults: new { controller = "Default", action = "Index", id = UrlParameter.Optional },
                constraints: new { culture = new CultureConstraint(Culture.enUS, ...) },
                namespaces: new[] { "..." })
                .RouteHandler = new CultureRouteHandler();
            routes.MapRoute(
                name: "DefaultCulture",
                url: "{controller}/{action}/{id}",
                defaults: new { culture = "notset", controller = "Default", action = "Index", id = UrlParameter.Optional },
                constraints: new { culture = "notset" },
                namespaces: new[] { "..." })
                .RouteHandler = new CultureRouteHandler();


On all my routes, I use a custom CultureRouteHandler. Within that in GetHttpHandler, if the culture is set to "notset", I try to get it from the accept-header, or use a system default one. In the end I overwrite
        protected override IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            ...
            // read culture if it is set to "notset" from routing
            ...
            requestContext.RouteData.Values["culture"] = culture;
            ...
            // set on CurrentThread
            ...
         }

with the desired culture.

Now my question is, can this have any implications on the further request pipeline, or is that approach fine?

Any thoughts would be much appreciated!

Thanks

Amine
June 27, 2015

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

Hi Rick. and Thanks for remarkable effort.

I want to suggest two improvements regarding to the Web AdminLocalization Interface.

- The Selector of resourceSet on bottom is not so intuitive. I believe making it on the left side and presenting Keys/resourceSets in hierarchical view will be better.
- The search only within the Current resourceSet, I beleive It is not best. because in real wold Projects we have to deal with multiple resourceSet, and not have to know each resource within which resourceSet before searching so searching on Whole will be great. And will be more cool if you offer search within content of strings not only the keys.

Amine
June 27, 2015

re: ASP.NET MVC, Localization and Westwind.Globalization for Db Resources

Hello
and Thanks for post,
I am wondering if :
- multiple selection-deletion of resource elements is offered on Backend WebApp
- if the backup, import-restore is available as option because in many cases, we have the machines of developers that need to import resources filled by Virtual Assistants and persons that have more time for localization/globalization stuff. I know that with Sql scripts we can do it, but mainly in managing duplicate entries, will be a pain between more than 2 machines.

Rooc
June 25, 2015

re: Strongly typed AppSettings Configuration in ASP.NET 5

@Louis: in the sample app it is used in a console app without the dependency injection:
https://github.com/aspnet/Logging/blob/dev/samples/SampleApp/Program.cs

will this work for you?

Rooc
June 25, 2015

re: Strongly typed AppSettings Configuration in ASP.NET 5

Hi Rick,

Do you have any idea how you do the following on linux
SET DATA:APPSETTINGS:THEMEOPTIONS:THEMENAME=Console

I can't seem to find how to excape the colon in the key name, so it says it's not a valid identifier... :S