Pages

Showing posts with label technology. Show all posts
Showing posts with label technology. Show all posts

Tuesday, December 13, 2011

Cannot delete folder in Windows 7

I had a very strange problem on my PC lately where I couldn't delete a folder (running Windows 7 Pro, SP 1). No matter what I tried to do, the file would not allow me to delete it. Instead, I kept getting a "Folder not found" error (or something to that effect). I tried to move the folder; I tried to rename it; I rebooted (both hard and soft reboots). None of the proposed solutions I found worked. There was no other program using the folder (it was empty, and even after a complete reboot, before opening any programs, it still wouldn't let me delete it).

Thankfully the Internet is full of information -- some of which is actually useful -- and I found a site that answered the problem. However, it was a bit old, and the information was buried a bit down the page. Here's the original link for reference.

So how did I solve the problem? I had, by God's Providence, literally just installed 7-zip, which is the program that the member of the forum in the above link ("kami205") used to solve the problem. The solution was simple. I opened 7-Zip (a program not developed in any way for this use), browsed to the location of the folder on my PC, renamed the folder, and then deleted it (I actually had to rename it two different times before it would delete).

That's it! It was that easy. Hopefully this helps somebody else out there who is experiencing this annoying problem.

Friday, November 18, 2011

Automatically log out Members and Send to Login Page in Umbraco

One of my customers came to me the other day and requested that a password-protected area of their Web site be set up to automatically log users out of the password-protected area after 15 minutes of idleness. They were concerned that there might be a security risk to their site if users left their workstations while logged in.

We see this type of behavior frequently for several online Web sites that need to defend against such security risks. Probably the type of sites that come to mind first are online banking Web sites.

I was greatly surprised that I couldn't find anything online -- including in the Umbraco forums -- that addressed every detail needed to achieve this. Also, many of the blog and forum posts that I found were related to auto-logouts for the /umbraco/ area of Web sites (i.e., the admin area). Though I may need to implement similar measures for that area as well, this article does not pertain to that. This is strictly dealing with Umbraco Members who are logged in to a particular area of the site that requires a username and password.

OK, now that the preliminary discussion is finished, let's get to the solution, which, really, is very simple. In this example, we're going to use an auto-logout time of 15 minutes.

First, open your Web.config file and find the sessionState element. The sessionState element is in the system.web section. Within the sessionState element, look for the timeout="15" attribute. if it isn't there, you'll need to add it. For example:

<sessionstate timeout="15" />

Next, you'll need to find (or add) the following:

<authentication mode="Forms">
    <forms timeout="15" />
</authentication>

NOTE: your <forms> element may have several more properties in it. I'm just simplifying it for this post.

Next, you need to add a new property to the Umbraco Document Type that the page you want to be automatically logged out. In my case, that Document Type is called Textpage. To do this, log in to the admin area of your site (i.e, the /umbraco/ area). Click on the Settings section. Open the Document Types, and select the one that your Member-secured page uses. Click on the Generic properties tab for that Document Type. Click on the Add New Property option. I named mine SecureRedirect. Set the Type to Textstring. For the Tab option, mine is set to Meta Data, but you may want yours somewhere else. Save the Document Type, and you're set for this part.

Next, while you're still in the Settings Section, open your main Master Page template. Find a good place in the <head> element and insert an Umbraco field item, such as:

<umbraco:Item field="secureRedirect" runat="server"></umbraco:Item>

Save that file.

Next, click on the Content Section and browse to the page for which you need to set up the auto-logout. Click on the tab where you set up the SecureRedirect Property (i.e., mine is in the Meta Data tab). You'll see the Secure redirect textbox. Insert the following code into that textbox:

<META HTTP-EQUIV="Refresh" CONTENT="920;URL=/login.aspx">

NOTE: the time here is in seconds, not minutes. I set mine to just over 15 minutes (15 minutes is 900 seconds, for those mathematically challenged out there :), to make sure the sessionState and forms timeouts were definitely expired when the page redirects. Also, set the URL to wherever you want the user to be redirected.

Save and Publish your page. Then test to your heart's desire. For ease of testing, I originally set my sessionState and forms timeouts to "1" and my meta refresh time to 70 seconds.

