Search This Blog

March 26, 2008

Successful upgrade from Windows Vista to Windows XP

I bought a new Gateway PC with Windows Vista Home Premium Version last September. During this period, I have installed lots of software such as Adobe products, Visual Studio .NET 2005, SQL Server 2005, Office 2007, Google and yahoo products. When I ran the program on Windows Vista, the response time was so slow and made my PC down. I needed to use task manager to end the program. If it didn’t work, I needed to reboot my PC. Finally, I made a decision to downgrade from Windows Vista to Windows XP.


Before I did the downgrade, I found that Gateway didn’t give me all drivers inside the CD. I went to http://www.gateway.com/ and found it was not helpful. I called their technical support and that woman said,” If you want to do the downgrade, you will break your warranty. We don’t do it over the phone. ” I was not satisfied with her answer.


Heaven helps those who help themselves. I wanted to give it a try. After I installed Windows XP with SP2, Office 2007 and lots of software, I found that some drivers were missing. Finally I found ccleaner.com has the small program that can check my PC. It was really helpful because it checked how many drivers I needed in my PC and made me download.


After I downloaded them and installed them, I still found l needed one more audio driver. Without it, I couldn’t play MP3. Finally I found the driver, High Definition Audio, in realtek.com. After I installed it, I could play MP3.


Now when I launch so many programs on Windows XP machine ,the speed is really faster than Vista’s. I want to say: I successfully “upgrade” from Windows Vista to Windows XP.

March 20, 2008

The error of Web Application Stress Tool : MSVCP50.dll was not found

If you install Web Application Stress Tool on Windows Vista, you might have the following error.

The application has failed to start because MSVCP50.dll was not found. Re-installing the application may fix the problem.

You need to download msvcp50.DLL and put it in c:\windows\system32 folder.

After that, just run setup.exe. It should work.

March 17, 2008

Microsoft provides an excellent website of virtual labs

We know that Microsoft has so many products. How can you get familiar with all of them very well unless you are a super man?

If your work can let you get familiar with all Microsoft products, your company must be very excellent. Per the job descriptions posted on Dice, CareerBuilder or Monster, you probably feel frustrated because some companies need more experienced candidates with different technical skills in different products. I think it is hard for them to find those people.

Everything starts from zero. If you don’t know one of Microsoft products now, you can just go to the following website.

http://msdn2.microsoft.com/en-us/virtuallabs/default.aspx

You can register online, download the individual lab manual and make some practice. You will improve your skills gradually.

March 16, 2008

I like Google Reader

Everyone knows that blogs are very popular now. If you want to see your friends’ blogs, but these are in different websites, how can you access them easily? Do you want to open your browser and go to the individual website? It is not smart to do so.

Google Reader provides a good way for bloggers to read people’s blogs easily. You just login to www.google.com/reader using your username and password. You can add subscription by typing the URL of friend’s blog individually. Next time you can read them easily. I like Google Reader.

March 13, 2008

Google provides the excellent search function of free ebooks

If I find some IT books such as Visual Studio.NET 2008, C# 3.0, WPF, WCF, or SQL Server are excellent in Barnes and Nobles, do you think I will buy them soon? The answer is no.

I will go back to my apartment, open my notebook, go to Google main page and enter the name of the book title. I will see lots of websites provide free ebooks and I can download them easily. Why should I buy these expensive books? Google really provides the excellent search function of free ebooks.

February 13, 2008

WCF Contracts

Today I was surfing Microsoft E-Learning, I learned WCF has 5 contracts as follows:

1. Service contract

A service contract defines the operations that a service supports, and maps to a portType in Web Service Description Language (WSDL). Service contracts are implemented as .NET Framework interfaces that are annotated with the ServiceContract attribute.

[ServiceContract]
public interface IMyContract { ...}

2. Operation contracts

Operation contracts define the individual operations that a service supports and map to operations in WSDL. Operations are defined by adding methods to a Service Contract interface that is annotated with the OperationContract attribute.

[OperationContract]
void SomeOperation();

3. Data contracts
Data contracts define how complex types are serialized when they are used in WCF service operations. They are defined by applying the DataContract and DataMember attributes to classes.

[DataContract]
public class SomeType{ [DataMember] public int ID;}

4. Message contracts
Message contracts describe the entire SOAP message format. They can use data contracts and serializable types to emit schema for complex types, and they also make it possible to control the SOAP message headers and body explicitly, by using a single type. Message contracts provide a simple method to add custom SOAP headers to incoming and outgoing messages.

[MessageContract]
public class MyRequest {
[MessageHeader] public string field1;
[MessageBody] public string field2;
}

