Tuesday, 18 November 2008

CS0016 Error on ASP.NET, IIS7 and Windows Vista - SOLVED

image So, I was messing with some ideas for site structure and security, and it came to my deploying the site to IIS.

Now, I admit, I am still pretty new to IIS7 and Windows Vista (Home Premium), so I was expecting some issues, but this was kicked my ass for a good 45 mins!

Once I had deployed my site and browsed to it, I was getting the following error:

CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\… ‘Access is denied.’

(Where … is the randomly-generated DLL names created by ASP.NET).

So, I figured, “OK this is probably a permissions issue” as I have encountered similar before in XP, where the ASPNET user account needed to be added. I also know that in Vista this account is called “NETWORK SERVICE”. I then update the permissions for the “Temporary ASP.NET Files” folder in the .NET Framework folder, eagerly get back to my browser, hit F5.. Boom. No dice, same error message.

After doing some digging on the Internet I found out that you also need to set the permissions for the C:\Windows\Temp folder!

To resolve, ensure your permissions are correct for both temp directories:

  • Browse to “C:\Windows\Microsoft.NET\Framework\{Vers.}\”.
  • Right click the “Temporary ASP.NET Files” folder.
  • Click “Properties”.
  • Click the “Security” tab.
  • Click “Edit” and confirm the UAC prompt.
  • Click the “Add” button.
  • In the “Enter Object Name” field, enter “NETWORK SERVICE”.
  • Click “Check Names”, it should become underlined to confirm it is OK.
  • Click OK.
  • With the “NETWORK SERVICE” user selected, in the "Permissions for..” list, check the “Full Control – Allow” check box.
  • Click “Apply” and “Yes” to the security prompt.
  • Finally click “OK” to close the properties dialog.
  • Repeat the above steps on the “C:\Windows\Temp” folder as well! (i.e. browse to “C:\Windows”, right click “Temp”, click “Properties” etc. etc.).

To be honest, I wasn’t sure I believed it at first. But I deleted all temp files from both folders and reset/removed the permissions, and the error reared its ugly head again.

I hope this helps any others with the same problem save time!

Monday, 17 November 2008

Screencast : Adding Components to an ASP.NET Web Form

So, here it is, my first ever screencast. After much encoding and re-encoding, I think I finally have a quality that is good enough.

What’s Covered?

In short, while working through some exercise materials for my MCAD, I was having problems adding the component to a Web Form in VS2005.

The study materials stated that I should be able to drag and drop, but that was not the case..

In this screencast, I create a simple component and add it to a Web Form.

Links

In Summary

Glad I have finally got this uploaded. Now, I know it is not perfect, and I have already watched it several times and taken notes.

I was considering not posting this and re-doing it, however I decided I need to spend less time (at this stage) and more getting stuff out there and getting feedback from the people that matter, you people.

Please do leave feedback, good or bad!

Thursday, 13 November 2008

TwitteRank and Security

image I have seen a lot of talk on Twitter recently following the explosion of a popular tool TwitteRank (at the time of writing, the site appeared to be taken down) and the possibility that it was actually a phishing scam for passwords.

What is TwitteRank?

In short, it’s a tool that produces a “score” based on your Twitter popularity. Reading the FAQ on the site, it offers no insight as to how the number is derived, but it does come up with a number.

There have been plenty of tweets from people broadcasting their rank (this may/will include other messages as it is a pretty generic search term).

So - I Get My TwitteRank, What’s the Best That Could Happen?

Interesting question.. I am thinking:

You get your TwitteRank, all your friends are jealous. Sadly you walk under a bus the next day. You then stand before the big man at the pearly gates who is checking out your rap sheet, he sees your TwitteRank and quickly becomes very apologetic and promptly ushers you to the VIP area. You hang out with some cool (but sadly dead) people drinking and living it up for all eternity.

OK, seriously. At best you get a warm fuzzy feeling that you are popular on a rather large network.

.. Sure, and the Worst?

Well, with your Twitter username and password, your account can be accessed and everything you can do is available. There is strong likelihood that all/some of the following could be captured/performed:

  • Email address.
  • Mobile number.
  • Private/direct messages sent to and from other Twitter users (which could contain personal information for either party).
  • All our friends deleted/blocked.
  • All previous tweets deleted.
  • Horrible messages could be sent to your friends.

The above points got me thinking about some pretty nasty scenarios (knowing how sick some people can be):

  • One of the worse, a fake suicide message.
  • Use of nasty language to friends, possibly damaging relationships or worse, landing you in trouble (e.g. race hate etc). For many people that have a large online presence, this could travel like wildfire and really damage their following.
  • Sending phishing messages. People generally follow people they trust, what would stop you clicking a masked link in a tweet from someone you trust? “Hey Rob, you have to see this [x]”. I know I would click it, you then get sent to a page that bombards you with popups, downloads stuff to machine, etc.

Crap, That Sounds Bad, Now What?

Yes it does, if you have entered your password into TwitteRank, then change it immediately!

It’s times like these that always remind me of a story I heard when I used to work for HSBC:

