Posts
1094
Comments
875
Trackbacks
1
Friday, February 05, 2016
You know you aren’t a very good developer when….

You are teaching yourself a new javascript framework, copying it off of a sample codebase, and you just can’t get it to work and you check your syntax and your various ‘components’ and then after a couple of hours you realize….

You didn’t include a reference to the framework script in your HTML. 

Mother-bleep.

posted @ Friday, February 05, 2016 9:51 AM | Feedback (0)
Monday, January 25, 2016
Good old days: working with WCF

% time actual coding: 4%

% time figuring out the f’ing configuration: 96%

posted @ Monday, January 25, 2016 4:16 PM | Feedback (0)
Thursday, January 21, 2016
My New Favorite Data Type

object [] []

posted @ Thursday, January 21, 2016 3:21 PM | Feedback (0)
Tuesday, January 19, 2016
.NET renaming

I don’t think anything is downloadable yet, but while I will ‘miss’ saying Asp.Net 5 MVC 6 (occasionally with EF 7), I think this makes sense:

REINTRODUCING ASP.NET CORE 1.0 AND .NET CORE 1.0
  • ASP.NET 5 is now ASP.NET Core 1.0.
  • .NET Core 5 is now .NET Core 1.0.
  • Entity Framework 7 is now Entity Framework Core 1.0 or EF Core 1.0 colloquially.
posted @ Tuesday, January 19, 2016 7:06 PM | Feedback (0)
Monday, January 11, 2016
Running Asp.Net 5 Website on IIS

Great summation here of what I posted previously, and that’s all good.

But read the first paragraph:

As ASP.NET 5 hit RC1 about a month go, more and more folks are looking at production deployments and other real life use cases of it. Going beyond demoware and experiments, to real applications, inevitably leads to thinking about hosting it somewhere – which, if your environment is Windows, most likely means IIS.

Think about this.  Asp.Net 5 hits RC1 and people are thinking about hosting it somewhere….

Microsoft kills WebForms, thinks running c# in Visual Studio Code on a Mac or Linux is a scenario that will affect more than 3 people in the world, and haven’t put what appears to be a moment’s thought into how to host this stuff the way that 99.98% of their user base is interested in.

Unbelievable.

posted @ Monday, January 11, 2016 11:43 AM | Feedback (0)
David Bowie

Don’t just check out Ziggy Stardust and all the hits.  Checkout especially the Low/Heroes/Lodger/Scary Monsters period (with some tasty Robert Fripp included).

posted @ Monday, January 11, 2016 9:53 AM | Feedback (0)
Friday, January 08, 2016
Troubleshooting Asp.Net 5 MVC 6 Running Under IIS

Not IIS Express.  Real IIS.

So, I’ve been playing around with two projects in order to jumpstart my learning of Asp.Net 5 MVC 6, TheWorld and Boilerplate, and had difficulty getting them to run under IIS (even after getting them to run fine with IIS Express).  TheWorld would throw up a 500 server error with no information to be found, while the latter kept redirecting for no apparent reason.  The solution to each was different, though some common troubleshooting helped.

The best thing you can do is make sure you have this line in your web.config:

<httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="true" startupTimeLimit="3600"/>

The key item is the stoutLogEnabled=”true” part, as this will put a log file that will alert you to errors you simply can’t see otherwise.

TheWorld: a simple app to highlight the basics of the Pluralsight course, it uses a LocalDB database (which it tries to seed on startup if there is no data available), Angular, Bootstrap, and EF7.  Works perfectly in IIS Express.  Publish to the file system, set it up in IIS, browse to home page…..500.0 error oops page.  No other info.  You can change settings in IIS to pass on more or less debugging info, etc., no use.  Nothing in Event Viewer.  Swell.

Finally, after figuring out the standard out logging thing….hmm:

Application startup exception: System.Exception: Could not resolve a service of type 'TheWorld.Models.WorldContextSeedData' for the parameter 'seeder' of method 'Configure' on type 'TheWorld.Startup'.

What the hell, it works in IIS Express……immediately, I thought to myself “LocalDB….export database to regular SQL Server, change config, bet that works.”  Yep.  That works.  I’m sure there’s a way to get LocalDB to work with IIS, but, I’m good.

Boilerplate: a very highly configured, opinionated site (which is why I’m looking at it), once again, works great in IIS Express, publish to local file system, set up in IIS, browse to home page (which I set up on 8082)…..it redirects to the site on localhost.  Hmm, to the SSL port on localhost.  After a hell of a lot of WTF troubleshooting, I pay attention to the IIS logs.  Hmm, what’s this:

2016-01-07 06:41:22 ::1 GET / - 8082 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/47.0.2526.106+Safari/537.36 - 307 0 0 3

What the hell is a 307 error?  Redirect?  I’m not redirecting, and it works in IIS Express.  Google-fu says:

http://www.troyhunt.com/2015/06/understanding-http-strict-transport.html

HSTS?  What’s that?  Hmm, what’s this line in startup.whatever.cs:

application.UseHsts(options => options.MaxAge(days: 18 * 7).IncludeSubdomains().Preload());

Johnny Dumbass Developer knows to comment that out…boom, there you go.

My major takeaway remains how unbelieveably unready for prime time this shit is.  Johnny Dumbass Developer is still going to do a major site redesign using it, because he’s a dumbass, but it really is mind boggling how many basic items just don’t work or seem to have been unthought of.  Publishing to IIS, something you would think is the baseline case, isn’t implemented at all, you have to do the publish to file system (which requires you to stop the site for it to work) thing, the vast difficulty in getting EF 6 to work (with EF 7 being a useless piece of shit at this point), no upgrade or migration paths for things like Web Api (just fuck along with Johnny Dumbass Developer, it will work!!!!!  Oh, you need PATCH support?  Sorry)….this is crazy stuff.

The Hanselman and Hunter comedy roadshow is great and all, but what the hell. 

posted @ Friday, January 08, 2016 12:20 AM | Feedback (0)
Sunday, January 03, 2016
Repost: Website Obesity

As I contemplate a very important website redesign, this is timely and informative.  And/or depressing.

posted @ Sunday, January 03, 2016 6:22 PM | Feedback (0)
Saturday, January 02, 2016
PATCH support for Asp.Net 5 MVC 6?

So, where is it?

They got rid of ODATA support because….who knows.  Didn’t fit in with the magic vision of the future (maybe OSX or Linux doesn’t support PATCH………), I guess.

There’s a new Microsoft.AspNet.JsonPatch namespace.  Only available in the latest version of C#.  That makes it useless to build on the client side, unless your client is running the latest version of C#.

posted @ Saturday, January 02, 2016 1:07 AM | Feedback (0)
Thursday, December 31, 2015
Postman Rocks

Love it.  API development made easy (or easier, at least).

posted @ Thursday, December 31, 2015 10:57 AM | Feedback (0)