.NET Error and Solution
by Douglas McGregor on Sep.04, 2010, under Geeky Stuff
While coding, you might come accross the following error:
‘LoginView1′ is not declared. It may be inaccessible due to its protection level
The solution is to use the FindControl method. An example is below:
Dim lblMessage As Label = CType(LoginView1.FindControl("lblMessage"), Label)
Dim tbFirstName As TextBox = CType(LoginView1.FindControl("tbFirstName"), TextBox)
Dim tbLastName As TextBox = CType(LoginView1.FindControl("tbLastName"), TextBox)
Dim tbEmail As TextBox = CType(LoginView1.FindControl("tbEmail"), TextBox)
Dim tbUsername As TextBox = CType(LoginView1.FindControl("tbUsername"), TextBox)
Dim tbPassword As TextBox = CTYpe(LoginView1.FindControl("tbPassword"), TextBox)
Note to Self: How to Solve “Cannot load type” error in ASP.NET
by Douglas McGregor on Aug.04, 2010, under Geeky Stuff
This error commonly occurs when you try to install an ASP.NET application with DLL files in the bin folder.
These files do not have to be in the root (wwwroot) folder. Say I have a web application on my localhost website that has the following structure:
wwwroot (root IIS folder)
website
forum
The website folder is the root of the application you are testing locally. The solution to solving this error is to convert the forum folder to an application in Internet Information Services (IIS).
Hope that helped someone out there!
Frustration with the .NET Compiler
by Douglas McGregor on Jun.11, 2010, under Geeky Stuff
One of my ongoing projects is to connect to Facebook using Visual Basic .NET.
Getting back to it now after some time, I’ve encountered the following very annoying problem:
Type ‘Components.FacebookService’ is not defined
All the DLL’s are in the Bin folder and all the Namespaces are imported on the aspx page. At first, it looked like it was a problem with the version of the Facebook Developer Toolkit, however it worked after changing the version of the Developer Toolkit to 2.1, it worked, but when I refreshed the browser again, it went back to its usual tricks. To me this very much looks like a problem with the .NET compiler, because I noticed when I refreshed the browser there was a bit of my code missing that was definatley in the saved web page document in Dreamweaver.
I really can’t think why this should be the case, since my .NET setup is the same as any other production server setup – IIS 7.5 and .NET Framework 4. Windows 7 is up to date with the latest Windows Updates. If anyone has found a solution to this problem I’d really appreciate to hear from you.
Thanks
Douglas
Windows 7 – The User Profile Service failed the logon
by Douglas McGregor on Jun.11, 2010, under Uncategorized
This is an error that had me very worried.
It seems to appear randomly after using Windows Update. After doing some Googling, there doesn’t seem to be much on this error apart from the most common solution seems to be to do a system restore. What I’ve found is that the problem looks like it’s related to McAfee – it threw an error message saying “Real time scanning has been disabled”.
The problem seems to be that the main user profile is set as a backup profile. The solution seems to be to go into the Control Panel, go to User Accounts, click on “Configure advanced user profile properties”, look for the profile where the status is set to “backup”, and hit the delete button. It’s very inconvenient, since obviously it would be ideal to make sure all your files are backed up, especially for users who encounter this error for the first time and who know nothing about computers.
Windows Updates and McAfee updates are essential for security purposes, so I don’t want to just stop Windows Updates until Microsoft provide a fix for this, which I hope they do. It looks like there’ll be a Service Pack 1 released for Windows 7 over the next few months so it will be interesting to see what improvements that will bring.
Thankfully I have the only essential file I’m working on right now backed up on my memory stick, so it’s not that bad. Hope this has helped someone.
My Experiences with Flight Simulator 2004
by Douglas McGregor on May.22, 2010, under Planes
Or should that be My Experiences “so far” with Flight Simulator 2004.
Having now got a beautiful, new, powerful laptop, I’ve got right into Flight Simulator. I can do things on this new laptop that I would never have dreamed of doing on my old one. I’ve discovered the secrets of how to fly a plane (on Flight Simulator anyway) as I went. My landings are vastly improving – when I first started I kept on crash landing, and was very frustrated with myself, so it was a plesant surprise when I discovered the secret. I won’t say anything about the secrets on here, since I strongly believe in learning for yourself and not being lazy.
The addons make Flight Simulator all the more realistic, and there’s lots of addons out there. Unfortunately you have to pay for all the best ones, however the software is often available for download as a demo or shareware. The amount of aircraft you can download is incredible too. I prefer flying the Boeing 737 jets, since I find them easiest to keep under control. There’s all sorts of passenger jets available for free download – from British Airways and Aer Lingus to Icelandair and Air 2000. I haven’t looked at the military planes yet, but needless to say, there’s hundreds. I also found great Boing 757′s with very realistic sound, like the screeching engines of concorde, and they also have cabin announcements which are fun, and the virtual cockpits are excellent.
Keeping with the 757′s, my only woe is with Edinburgh Airport. This would probably be even worse with the default scenery, but I downloaded xtreme scenery from the UK 2000 web page. I’d like to take a moment here to say that the UK 2000 scenery is really impressive. Anyway, Flight Simulator has taught me a thing or two about flying, and one of the things I’ve learned that the runway in use depends on the weather. If it’s cloudy, in Edinburgh airport it’s runway 24 that’s used, and if it’s fair weather it’s runway 6 that’s used. However, I noticed that Air Traffic Control in Edinburgh Airport told me to taxi to runway 30, which is the smallest runway I’ve ever seen. I don’t know what Air Traffic Control are playing at telling a Boeing 737 to take off from that. No chance. It’s not long enough to take off from.
A good thing now about Flight Simulator 2004 is the AI traffic. This makes it all the more realistic. There’s literally lots of AI flight plans available for download around the net. World of AI is probably the best, although I had a problem with Flight Simulator when I was trying to uninstall it and when I reinstalled it and tried to install the AI traffic in it again it said it was already there, but there was no sign of the AI traffic on the simulator. This won’t be a big issue, since I’m upgrading to Flight Simulator X soon, but I just don’t understand why this is happening. You can also program your own AI traffic, which I now understand how to do, but it takes a lot of time, and if like me, you just want to fly, it’s faster to install AI flight plans.
What I really need to practice is landing planes when the visibility is poor. Maybe an idea would be to practice on a small jet first, so that I don’t get too frustrated with myself.