One a man rings the cards call centre. He says his card has been stolen, and his account emptied. The call centre then query how this is possible, since there is a daily withdrawal cap. He says he has no idea. It turns out the card was flagged as stolen and swallowed the next time it went in to an ATM. Upon arrival of the card to the card centre, they realised the man had etched the PIN into the front of the card. He “always forgot it otherwise”.

Simple answer is, security is there for a reason, NEVER give out your password!

So It’s All My Fault?

No, of course not. The truth is there are people in my network that did the whole TwitteRank thing, and they are smart people. Some of them could absolutely destroy me with their intelligence. However people, YOU should know better!

Blame cannot be shifted entirely on to TwitteRank, YOU gave it your password. Sure, while I may agree that Twitter should support OAuth, I certainly do *not* condone any sort of black hat behaviour. Ryo Chijiiwa, if you DID harvest passwords then you are a real douche bag.

So What Would YOU Do Rob?

I wouldn’t give a crap about things like your popularity score.
YOU and your friends know if you are popular. If you have many followers and a lot of people who engage with you, awesome.

Worry less about you “score” and more about building it.
The time you have spent worrying about being “hacked” you could have been out with a friend for coffee, networking with more people or writing a blog post that makes people think about something.

THINK before doing such things!
When I was asked for my pass on TwitteRank the first thing I asked was WHY? There are many sites that trawl Twitter content, what would access to my account provide over that? What would a score be based on? Does this calculation require access to my account, really?

In my mind, I think popularity would be based on:

  • Number of followers.
  • Number of friends (people you follow).
  • How often you engage with each other.
  • How often you are re-tweeted.
  • How often people link to your blog (interesting challenge with URLS here).

Now, what would a application need for this? Just your Twitter name.

Think people, stay safe.

Sunday, 2 November 2008

O2 Xda “Ignito” (HTC Diamond) Inital Review

imageAs you may have guessed from my previous post where quickly  cover Live mesh being released for Windows Mobile devices – I have recently upgraded my phone from a Sony Ericsson K800i* to a O2 Xda “Ignito” which is a O2 branded version of the HTC Touch Diamond. The Ignito is currently the latest Xda available from O2.

I will spare you the details of the specs of the phone, which can be reviewed on the HTC site here. The purpose of this post is you to give you guys my honest thoughts on it, not sell it.

Why an Ignito?

First off, what compelled me to get the Ignito rather than another Xda offering from O2? I compared it to others available, and it has the best hardware. I am typically pretty demanding of my machines so I will always aim to get a good CPU speed and memory since I tend to multitask a lot. It also comes with Windows Mobile 6.1 which seems to have some great improvements over Windows Mobile 6 (although this is purely based on basic comparative reading – I have not used WinMo 6 myself). Being a WinMo device also enables me to one day to develop apps for it in .NET CF, since it is something that I would really like to.

My Thoughts

The Look

I think it’s quite a sexy phone. The look is simple and elegant. The sleek black finish is nice and the backlit buttons are simple and needed (I hate buttons for the sake of buttons).

The Feel

Its light, most phones really gain weight from their battery, and I tell you what the battery in this is tiny. This is real good for the weight reduction. The buttons at the bottom are smooth and seem to have a good pressure, you don’t need to smash them, but a brush doesn’t start closing down apps and calling people by accident.

The Interface

image The Ignito comes with the skinned version of the TouchFLO interface which is on the Touch Diamond. Now, I initially disabled this since I wasn’t sure if I liked it or not. I didn’t like the huge clock and found some of the screens were just pointless. However, I then decided to sit down and spend some time with it and found it is actually pretty damn useful. I may end up doing a separate blog post on TouchFLO since there are many things that may be annoying to others, but how to change it isn’t obvious.

One thing I was really disappointed with is the lack of black theme on the Ignito. The black HTC theme on the Touch Diamond is damn sexy and goes really well with the phone, so I am stuck with the O2 blue theme (unless anyone can advise on how to change it!).

Like most touch screen phones, simple gestures manipulate the interface. In TouchFLO, the “menu” bar (if you like) sits on the bottom and you slide it along to select an item (a great YouTube vid covers it here - the phone is different but the interface is the same). “Flicks” tend to move to the next screen or auto scroll and “slides” slowly scroll.

I think it is a shame that the phone sports such a nice, modern UI but then when running the Windows applications you come back to the rather old-looking (in comparison) Windows interface. I think the WinMo team should really spend some time looking at the interface WinMo has, and how that affects users on PocketPC’s/Smartphones etc. Just as an example, the “close” button is a tiny “X” in the top right, easy to hit with a stylus, but with a finger, not so much.

The Pre-Installed Applications

The Ignito comes loaded with lots of apps pre-installed. Those that are expected (e.g. Windows Media Player) and others that may not such as (this list is not exhaustive):

Some of these are great. Google Maps came in real handy when at a recent gig and we wanted to find a local bar. Office Mobile and Reader are an obvious must for a geek such as myself. I don’t use the YouTube app much (I still don’t think we really have the bandwidth even with 3G). Opera is a great install since it rocks compared to IE Mobile, and is also installed as the default browser.