Hopefully I didn't miss anything! If you find this to be useful, or if you see that I did something incorrectly, please let me know.

Tuesday, April 26, 2011

HTC Thunderbolt Battery Consumption Issue SOLVED!

I have to acknowledge my wonderful sister-in-law for pointing this out to me (thanks Kara!), but since she doesn't have a blog, I'm going to post it here on mine.

After about 15 years with the same cell phone provider (Cincinnati Bell Wireless) and having no contract with them during that entire stint, I finally decided to take the plunge with Verizon. Though this means I'm now locked into a 2-year agreement, it also means I have the option of getting phones that aren't 2 years old (Cinci Bell has fallen short in this area ever since I can remember). What led me to switch? I needed a real smart phone. It's quite comical that my old Blackberry Pearl was actually referred to as a smart phone.

The only dilemma I had was to determine exactly which phone to get. I had narrowed it down to three phones -- the iPhone 4, Droid X, and the HTC Thunderbolt. Price, options, speed, and battery life were my three main decision making criteria. Well, I suppose there was always the, "I don't want to be one of those people," in reference to the iPhone. I'm the only PC in an office full of Macs, iPhones, and iPads. Becoming an iPhone user would have been a sign of me caving in to the pressures that surround me every day...how could I do that!

In all seriousness, I really did consider the iPhone. It's a great phone. My wife has one, and in general I do like it. However, there are some things about it that really bug me. Apple has always bugged me, though, with its insistence to control every aspect of their products. I build my own PCs. I cannot stand not knowing precisely what parts are in them, why those specific parts were used, and not being able to change or upgrade them on my own whenever I so choose.

In the same light, to me, the iPhone is actually too polished. It reminds me of my taste in cars -- I like a well-built car that still has some edginess to it. Though Toyota and Honda produce great cars, they're all boring to me. They're too polished. Toyota's Lexus brand is the same (with an exception here or there, like the LFA). Honda's Acura brand actually steps out of the box a bit, but it too has a tendency to err on the side of boring. On the other hand, Nissan (and its luxury brand, Infiniti) seems to step out of the box regularly -- and I like that. They produce well-built cars, and they make them sporty enough to appease that side of my driving habits.

The same is true for my taste in street bikes. I've always loved Kawasaki, because they're a bit more raw. They're known to be highly reliable, but they typically are at or near the top of the pack in power, transmission quality, and speed. Yes, they've struggled in the liter bike class for a while, but that will change in time.

Anyway, the only real difficult part of my decision was that the Thunderbolt was known to have horrendous battery life. Though I don't usually find myself without a power supply, being limited by that was truly a concern. It's the times that you don't have that power supply when you need your phone the most.

In the end, I chose the HTC Thunderbolt. I was drawn to its larger screen size and it's 4G speed. It didn't take long, however, to realize that the abysmal battery life warnings were well deserved. Without exaggerating, I couldn't go more than about 4-5 hours before I needed to charge my phone. It would be down to 15% battery life left at that point. And I'm not talking about using the phone constantly either. I'm talking about sitting the phone beside me while I work. It would literally just sit there on standby, the battery melting away into oblivion.

I read several blog posts and Googled just about everything I could think of to find a solution (other than buying the longer life battery...which was becoming a very likely solution). Nothing solved the problem. Then a 1-minute conversation on Easter with my sister-in-law changed everything.

She has an HTC Evo (if I remember correctly), and had similar battery life problems when she first got it. Someone told her how to alleviate that problem, and she shared that advice with me. So after all of this back story...here's the incredibly simple solution.

I had already disabled just about everything I could think of on the phone, except the one thing that mattered the most. All you need to do is go to Menu --> Settings --> Accounts & sync, and then disable "Background data." If you need to sync everything, either manually sync them, or turn Background data on, let it sync everything, and then turn it back off.

That one thing extended my battery life from having to plug it in about every 4 hours to being able to use it for a whole day without needing a charge. Now, mind you, I don't use my phone a great deal while I'm working. If you use your phone regularly throughout the day, the Thunderbolt may not be the right phone for you, unless you don't mind charging it often. In either case, though, turning off this service will increase your battery life significantly.