Friday, December 14, 2007

Using the Seapine TestTrack SOAP API

Our organization has been using the Seapine Test Track defect management system for about a year and recently I had to migrate defects from the existing custom defect tracking system to Seapine. The migration process involved the use of the SOAP API made available by Test Track.

However, upon using the SOAP API, I kept getting the error

date' is an invalid value for the SoapElementAttribute.DataType property. The property may only be specified for primitive types


After spending some time with google and msdn, I found a couple of links which attributed the problem to incompatibilities in the proxies generated by .NET 1.1 and .NET 2.0.

Till this point of time, I was always using a live reference from my C# application to the web-service. Upon generating a proxy class using wsdl and replacing all
System.Nullable strings with DateTime in the generated class file, I was able to use the SOAP API without any further problems.

Copy Paste between remote desktop and local computer

In order to allow copy-paste functionality across remote desktop, ensure that the following services are running on the local computer and the remote system
1. Network DDE DSDM
2. Network DDE
3. ClipBook

Network Dynamic Data Exchange (DDE) is a technology that enables applications on different Windows computers to dynamically share data. This sharing is effected via communications channels called trusted shares, which are managed by a service called the Network DDE Agent. By design, processes on the local machine can levy requests upon the Network DDE Agent, including ones that indicate what application should be run in conjunction with a particular trusted share. The DSDM(Distributed Share Database Manager), manages the shared DDE(Dynamic Data Exchange) network conversations (from shares like: \\computername\ndde$).

However, a vulnerability exists because the Network DDE Agent runs using the Local System security context and processes all requests using this context, rather than that of the user. This would give an attacker an opportunity to cause the Network DDE Agent to run code of her choice in Local System context, as a means of gaining complete control over the local machine.

Friday, July 06, 2007

Increasing Site Storage for SharePoint Portal Personal Sites

SharePoint Portal admins can manage and share personal content. SharePoint has a limit on the amount of disk space associated with each personal site; I think the default is set to 100MB. You can change this quota through the Administrative Tools (under 'Manage Quotas and Locks') but this will NOT impact any existing sites. Here is how you increase the site storage quota for an existing site:
1. Go to SharePoint Central Adminsitrator
2. Click Windows SharePoint Services
3. Click Manage Quotas and Locks
4. Click Manage site collection quotas and locks
5. Enter the URL for the specific personal site (e.g.http://in-srv-qaapp)
6. Click View Data
7. Under Site Quota Information, select Individual Quota under Current quota information
8. Change the site storage limit and click OK

Sunday, May 13, 2007

Verifying .net assembly attributes recursively

I was once given the responsibility of verifying the assembly attributes of all the assemblies in a .NET solution prior to each release. This was a very monotonous job considering the fact that this had to be done manually. For two of the releases, I used to open the properties of each dotnet assembly and verify if the attributes were correct in the release version. In a better situation I would have gone through the assemblyinfo.cs in each project and verified it (which is no better), but sadly I did not have access to the versioning server.

I did a bit of soul searching and decided that this was not the correct way to go through it. I wrote a small win app that could be used to do this

FileStream txtfile;

StreamWriter sw;

private void btnCheck_Click(object sender, EventArgs e)

{

try

{

txtfile = new FileStream(txtOutputFile.Text, FileMode.Create , FileAccess.Write);

sw = new StreamWriter(txtfile);

txtDirectoryPath.Text = dlgDirBrowser.SelectedPath;

string directoryPath = txtDirectoryPath.Text;

DirectoryInfo directoryInfo = new DirectoryInfo(directoryPath);

TraverseFolder(directoryInfo);

}

catch

{

MessageBox.Show("Directory path incorrect");

}

finally

{

sw.Close();

txtfile.Close();

MessageBox.Show("Done. File created "+ txtOutputFile.Text);

}

}

public void TraverseFolder(DirectoryInfo directoryInfo)

{

foreach (FileInfo fileInfo in directoryInfo.GetFiles("projectname*.dll"))

{

FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(fileInfo.FullName);

bool finalCheck;

finalCheck = (Assembly.LoadFrom(fileInfo.FullName).GetName().Version.ToString() == txtAssemblyVersion.Text)

&& (fileVersionInfo.ProductVersion == txtProductVersion.Text)

&& (fileVersionInfo.FileDescription == fileVersionInfo.OriginalFilename.Substring(0,fileVersionInfo.OriginalFilename.Length -4))

&& (fileVersionInfo.FileVersion == txtFileVersion.Text)

&& (fileVersionInfo.LegalCopyright == txtLegalCopyright.Text)

&& (fileVersionInfo.CompanyName == txtCompanyName.Text )

&& (fileVersionInfo.InternalName == fileVersionInfo.OriginalFilename)

&& (fileVersionInfo.ProductName == txtProductName.Text);

if (finalCheck == false)

sw.WriteLine(fileInfo.Name + " : Incorrect");

//else

// sw.WriteLine(fileInfo.FullName + " : Correct");

}

DirectoryInfo[] directories = directoryInfo.GetDirectories();

foreach(DirectoryInfo newDir in directories)

{

sw.WriteLine(" ");

sw.WriteLine("Directory: " + newDir.FullName);

TraverseFolder(newDir); // recursive call

}

}

Managing remote connections without tsadmin

Most of those who have worked on remote terminals using the Remote Desktop Connection utility would have faced the problem of not being able to connect because of disconnected session. The solution usually is to use the tsadmin utility to close the sessions. However, while working on a Windows XP, this is not available.

However, Windows XP does provide the following to perform this action
- qwinsta (Query Windows Station)
qwinsta /server:servername allows the user to view the sessions and obtain the session ids on a remote windows host
- rwinsta (Reset Windows Station)
rwinsta sessionid /server:servername

Monday, January 22, 2007

Deploying a Windows 2003 cluster using VMWare

I was once assigned to test an application which was to be deployed on a clustered Windows 2003 environment. The budget at that time did not allow us the luxury of having dedicated hardware for the clustering so we had to workaround the situation by using a virtual environment. I was able to find this wonderful article by Roudy Bob on Setting Up A Windows Server 2003 Cluster in VS 2005 - Part I but was not able to perform the same using VMWare.
Whenever a virtual machine was powered on, it used to lock the vmdk files thus not allowing the second node in the clustered to be powered. After some searching on various blogs, I was able to work around this problem by modifying the vmx file of the virtual machine to include the following statements (without the comments)

scsi0:sharedbus="virtual" //this shares the whole scsi bus 0
scsi0:0.shared="true" //this shares the scsi0 port 0
disk.locking="false" //for disk.

Removing the Quick Lauch in Sharepoint sites

Create a content editor on the right side bottom and save.

< style>
.ms-navframe
{
display: none;
}
</style>