Thursday, October 2, 2014

I found a strange IIS error today which had to do with the configuration files for the application pools.

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

 
 

...was the error I saw which further flagged this line of code...

<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot"
      userName="ourlan\tjaeschke" password=
      "[enc:AesProvider:mn8+xtHgy6HNa9Fvg9kv+OEoClrJ0HBhDn0OgR3vnuSg3y
      PFRmk11S3GpqEy9gr4:enc]" />

 
 

...in this file:

C:\inetpub\temp\appPools\DummyWebSite\DummyWebSite.config

 
 

I could make the error go away by doctoring the line of code like so:

<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" />

 
 

So that I would not have to do this everytime IIS restarted, I just set the Identity for DefaultAppPool which had this problem (which wasn't even the pool dummywebsite was using) to ApplicationPoolIdentity and restarted IIS. What a weird problem. Did I just have the password for my account set wrong? I bet that was culprit.

Have you ever noticed that when you try to change the stuff at the Settings tab at Internet Explorer in the name of opening up the restrictive environment found in Windows Server 2008 R2 and Windows Server 2012 R2 that you can't?

I've been hacking around this by putting stuff into trusted sites when really all I needed to do was explicitly run Internet Explorer as administrator. Duh.

Wednesday, October 1, 2014

Touch ID is a feature at the iPhone 5s and also greater versions.

It reads your fingerprint. You use it to sign into your phone. It's a security feature. A coworker mentioned this. What if it's cold and you're wearing gloves? Sad trombone. I have a 4s which was the first version that allowed one to use one's phone as a wireless router without having to jailbreak it with Cydia. It seems perfectly adequate to me. So far the newer phones don't have must-have features that make me want to run out and buy a new phone.

When opening a new window with JavaScript, you may specify the dimensions of the window and if it should a scrollbar and a few other things.

I stole the following from this:

window.open(whereAmI + "http://example.com", "_blank", 'toolbar=no, location=no,
      status=no, menubar=no, scrollbars=yes, resizable=no, width=1045, height=690');

Flag a parent page to close a child page in JavaScript.

The JavaScript for my parent page starts out like this:

var childWindow;
var closeChildWindow = function(isToRedirect) {
   childWindow.close();
   if (isToRedirect) {
      window.location = "http://example.com/yin.html";
   }
}

 
 

...and has this somewhere downstream for spawning the child page:

childWindow = window.open("http://example.com/yang.html", "_blank");

 
 

At the child page, we may request that the parent page close the child page like so:

function closePage(isToRedirect) {
   window.opener.closeChildWindow(isToRedirect);
};

 
 

Beyond the simple code here you may want to wrap calls that use the parent or the child in if statements which check to see if the parent or the child is truthy. See this for more.

From a parent window, one may close a child window which has been spawned from the parent with JavaScript.

var child = window.open("http://www.example.com/", "_blank");
setTimeout(function() {
   child.close();
}, 5000);

 
 

Also: Steve Filtcroft tweeted me suggesting it might be good to sanity check if there is really a child window open to be closed like so:

var child = window.open("http://www.example.com/", "_blank");
setTimeout(function() {
   if (child) {
      child.close();
   }
}, 5000);

 
 

A circumstance like this did come at work today. What if the child page has been closed on its own? ...might be the easiest circumstance I could suggest for why the first blob of code might fall down I suppose.

Tuesday, September 30, 2014