5. FaultContract
WCF service reports errors by using Fault objects. Fault contracts document the errors that WCF code is likely to produce, and WCF maps Fault objects to SOAP faults. Note that the type specified in the FaultContract does not have to be an exception, although it often will be.

[OperationContract]
[FaultContract(typeof(DivideByZeroException))]
void SomeMethod();

A Fault is generated by throwing a FaultException:

throw new FaultException<DivideByZeroException>(

The Process of Implementing a Service Contract
The following code example shows how to define a WCF service contract by using a .NET Framework interface. The ServiceContract attribute is applied to the interface, and each of the methods defined in the interface has the OperationContract attribute applied to it. Note that any methods that are not marked with OperationContract are not visible to clients.

[ServiceContract]
public interface IOrderService
{
[OperationContract]
void CreateOrder(int orderNumber);

[OperationContract]
void AddItemToOrder(int orderNumber, Item itm);

[OperationContract]
Order GetOrderDetails(int orderNumber);
}

The following code example shows how to implement a WCF service contract by using a .NET Framework class that implements a service contract interface. Note that the implementing class does not require any special attributes.

public class OrderService : IOrderService
{
void CreateOrder(int orderNumber)
{
// implementation details
}

void AddItemToOrder(int orderNumber, Item itm)
{
// implementation details
}

Order GetOrderDetails(int orderNumber)
{
// implementation details
}
}

The following code example shows how to implement a WCF data contract. The DataContract attribute is used to define a data contract class and DataMember attributes define the class members that take part in the contract.

[DataContract]
public class Order
{
[DataMember]
public int OrderNumber;
[DataMember]
public String ClientName;
...
}

Do you think it is a good interview question ?

February 5, 2008

Installing SQL Server 2008 BIDS (CTP6)

If you have SQL server 2005 BIDS in your PC, and then if you install SQL Server 2008 CTP 6, the install will skip the installation of SQL Server 2008 BIDS.

If you don’t have SQL Server 2005 BIDS in your PC, and then if you install SQL Server 2008 CTP 6, SQL Server 2008 BIDS will be installed in your PC.

If you have SQL Server 2008 BIDS in your PC, and then you uninstall SQL Server 2008 BIDS, installing SQL server 2005 BIDS must work.

Either SQL Server 2008 BIDS or SQL server 2005 BIDS is allowed when you do the side by side install of SQL Server 2008 and SQL server 2005.

Do you think BIDS is interesting?

January 16, 2008

Before upgrading from Windows XP / Win2k3 to Windows Vista/ Windows Server 2008, we need to uninstall Windows Powershell first

Today I find one interesting issue. If you have Windows Powershell install on Windows XP / Windows Server 2003 and if you want to upgrade to Windows Vista / Windows Server 2008, the upgrade wizard will tell you that you need to uninstall Windows Powershell first. Where can you uninstall Windows Powershell?

















There are 2 ways to do so. One is to go to Add or Remove Programs, select “show updates”, and you can uninstall it.















The other one is to go to C:\WINDOWS\$NtUninstallKB926139$\spuninst, double click spuninst.exe, and then you can uninstall it. You can also use the command line to uninstall Windows Powershell as follows:
C:\WINDOWS\$NtUninstallKB926139$\spuninst\ spuninst.exe /q

After the upgrade, Windows Powershell is not installed on windows Vista / Windows Server 2008. If you still need it, you need to install it again.
















For Windows Vista, you need to download Windows Powershell Vista version in Microsoft website.

For Windows Server 2008, Windows Powershell is part of the windows components. You can see use the following command line to install it.

ServerManagerCmd.exe /install PowerShell

Do you think Windows Powershell is an interesting issue?

Using command lines to turn off/on UAC on Windows Vista

I know lots of people hate UAC and want to turn it off on Windows Vista. You can just write the command line to turn off/on UAC and reboot your PC. How to do it?

Turn off UAC:

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

Turn on UAC:

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

Reboot: shutdown –r

After you run UAC and reboot command lines, your PC will cause reboot automatically. Everything will be fine. Is that easy for you?

January 13, 2008

3 failed login attempts block your account—a good idea?

If you go to some famous online websites, you need to login to your account using your username and password. But if you use the wrong password to login 3 times, your account will be blocked. You need to call the customer service representative and get the new password to login again. Is it a good idea to set the policy of 3 failed login attempts?

Just imagine this situation. If a hacker is very familiar with using the tool to try different username and password during 2 hours in ABC Company, do you think it is easy for him to block other people’s accounts? Do you think the account owners will blame ABC Company?