Search This Blog
November 21, 2008
VSTS 2008 Web Test and Windows Authentication Login Popup
The server XXX.XXX.com at XXX.XXX.com requires a username and password.
After you enter your username and password, the web test moves on and finally makes your test fail. When you see the test result, you find one of the requests is: You are not authorized to view this page.
After you generate the codes and find that VSTS 2008 doesn’t record the username and password you just entered. How can you handle this situation?
You need to add the following source codes.
this.UserName = "abc\raylin";
this.Password = “12345”;
After you add them and if the test case still fails, please check if you install VSTS 2008 SP1. You might also need to add the proxy in your source codes too. You will make your test case pass.
November 18, 2008
VSTS 2008 Web test-The remote name could not be resolved
When I have this issue, I always think it is the proxy issue. When I add the following source code, it works all the time.
this.Proxy = “XXX.XXX.com";
October 26, 2008
VSTS 2008 web test recorder bar does not show up
Today I used my personal PC in my house to create one simple automated test. Unluckily, the recorder bar didn’t show up. My PC environment is as follows:
Windows XP SP3, IE 7, VSTS 2008 SP1.
I finally found that my Microsoft Web Test Recorder was disabled. Only what I needed to do was launch IE 7, go to Internet Options/Programs/Manage Add-ons and enable Microsoft Web Test Recorder.
After that, the issue was fixed. I could create the simple web test successfully.
August 11, 2008
VSTS 2008 could not load file or assembly Interop.SHDocVw
Could not load file or assembly 'Interop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
If you see this in the future, it is easy to fix it. You can just go to C:\Windows\System32 and copy shdocvw.dll to the bin directory of your current project.
Open your Visual Studio project, add shdocvw.dll in your references and run the test again. The problem will be disappeared.
August 9, 2008
Always install SQL Server 2008 RTM first before you install Visual Studio 2008
A previous release of Microsoft Visual Studio 2008 is installed on this computer. Upgrade Microsoft Visual Studio 2008 to the SP1 before installing SQL Server 2008.
(see : http://support.microsoft.com/kb/956139)
That’s because you have Visual Studio 2008 SP1 Beta on your PC, not Visual Studio 2008 SP1. If you don’t have SP1, you can’t install it successfully. Today is August 9, and we need to wait until Microsoft releases Visual Studio 2008 SP1.
If you really want to install SQL Server 2008 RTM now, you need to uninstall Visual Studio 2008 and SP1 , install SQL Server 2008 RTM and then reinstall Visual Studio 2008. When Visual Studio 2008 SP1 is released, you can install it later.
The lesson I learn :
Always install SQL Server 2008 RTM first before you install Visual Studio 2008 +SP1
Microsoft doesn’t support upgrading from SQL Server 2008 RC0 to SQL Server 2008 RTM
At this moment, Microsoft doesn’t support upgrading from SQL Server 2008 RC0 to SQL Server 2008 RTM.
You need to uninstall SQL Server 2008 Beta and Visual Studio 2008 SP1 Beta first and then install SQL Server 2008 RTM.
Will it change in the future??
August 8, 2008
The installation package cannot be installed by the installer service
The installation package cannot be installed by the installer service. You must install a windows service pack that contains a newer version of the windows installer service.
This message showed that I didn’t have Windows Installer. After I installed Windows Installer 4.5 Redistributable (Windows6.0-KB942288-v2-x86.msu), everything was fine.
July 20, 2008
How to upgrade to SQL Server 2008 RC0?
How do you upgrade from SQL Server Feb CTP to SQL Server 2008? I would like to say that you can click the above link to try if the upgrade is working. I believe this link also supports Build-to-Build upgrade.
If you don’t want to use UI to do the upgrade, you can also use the command line to do the upgrade as follows:
setup.exe /ACTION=Upgrade /INSTANCENAME=yourInstancename
After entering the command line, you will know how to upgrade to SQL Server 2008 RC0.
July 17, 2008
Microsoft Office Communicator 2007 doesn’t support Windows Server 2008
The UI showed the error messages with the incomplete install and the complete install , which made me feel confused. Did it mean that the install is incomplete or complete? Actually there was no real install.
Finally I found that Microsoft Office Communicator 2007 only supports the operating systems: Windows 2000 SP4, Windows XP SP2, Windows Vista. Therefore , I can't use Microsoft Office Communicator 2007 on Windows Server 2008.
Will it change in the future?
July 14, 2008
Can’t you install SQL Server 2005 tools after you install VSTS 2008?
That’s because when you install VSTS 2008, you also install SQL Express automatically, which blocks you to install SQL Server 2005 tools.
Don’t worry. You can just do the following steps:
1. Go to Add/Remove Programs
2. Choose Microsoft SQL Server 2005.
3. Uninstall Workstation Components, Books Online and Development Tools.
4. Install SQL Server 2005 Tools again.
You will fix the problem.
July 13, 2008
Use CCleaner to remove the software you can’t uninstall in Add/Remove Programs
If you uninstalled some software before , but you can still see them in ARP, you can try CCleaner this time.
After you download CCleaner, you can launch it, go to Tools and click Run Installer. You will find it is so powerful to remove the programs so easily.
Article:
Use CCleaner and Uninstall Tool in your PC every day
July 6, 2008
CanoScan error: Make sure that there is enough space on the target disk
Unable to scan: Make sure that there is enough space on the target disk.
This error message was not helpful because my target disk still had so much space. When I changed the default setting to another disk, it still showed the error. When I rebooted my PC, I still got this error too.
When I was surfing some forums, I could not get the correct answer. The best way for me in my mind was to uninstall CanoScan LiDE 70 driver and install it again to see what’s going on.
After the uninstall and install CanoScan LiDE 70 driver, there is no error message. It is working for me.
If you get this error message next time, just uninstall it and install it again. It might work for you.
June 29, 2008
SQL Server 2008 RC0 BIDS and SQL Server 2005 BIDS can do the side by side install
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.
Some days ago, I installed SQL Server 2008 RC0 on my Windows XP machine with SQL Server 2005 (full install) and VSTS 2008 .
I find SQL Server 2008 RC0 BIDS and SQL Server 2005 BIDS can do the side by side install. The result is very different from the one in SQL Server 2008 CTP6.
Per msdn, SQL Server Management tools include the following components:
SQL Server Management Studio
SQL Server Profiler
SQL Server Database Tuning Advisor
Command prompt tools, such as sqlcmd.exe and osql.exe.
Business Intelligence Development Studio add-ins to Microsoft Visual Studio
Note that Business Intelligence Development Studio is a separate option during SQL Server installation.
Regardless of how many instances of SQL Server, Analysis Services, or Reporting Services are installed on a computer, only one copy of SQL Server 2008 Management Tools will be installed.
SQL Server 2008 Management Tools can run side-by-side on the same computer with earlier versions of SQL Server Management Tools.
SQL Server 2008 BIDS is really an interesting issue and I don’t know if it will be changed in the version of SQL Server 2008 RTM.
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 ?
February 5, 2008
Installing SQL Server 2008 BIDS (CTP6)
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
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
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?
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?
January 9, 2008
SQL Server 2005: Data files are always under MSSQL.n\MSSQL\Data folder
If you specify INSTALLSQLDATADIR=”C:\mydata” and try to put data files under mydata folder, you probably feel disappointed.
After the install, it generates the path MSSQL.1\MSSQL\Data and attaches it to the above path; finally it becomes: “C:\mydata\MSSQL.1\MSSQL\Data”.
From this article (http://msdn2.microsoft.com/en-us/library/ms345408.aspx), master and resource DBs must be in the same location:
The Resource database depends on the location of the master database. If you move the master database, you must also move the Resource database to the same location as the master data file. Do not put the Resource database in either compressed or encrypted NTFS file system folders. Doing so will hinder performance and prevent upgrades.
Do you think it is an interesting issue?