Wednesday, October 22, 2008
You still get to retake an exam if you fail it. But now there is an incentive for people that pass the exams. If you pass you get 25% off the price of the next exam that you take. If you take alot of exams like I do, this is a nice little benefit.
Have fun with your testing.
Sunday, October 12, 2008
LINQ is a nice new data technology that really provides alot of functionality. LINQ-to-SQL is a version of it that talks to a SQL Server database and will generate classes for you to use. I had a small problem that took a while to figure out that I wanted to share.
I had a class generated from the database called User. From there I had a derived class named ProtectedUser that has some things set in it automatically. When I created a ProtectedUser object when I went to save off the object to the database a null exception was thrown. This was confusing since there was nothing wrong with the object and nothing was null.
Looking around online I found this article that describes the problem:http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=310798
After changing my code to create a new User object and save that off instead things worked perfectly fine. This was hard to find and took weeks of working on it on and off to find it. I wanted to make sure to share this with others to save them the time.
Thursday, September 18, 2008
Good luck on the exam. Remember that beta exams do count toward certifications but you have to wait until they decide what questions to use and what ones to throw away. The last two beta exams that I have taken earlier this year took over 12 weeks to get results back, but I did pass both of them.
Thursday, August 14, 2008
- The downloads are iso file, so they will have to be burned to a dvd or you will have to use a program to mount the iso files as drives.
- After getting things to a dvd, I tried to install the servicepack and it quickly crashed. It died in the VC++ x86 installer. This is strange since I am running Vista Ultimate x64 on my system. So I tried many different things went with my favorite search engine to help. I was not able to find anything useful since the service pack had only been released hours ago.
- I finally read the actual log for the install that was failing and figured out that it was saying that it needed to be rebooted. I have been working on a Windows Service that used .NET 3.5 and that could have caused issues as well. So I uninstalled the app and service that I am working on (more on this in a later post) and restarted my laptop.
- I then restarted the installer and waited to see what happened. It got past the error I was seeing before. Yea!!!!
- Then I waited…. And waited…. I made sure my laptop was set to high performance and it still took about 2 hours to install. The laptop is an AMD TL-64 with 4G of ram so it should not be too slow.
- Everything installed fine and I was off to install the MSDN for sp1. Well it was 3am already so I went to bed and let it install overnight, so I do not know how long it takes to install this part.
Everything seems fine so far. I am looking at some .NET code protectors and will see if the ones I am thinking about work with sp1 or not.
Wednesday, August 6, 2008
This is exciting since there are alot of new features in SQL 2008. I will be going over this new version more and more as time goes on...
Sunday, July 13, 2008
Sample code for Silverlight RSS viewer
Here is a non-exhaustive list of things to check out in the source:
1 Silverlight 2 Beta 2 still has some cross-domain access issues, so instead of spending time figuring out why my HttpWebRequests weren't working from Silverlight, I built a WCF service to fetch the RSS XML for me.
2 On the topic of WCF, review the web.config in the ASP.NET project; make sure the binding attribute for the WCF RSS feed service is set to "basicHttpBinding".
3 In ServiceReferences.ClientConfig file in the Silverlight project, make sure you change the endpoint address's port for the WCF service to whatever your local ASP.NET development server's port is, otherwise you won't be able to run the sample locally.
4 If you want to put this code up on a live server, you may run into WCF activation issues. If you do, take a look at this blog post from Joe's Blog about using a custom ServiceHostFactory workaround.
That's all the gotchas I can think about at the second, I'll update this post with more if I remember anything else later. WCF can get a bit tricky now and then... WCF has a nasty way of trapping you inside a cave. That has a bear inside. That you can't see.
Have fun with the source; you can do a lot of cool stuff in Silverlight 2 Beta 2. Throw a DataTemplate on the ListBox and make your data look spectacular (and give yourself extra points if you recognize the Mitch Hedberg reference I just made).
Friday, July 11, 2008
This powerful little tool can also run any SQL command, LINQ expression, or even a C#/VB.NET code snippet. This makes it a great little tool to have on your desktop. It was written by the authors of C# 3.0 in a Nutshell. It includes 200 samples from the book. This is a great addition to this little app.
Now all that glitters is not gold.... One of the things that Management Studio can do is to allow you to add new rows to tables using the datagrid that shows the data in the table. You can also delete rows using this. Linqpad does not allow this since it is only a web output.
Overall Linqpad is a great tool if you are using LINQ and/org .NET 3.5 and databases. Get it, play with it, see what it can do and you will like it too.
Monday, June 30, 2008
From Trika's blog, you can see that this certification is not for the light hearted. It costs 18,000 for 3 weeks of training and 3 exams and a lab exam. It is hard for many people to be able to go to this training in Redmond for 3 weeks straight. But this is the only the first time it is offered. I would love to be able to do this, but 3 weeks is a LONG time to be away from work and family.
I was really looking forward to this certification, but it might be more than I am willing to do right now. Well, on to the next set of certifications that I am studying for, MCPD and a few MCTSs.
You can register to obtain your promotional code for a free E-Learning Course by navigating to this webpage. One prerequisite is that you have a Windows Live ID. If you do not have one, then you can learn how to get one here. Once, you have registered using your Windows Live ID, you will receive a promotional code. Using this code, you can take your pick of one of many applicable E-Learning Courses and sign up for it for free! I believe that the subscription to this course will last you one whole year. So, it's definitely worth getting the code even if you don't have the time to spare at the present moment. Whats more is that... It's free!
If you have no idea what I mean by an E-Learning Course, you can read more about it here or, take a tour and sit through a sample course here (requires Silverlight). I sat through one and found it to be quite well rounded.
One more thing to be aware of is that the code will expire 30 days after you register for it. So, don't wait too long to pick a course if y ou plan on it. Since I plan on appearing for the 70-502 Cert in the not-so-distant future, I will registering for a WPF E-Learning Course. So, I'm off to do that and grab a bite to eat at the same time.
Sunday, June 29, 2008
The 70-536 exam is a gateway exam of sorts for most .NET Developers looking to earn an MCTS or MCPD certification for Windows, Web or Enterprise application development. Currently, it is a prerequisite for 3 .Net 2.0 Certs and 6 newly added .NET 3.5 Certs. I am pursuing an MCTS Certification for WPF, which is why this exam was a logical starting point.
The Exam tests a developer's skills as related to working with the .NET Framework in the following 7 areas.
- Developing applications that use system types and collections (15 percent)
- Implementing service processes, threading, and application domains in a .NET Framework application (11 percent)
- Embedding configuration, diagnostic, management, and installation features into a .NET Framework application (14 percent)
- Implementing serialization and input/output functionality in a .NET Framework application (18 percent)
- Improving the security of .NET Framework applications by using the .NET Framework security features (20 percent)
- Implementing interoperability, reflection, and mailing functionality in a .NET Framework application (11 percent)
- Implementing globalization, drawing, and text manipulation functionality in a .NET Framework application (11 percent)
The Microsoft Learning Website makes a few suggestions for resources that one could use when preparing for this exam. You can check them out here.
I used the MS Press Book - MCTS Self-Paced Training Kit (Exam 70-536): Microsoft .NET Framework 2.0 - Application Development Foundation.
The book does a good job of covering the 7 skills sets you will be quizzed on. It comes with a companion CD that you can use to install practice tests on your machine at home. These practice tests are very helpful if this is your first certification exam as they give you a good feel for how the questions on the final exam will look like.
The CD also contains code samples that you can use to complete the Labs detailed in the book. If you do not own a copy of Visual Studio .NET or 2005, fear not... the book also comes with its very own copy of Visual Studio 2005 Standard Edition, licensed to you for 6 months from the time you install it.
Another interesting resource that I found was this Live Meeting from Microsoft. It is titled "Cram for Exams! 70-536" and thats exactly what it does. In one hour, it gives you a brief overview of the exam and the various sections as I mentioned above. The Speaker also works out some sample questions and has some good tips for the exam itself.
Code, Code and then some...
I cannot stress enough the importance of exploring the .NET Framework yourself by writing your own little test applications. Nothing sticks in your head as a line of code that you wrote. A majority of questions on the test will be code-based and there's a good chance that you will see some classes or structures for the first time at the Testing Center if you haven't been coding regularly. So again, take the time to understand what the Framework has to offer by writing a little code yourself.
Sunday, June 15, 2008
I will post more as I play with this new version. There is a go-live license so people can start commercializing this now.
Tuesday, May 20, 2008
.NET 2.0 Implementation
.NET 1.1 and 2.0 Implementation
Friday, May 16, 2008
With Silverlight 2.0 beta1, the app compiles into an .xap file that can be uploaded to the Streaming service I went over this in a previous post. To test this out I made a small sample of a TicTacToe game. I got lazy and made it use colors instead of graphics for each square. I also just had the computer pick a random empty square to make things simpler. One thing that I wanted to test out was the isolated storage so that you could keep track of your scores locally on the machine since this is a web-based app. It was pretty easy to setup IsolatedStorage to save this data using a stream writer. IsolatedStorage is very limted, but for this example I am only storing 3 ints, so I was not worried.
One interesting thing is that a Technical Evangelist from Microsoft (who will remain nameless) said that you could not store data locally using a Silverlight application. During his MSDN Roadshow, I pointed out that actually you could do that and he was abit surprised. Of course then he stated that Microsoft might just remove that ability plus it is very limited storage, so to be careful with it.
People always ask for source code for samples like this, so here is the source. Now, I know this little game is not that exciting, but it's Silverlight, with local storage, and using the Silverlight Streaming site, so that is what is cool.
Tuesday, May 13, 2008
It This article on The Register give a clue to the latest issues with people that play the beta software game. So having the beta version of Silverlight and the beta version of .NET 3.5 will make it so that you could have an error installing the SP1 beta or make it where you cannot do your Silverlight development. Scott Guthrie says that they will be putting out new Silverlight tools in the next few weeks to help with this.
I limit the amount of beta software that I use. I am playing around with Silverlight beta 2.0 and will not be putting the beta of the service pack on my machines. Keep reading this blog... (and Scott's) for more info on this issue.
Tuesday, May 6, 2008
Friday, May 2, 2008
Sunday, April 13, 2008
As I mentioned in my last post, I am working on a small project that I plan on releasing to the public in 2-3 months. I originally planned on deploying this project using ClickOnce, but that turned out to have a large set of challenges and is a topic for another post. I then changed my deployment strategy to make use of Visual Studio 2008's nice little deployment project builder. While even more challenging than ClickOnce, this strategy was far more flexible, so I've stuck with it. But I quickly found that Windows Installer is one serious beast.
I'll be the first to admit that I knew very little about application deployment before I started playing around with Windows Installer. I had used an older version of InstallShield back when I was a co-op at the company I'm currently employed at, but my experience with that was pretty limited.
But anyway - enough background. This post is entirely about one challenge with Windows Installer - removing files in your application's install directory when your app is uninstalled. I figured this would be pretty easy - and it *sort of* is, but just because something in the end is easy doesn't mean that the road to the end is easy as well. There is no way to configure this behavior from within VS2008's deployment project editor, so what was I to do?
Here is how I ended up solving the problem. First, install Orca. Orca is a small utility that Microsoft distributes with each platform SDK, and the setup can be found under the following path:
(typically Program Files)\Microsoft SDKs\Windows\v6.0A\bin\Orca.msi
Now, build your deployment solution (if you already haven't) from within VS2008. Run Orca. Open your built .msi file. On the left side of the Orca interface you'll see a list view labeled "Tables". Scroll down to 'Remove File'. Click on that, and on the right side of the interface, you'll see a dataview with the following column headers:
FileKey, Component, FileName, DirProperty, InstallMode
Your project most likely already has one entry. We'll use that entry as a mock-up for our file removal entries. This part is tricky - the MSDN documentation on RemoveFile is not particularly clear on how to do this, so I'll show you what I ended up doing.
To remove files in your application's directory, add an entry to the table with a unique name in the FileKey column. I called mine 'RemoveAppFiles'. For the Component column, copy and paste the original entry in the RemoveFile table's Component, since you can be pretty sure that component will be removed on uninstall. The trick to remember here is that an entry in the RemoveFile table will only be executed when the Component ID you use in the Component column is installed or uninstalled (more on this in the next paragraph).
For the FileName column, add a wildcard for the type of files you want removed - say, *.dll. The MSND documentation says any wildcard will work, but in practice, I've found that *.* or * do nothing, so you may end up needing several entries in the RemoveFile table for each file type you want removed. Under the DirProperty column, enter "TARGETDIR" if the files are in the application's directory - most people say to use "INSTALLDIR", but I've found that doesn't work either. And finally, for the InstallMode column, you can enter 3 possible numbers:
1 indicates that Windows Installer should remove this entry's files on component install.
2 indicates that Windows Installer should remove this entry's files on component uninstall.
3 indicates that Windows Installer should do both #1 and #2.
And one final note - if you want to remove the application directory, add yet another entry, but leave the FileName column empty. That tells Windows Installer to delete the directory.
So while this post didn't have anything to do with .NET, this was something that took me awhile to figure out, and if it helps anyone else out there, I'm glad. Good luck!
Saturday, April 12, 2008
Moving on - I'm sure everyone has heard a great deal of complaints regarding Windows Vista, so I thought I'd post an observation I made recently regarding memory usage of .NET applications. As you all know, managed applications tend to take up a bit more memory on average than unmanaged, and while the garbage collector does it's job admirably, a smaller memory footprint is always desirable.
So out of curiosity, I ran a small WPF application I've been developing for the past few months on both Windows XP SP2 and Windows Vista SP1. I wasn't all that surprised to see that immediately after startup on XP SP2, my application was taking up ~28MB. Sounded reasonable for what I was doing.
What I was surprised by was the memory usage I saw when running it under Vista SP1 - it was under half as large - only ~13MB. Remember, this is the exact same code as under XP. As far as I know, other than the obvious interaction between WPF and Vista's DWM, WPF in .NET 3.5 is the 'same' WPF under both Vista and XP.
While we've known all along that Vista was meant to be the preferred platform for WPF applications, it was nice to see Vista running my application better than XP can run it.
Wednesday, April 9, 2008
So we turned to the programmer's best friend - Google. Searching for this we found a few cases that were similar.
The only option that seemed to make sense was that there was an issue with the installer project. People have seen this with installer projects that were built in VS2005 and then upgraded to VS2008. One person that had success fixing this rebuilt the installer project using VS2008. The time was taken to rebuild the installer project and it still had problems.
I kept digging into this issue and finally found something to try. All of the other Linq to SQL projects that worked in the setup project were generated using the Linq to SQL template in CodeSmith. This one was just a standard Linq to SQL just generated from the VS2008 IDE. So I converted this project to be generated from the template and things worked. Right after I did this I found this...
It turns out that you can edit the project file for the Linq to SQL and get the setup project to build correctly. This will work until you go back into the designer. Well with new things there are bound to be hiccups. At least if I can share this with others it might be faster to solve their problem.
Friday, April 4, 2008
Tuesday, April 1, 2008
Beta exams are open to anyone that wants to pay the $125 fee. Microsoft does also give out free codes to people so they do not have to pay. Typically the free codes are given to people that have certifications already since they have "proven" themselves to have knowledge in an area. There are also times when Microsoft will email or send out codes to people that have subscribed to the certification email lists.
Ok, on to the questions...
One thing to remember is that there are alot of questions. There are actually more questions on the beta version of an exam then the normal version. This is because the nature of beta exams is to test out the various questions. This means that there are questions that are going to be thrown out. The challenge is that you never know which questions are getting thrown out. You could get all of the questions right that are thrown out, but you could still could fail the beta. The time for the exam is also longer. The last one that I took was scheduled for 4 hours. It did not take me that long to answer the questions, but there is also time to review and comment on the questions as well.
The number for the exam is 71-xxx instead of the normal exam numbers of 70-xxx. Not all testing facilities actually give beta exams. Check your local testing site to see what exams are available. Another thing is that the betas are time limited. There is usually about a month of time to take the exam.
Another big difference with beta exams is that you will not get your results back for 8-10 weeks instead of right away. This is tough when you are used to getting immediate feedback and results. It's a waiting game.
Beta exams are a mixed bag. You don't know exactly what is going to be tested, you will not get the results immediately, and you will spend a long time taking this exam. Good luck on taking beta exams if you want to try them out. I have both passed and failed some. They are tough, but rewarding.
Enough of my past. Right now I have six Microsoft Certifications. This are both .NET and non-.NET based. Here is the list of the certifications that I have earned in the order that I earned them.
- MCSD (VC6)
- MCTS: SQL Server 2005
- MCSD (.NET)
- MCITP: Database Developer
Getting an MCP is pretty easy since you get it automatically when you pass a single exam. Other certifications that I have are not offered anymore. The older VC6 and .NET 1.1 based exams are no longer offered. They have been retired in favor of the newer .NET 2.0 based exams. And Microsoft is now testing newer .NET 3.5 exams (more on this in a later post).
One of the best things that I suggest when getting ready for an exam is to get a couple training books for the exam that you are about to take. I have found that a single book usually does not go over everything that is needed for the exams. That is why I typically use 2 books. Then USE the technology. Make small sample programs, make installers, test things, catch exceptions, USE the technology. There is no good shortcut to this. Microsoft wants to see how well you know the information in the test. Using it helps alot. Did I mention that you should USE the technology?
Now I also have a few suggestions while you take the exams. There are a few formats that the test are in. The first is a typical multiple choice with 4-5 questions and you have to pick one. The second type is a multiple choice where you have to pick 2 or 3 answers. Another type of question is a drag-and-drop type where you organize the answers in the order that you would use them. One last type of question that I have encountered is the case study. This has a large case study to read and then a few questions based on that case study.
For the simple question with 1 or more answers to pick you can usually pull out a few answers that are wrong. For many of these questions you will see that out of the 4 answers they are all similar. Two will have one part of the answer the same and the other answers will have a different answer for them. Then the second part of the answers will be 2 or more other options that are split up a different way. Here is an example of what I mean.
The item is red, and a fruit.
The item is red and a vegetable.
The item is orange and a fruit.
The item is green and a vegetable.
Each of these answers might be valid for something, but if we are looking for an apple, or a bell pepper, then the answer should be obvious. This is just an example on how some answers can be organized. There are no fruit and/or vegetable questions on the exams ;-)
For the questions where you have to organize things in a certain order you might not have to use all of the possible answers. Make sure to read the question to make sure that you know what is being asked. If asked how to create a blog post, some of the possible answers for this type of question could be like this.
Spell-check your post
Pick a topic
Publish the post
Log onto your blog
Write the post
Submit your post to Google to get indexed
For this question, submitting the post to Google to get indexed, might be a good thing, but it is not needed for creating a blog post.
One last tip for the case study questions to round out this long post. The case study is divided into multiple tabs and one tab that includes all of the information. Then for each case study you can get from 1 to 5 questions for the case study. When you finish the questions for the case study you cannot go back to any previous case study. When you are finished with a case study you are finished with it. First and foremost, skip reading the case study. Read the questions first and write down what the questions are on the paper/erase board that they give you. Then go back and read the case study (the tab with everything) with the questions in front of you. This way you can see the question and the info at the same time. This makes doing case study questions alot easier.
Ok, I lied. I have a couple more tips. As you are going, you have the chance to mark the questions for review. Ones that are hard for you, mark them to go over it later. I also tend to write down on the supplied paper, what the question is about for each question. So if you know that question 10 was about apples and then later on question 23 you get another question you can always go back to question 10 to see if it helps. It does sometimes. I have also gone back over every question before and reviewed what I thought was the right answer. If you have time, I suggest this.
Take your time, relax, and did I suggest to make sure that you USE the technology?
Sunday, March 30, 2008
Wednesday, March 19, 2008
Tuesday, March 11, 2008
First when you look at the ClientBin folder there was my testpage.html file as well as a bunch of .dll files and one that I did not recongnize, a .xap file. Since I use Total Commander I used thefile viewing features to see that this new file was just a zip file of the .dll files and the .xaml manifest. I then looked at the test page and it refers to the .xap file when it creates the silverlight object. So I copied over just the test page and the .xap file to my server.
The test app that ran so well for me did not work at all. Nothing loaded, nothing worked. The source showed that the object and everything looked like it should work. To see what I saw you can see it here:
I remembered that for Silverlight 1.0 to get it to work you had to set the MIME code on your server. You had to setup xaml to be an application so that it ran correctly. Of course I tried this and it still did not work. But from there I thought that since Silverlight 2 beta 1 automatically zips into a .xap file, that you might need to set .xap as an application.
MIME type "application/xap"
After getting this setup for one of my servers, the app came up and worked just fine.
This seems to work pretty well and will be a good start for future tests with Silverlight 2. There are alot of things that I want to do with this including games, but that is all for another post.
Monday, March 10, 2008