Application Install/Uninstall

Installing apps is dead easy. You can download the CAB file either using the mobile browser, or plug it in to your PC and copy/paste it using Explorer. I tend to do the latter because finding apps is a hell of a lot quicker on the desktop rather than the phone due to crappy mobile net speeds.

Uninstall is just as easy, simply open up settings and touch remove, select the app from the list, then it goes bye-bye :)

Remember, It’s Still a Phone

image Let’s talk basic phone functions. My biggest concern when waiting for the delivery of it since the keypad for typing is obviously now part of the touch screen interface. Text messages and emails from my phone were rather comical for a few days getting used to it (like you do with any new phone) but I find no problems with using it. What is really cool with the touch screen keypad is that it can change. You can use a classic phone keypad design, QWERTY, compact QWERTY or just do away with it all and transcribe. This can be done at any time with a few easy-accessible key presses.

Contact management is great, and what’s more, you can easily download your own contact management apps if you are not happy with the default setup on the phone. I have found no reason to do this myself (to be fair, I just imported and not done much with it since). I am no entrepreneur [yet] so do not really have massive demands on contact management :)

Making phone calls is pretty much identical to most regular phones. “Picking “up the handset by using the button will bring up your recent calls list and a number keypad. While in a call, shortcut buttons are on screen for all common functions (mute, speaker, hang up etc). One nice addition is the “notes” button which opens up the Notes application for scribbling notes. Handy.

Text messaging is great, threads are made automagically made with contacts so you can keep track of message history and have the flow of the conversation readily available.

Email works just as you would expect. I have my Google Mail set up using IMAP and it works great, no problems to report there :)

imageAlthough not “classic phone” related - taking snaps is also good. I actually  tend to use my phone for snapping things such as notes and documents rather than actual “photos”. The Ignito has a 3.2MP camera which is GREAT for this sort of thing. I have happily been snapping things I would like to read and zooming in and flicking them around while commuting to work etc. The downside is that there is no flash, at all. Which means it can be pretty useless in the dark. However the light balancing in low light does seem to work pretty well. But TBH, IMHO a phone that takes pictures is NOT a camera. If you want great pictures, get a camera :)

Stability

I think this had to be my biggest concern. “Smart” phones tend to be doing a more and more, but not really being smart about how they handle errors etc. This is precisely the reason why I stopped using Nokia’s I personally found Symbian to be very unstable. Now while I am a Microsoft developer, I am NOT a “fanboy”. I think Windows Vista is great, but it’s had a lot of work done on it. Let’s be honest, pre-XP Windows were pretty damn poor when it came to stability. I also know Windows Mobile at it’s core is pretty old.

So, have I had crashes yet? You bet your ass I have! I don’t know if it was the software running, or the OS it is running on, I probably never will. I think the best thing the WinMo team can do is take the task manager out of process. When an app crashes and freezes up the screen I CANT GET TO THE TASK MANAGER TO SHUT IT DOWN! This to me is a pretty epic usability FAIL. In XP and Vista even if the Explorer process dies and I am looking at a blank screen, I can hit CTRL+SHIFT+ESC and get Task Manager up and start/kill process as required. It’s very rare I ever need to reboot my desktops. We need something similar in WinMo peeps! What’s the point of a task manager that you cant get to manage your tasks? Simple – when I hold the power button pop up with a menu, on said menu have the link to the task manager. Done. Please link to this post if you use my idea Microsoft :P

While I have had crashes which is not good, a restart has always fixed the problem and I have never lost data. So they have not driven me to smash it yet :D

Other Points

Here are some random snippets of other thoughts on the phone, or applications that come with it.

  • Adobe Reader LE. YOU FAIL.
    Once I have entered full screen view (which is a must when reading documents on a tiny screen) I have no way to get out of full screen! I have Google’d this and only found this and this. No solution as yet, is this going to be fixed? WHO TESTS THIS? One of the links is on the Adobe forums FFS!
  • WiFi can eat the battery. Turn it off when not in use.
  • The T9 dictionary seems buggy. For some reason, I can never right the word “hell”. It always try to tell me that I want to say “hello”. I have even tried adding “hell” as a word and it still doesn’t recognise it! This is the only word I really have issues with.
  • Dig around in the settings a lot. Configuration items are a little disorganised, and some items are not obvious. It took me a while to get my phone configured how I wanted it.

In Summation

There are some issues above, some minor, some may seem major. However, I find it a great phone, I have never been so connected before and I find it is helping me become more productive. This is important to me. It’s a nice looking phone that often gets reactions I like from other people. It looks good and shows people that they do not need an iPhone for a touch screen or the ability to “do more” with your phone. I would certainly recommend it to my friends.

* Sorry Sony – I tried to find a link to a simple overview page on your websites, but after 5 minutes I gave up. If you can provide a better link, please do. I found the link to the HTC Touch Diamond in about 5 seconds. You may want to take a leaf from their book ;)

Share:  digg it! del.icio.us Live Technorati Facebook