Search This Blog
June 29, 2008
VS 2008 Shell, Visual Studio Tools for Applications and SQL Native Client are Redists
1. Install SQL Server 2008 RC0 (full install)
2. Uninstall SQL Server 2008 RC0 (full uninstall)
After the full uninstall of RC0, I can still see VS 2008 Shell, Visual Studio Tools for Applications and SQL Native Client on Add/Remove Programs. Those components are Redists. Therefore, after the uninstall, other software still need them.
It is so interesting to know this scenario.
June 25, 2008
SQL Server 2005 can’t be upgraded to SQL Server 2008 RC0 at this moment
It is impossible for you to upgrade from SQL server 2005 Enterprise to SQL Server 2008 RC0 Enterprise Evaluation. We need to wait until SQL Server 2008 RTM Enterprise is released.
The only thing you can do is install previous SQL Server 2008 CTP first and then upgrade it to SQL Server 2008 RC0. The upgrade will pass.
June 15, 2008
Need to install VSTS 2008 SP1 if your web test and proxy setting fails in VSTS 2008
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3486137&SiteID=1
I try to create a web test using proxy, and the following codes are working in VSTS 2005, but it is not working in VSTS 2008. I got the following error:
Request failed: No connection could be made because the target machine actively refused it IP Address:80
During 1 day search and I find one clean machine to repro, I find the problem .
VSTS 2008 RTM has the bug related to webtest and proxy. That's why it failed in VSTS 2008 RTM , but passed in VSTS 2005.
Because VSTS 2008 SP1 Beta is still in beta version, usually people don't install it. If they don't install it, it means this web test and proxy will not work forever.
After I installed it and ran the test again, the web test passed.
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using Microsoft.VisualStudio.TestTools.WebTesting;
public class WebTest3Coded : WebTest
{
public WebTest3Coded()
{
this.PreAuthenticate = false;
NetworkCredential credential;
credential = (NetworkCredential)CredentialCache.DefaultCredentials;
WebProxy proxy = new WebProxy("198.152.203.10", 80);
proxy.Credentials = credential;
this.WebProxy = proxy;
}
public override IEnumerator
{
WebTestRequest request1 = new WebTestRequest("http://www.microsoft.com/");
yield return request1;
}
}
April 9, 2008
How to Merge Two Arrays Using C#?
http://forums.asp.net/t/1229678.aspx
This question is interesting. Therefore, I spent some time writing source codes using C# as follows. If you want to merge 2 arrays and meet your need, you may try to extend the function.
static public void MergeMultiDimensionArray()
{
int i, j,k,m,p,q;
int[,] array1 = { { 1, 2, 3 }, { 4, 5, 6 } };
int[,] array2 = { { 7, 8, 9 }, { 10, 11, 12 } };
int[,] mergeArray = new int[array1.GetLength(0) + array2.GetLength(0), array2.GetLength(1)];
for (i = 0; i < array1.GetLength(0); i++)
{
for (j = 0; j < array1.GetLength(1); j++)
{
mergeArray[i,j] = array1[i,j];
}
}
for (k = 0; k < array2.GetLength(0); k++)
{
for (m = 0;m< array2.GetLength(1); m++)
{
mergeArray[i, m] = array2[k, m];
}
i++;
}
for (p = 0; p < mergeArray.GetLength(0); p++)
{
for (q = 0; q < mergeArray.GetLength(1); q++)
{
Console.WriteLine(mergeArray[p, q]);
}
}
}
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.
You need to download msvcp50.DLL and put it in c:\windows\system32 folder.
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
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
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
1. Service contract
[ServiceContract]
public interface IMyContract { ...}
2. Operation contracts
[OperationContract]
void SomeOperation();
[DataContract]
public class SomeType{ [DataMember] public int ID;}
[MessageContract]
public class MyRequest {
[MessageHeader] public string field1;
[MessageBody] public string field2;
}
[OperationContract]
[FaultContract(typeof(DivideByZeroException))]
void SomeMethod();
throw new FaultException<DivideByZeroException>(
[ServiceContract]
public interface IOrderService
{
[OperationContract]
void CreateOrder(int orderNumber);
[OperationContract]
void AddItemToOrder(int orderNumber, Item itm);
[OperationContract]
Order GetOrderDetails(int orderNumber);
}
public class OrderService : IOrderService
{
void CreateOrder(int orderNumber)
{
// implementation details
}
void AddItemToOrder(int orderNumber, Item itm)
{
// implementation details
}
Order GetOrderDetails(int orderNumber)
{
// implementation details
}
}
[DataContract]
public class Order
{
[DataMember]
public int OrderNumber;
[DataMember]
public String ClientName;
...
}
Do you think it is a good interview question ?
