A Tech Log

September 24, 2010

Open the firewall for tomcat on Centos

Filed under: Development — adallow @ 4:05 pm
Tags:

Goto prompt:

>setup
choose “Firewall configuration”
choose “Customize”
choose “Other ports” 8080:tcp
choose “Ok”
>service tomcat6 restart

Install Tomcat 6 on CentOS 5.x

Filed under: Development — adallow @ 3:31 pm
Tags:

cd /etc/yum.repos.d
wget ‘http://www.jpackage.org/jpackage50.repo’
yum update
yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps
service tomcat6 start

If you get a dependency then do this and do above again:

rpm -Uvh ‘http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm’

September 21, 2010

What UNix Shell am I using?

Filed under: Development — adallow @ 3:29 pm
Tags:

The shell for a user is in the /etc/passwd file for that user as the last field.

Or echo the ‘SHELL’ variable on the command prompt:

echo $SHELL

December 16, 2009

Silverlight – Specify Browser or Client HTTP Handling

Filed under: Development — adallow @ 9:36 am
Tags:

From MSDN : http://msdn.microsoft.com/en-us/library/dd920295%28VS.95%29.aspx

With Silverlight, you can specify whether the browser or the client provides HTTP handling for your Silverlight-based applications. By default, HTTP handling is performed by the browser and you must opt-in to client HTTP handling.

The following is a list of scenarios that you would typically specify client HTTP handling for.

  • Using HTTP methods other than GET and POST.
  • Using response status codes headers, response bodies in your application or for debugging purposes.
  • Sending XML HTTP requests such as REST and SOAP messages.
  • Manually managing cookies.

In addition to specifying whether to use browser or client HTTP handling, you can specify the scope for the handling. For example, you can specify HTTP handling for all messages, for a scheme (HTTP or HTTPS), for a particular domain, or for a single request object. Once you have specified the HTTP handling for a scheme or domain, you cannot change the HTTP handling for that domain or scheme. The following procedures describe how to specify browser or client HTTP handling, set the scope of the handling, and how to determine whether the browser or client is performing the handling for a request object.

Sivlerlight Twitter App!

Filed under: Development — adallow @ 9:32 am
Tags: ,

A sliverlight Twitter widget:

http://www.silverlightshow.net/items/Silvester-A-Silverlight-Twitter-Widget.aspx

May 27, 2009

Mapping of MS-Project fields to TFS – Walkthrough

Filed under: Development — adallow @ 10:48 am
Tags:

see http://developers.de/blogs/damir_dobric/archive/2008/06/23/mapping-of-ms-project-fields-to-tfs.aspx

Customizing Microsoft Project Field Mappings

Filed under: Development — adallow @ 10:02 am
Tags:

From MSDN:

When publishing or refreshing tasks in Microsoft Project, there is a mapping file that specifies how the fields in each task are mapped to fields in Team Foundation. Also the mapping file controls the publishing behavior, and designates special fields that display additional information, such as the context field.

You can customize the behavior when tasks are published or refreshed. You can change which fields in Team Foundation are mapped to Microsoft Project fields. You can control if fields are only published, or both published and refreshed. And you can designate special fields that are the links and attachments, context field, and synchronization field.

The Microsoft Project Field Mapping File
Describes the Microsoft Project mapping file and explains the XML syntax with examples.

Field Mappings in Microsoft Project
Provides specific support information for understanding how Team Foundation fields and Microsoft Project fields can be mapped.

How to: Download or Upload a Microsoft Project Field Mapping File
Explains how to download or upload the Microsoft Project field mapping file for a team project.

How to: Change How Fields are Mapped to Microsoft Project
Explains how to change field mappings in the Microsoft Project field mapping file.

May 8, 2009

TFS Workitem CoreField Enum

Filed under: Development — adallow @ 11:09 am
Tags:

TFS WorkItems CoreField enum can be used to access various fileds in a work item. For example

workItem.Fields[CoreField.AssignedTo].Value = "Emma Smith";

The values for this enum are as below:
Id
Rev
Title
Description
WorkItemType
TeamProject
State
Reason
CreatedBy Can be a user other than the one who is authenticated. See AuthorizedAs.
AssignedTo
ChangedBy
ChangedDate
CreatedDate
RevisedDate
AuthorizedAs The “person name” field, used to store the name of the user who is authenticated to make the change.
History
AreaPath
AreaId
IterationPath
IterationId
NodeName
RelatedLinkCount
HyperLinkCount
AttachedFileCount
ExternalLinkCount

April 7, 2009

Accessing Strongly Typed XML Data using XPathNavigator

Filed under: Development — adallow @ 4:56 pm
Tags: ,

As an instance of the XPath 2.0 data model, the XPathNavigator class can contain strongly-typed data that maps to common language runtime (CLR) types. According to the XPath 2.0 data model, only elements and attributes can contain strongly-typed data. The XPathNavigator class provides mechanisms for accessing data within an XPathDocument or XmlDocument object as strongly-typed data as well as mechanisms for converting from one data type to another.

http://msdn.microsoft.com/en-us/library/1bkbyzbb(VS.80).aspx

April 6, 2009

Turn Auto Shrink off on all SQL Databases

Filed under: Development — adallow @ 11:21 am
Tags:

DECLARE @name varchar(500)
DECLARE @sql varchar(8000)
SET @sql = ”
DECLARE Database_Cursor CURSOR READ_ONLY FOR
SELECT Name
FROM sysdatabases
WHERE DBID > 4
OPEN Database_Cursor
FETCH NEXT FROM Database_Cursor INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
SET @sql = @sql + ‘ALTER DATABASE [' + @name + '] SET AUTO_SHRINK OFF’ + CHAR(10)

FETCH NEXT FROM Database_Cursor INTO @name
END
CLOSE Database_Cursor
DEALLOCATE Database_Cursor

print @sql

EXEC(@sql)

April 1, 2009

TSQL to Shrink All Databases on a Server

Filed under: Development — adallow @ 3:44 pm
Tags: ,
DECLARE @name varchar(500)
DECLARE @sql varchar(8000)
SET @sql = ”
DECLARE Database_Cursor CURSOR READ_ONLY FOR
SELECT Name
FROM sysdatabases
WHERE DBID > 4
OPEN Database_Cursor
FETCH NEXT FROM Database_Cursor INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
SET @sql = @sql + ‘backup log [' + @name + '] with truncate_only’ + CHAR(10)
SET @sql = @sql +  ‘dbcc SHRINKDATABASE ( [' + @name + '] )’ + CHAR(10)

FETCH NEXT FROM Database_Cursor INTO @name

END
CLOSE Database_Cursor
DEALLOCATE Database_Cursor


print @sql

EXEC(@sql)

Moving TFS Databases

Filed under: Development — adallow @ 10:17 am
Tags:

from: http://weblogs.asp.net/dmckinstry/archive/2006/12/04/moving-tfs-databases.aspx

TFS was down!  The problem appeared to be that the TFS databases were installed on the default C drive which was too small and completely out of space.  They were pretty sure they knew the answer but wanted me to verify it.  For everyone’s benefits, I’ve documented the steps we used to move the TFS-related databases from the C drive to another location.

Note that they were already at a stop-work situation so things couldn’t get too much worse.  If you need to do something similar you should approach the process gingerly.  Make sure your backups are good and realize that while you’re doing this the TFS and its related services will be unavailable.

  1. Stop TFSServerScheduler, SharePoint Timer Service & SQL Server Reporting services..
    • Right-click on “My Computer” in the start menu and select Manage.
    • Drill into Services and Applications > Services.
    • Locate and stop the aforementioned services.
  2. Stop the TFS-related Application Pools:  ReportServer, TFS AppPool, TFSWSS, and TFSWSSADMIN.  As an alternative, you may simply shut down IIS altogether if it isn’t being used for anything else on the system.  Also note that these application pools
    • Still within Computer Management, drill into Services and Applications > Internet Information Services > Application Pools
    • Right click on the aforementioned pools and select Stop.
  3. Open Microsoft SQL Server Management Studio (Start > All Programs > Microsoft SQL Server 2005 > SQL Server Management Studio) and connect to the Database Engine for your Team Foundation Server.
  4. Drill into the Databases node.
  5. Locate and Detach the TFS databases.  To do this, right-click on the database and select Tasks > Detach…  Click OK to detach the database.  You can selectively choose the individual databases that you need to move or simply move all of the following:
    • ReportServer
    • ReportServerTempDB
    • STS_Config_TFS
    • STS_Content_TFS
    • TfsActivityLogging
    • TfsBuild
    • TfsIntegration
    • TfsVersionControl
    • TFSWarehouse
    • TfsWorkItemTracking
    • TfsWorkItemTrackingAttachements
  6. Locate the database data files and transaction logs that were detached.  By default they are in the following directory: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data.  The following database files are candidates based on the same sort order shown in the previous list:
    • ReportServer.mdf and ReportServer_log.LDF
    • ReportServerTempDB.mdf and ReportServerTempDB_log.LDF
    • STS_Config_TFS.mdf and STS_Config_TFS_log.LDF
    • STS_Content_TFS.mdf and STS_Content_TFS_log.LDF
    • TfsActivityLogging.mdf and TfsActivityLogging_log.LDF
    • TfsBuild.mdf and TfsBuild_log.LDF
    • TfsIntegration.mdf and TfsIntegration_log.LDF
    • TfsVersionControl.mdf and TfsVersionControl_log.LDF
    • TFSWarehouse.mdf and TFSWarehouse_log.LDF
    • TfsWorkItemTracking.mdf and TfsWorkItemTracking_log.LDF
    • TfsWorkItemTrackingAttachments.mdf and TfsWorkItemTrackingAttachments_log.LDF
  7. For each database, move the MDF and related LDF file from the source location to your selected destination.
  8. Return to Microsoft SQL Server Management Studio, reattach the database files in their new locations.  You can do this as follows:
    • Right-click on the Database folder and selecting Attach…
    • Click the Add button.
    • Browse to the new location and select the first MDF that you’ve moved and click OK.
    • Repeat steps 2 and 3 to select all of the database files that you’ve moved.
    • Once all of your databases are selected, click OK in the Attach Databases dialog.
    • Verify that all of the original databases shown in step 5 above are displayed under the Databases folder in SQL Server Management Studio.
    • Close SQL Server Management Studio.
  9. Restart the application pools that were shutdown in step 2.  You can use the same steps from step 2 except that you select Start from the pop-up menu instead for Stop.
  10. As a good measure, after the application pools are restarted, I restart IIS itself.  This probably isn’t necessary but I am paranoid.  If taking IIS down on your TFS server doesn’t work in your environment, skip this step.  To restart IIS, right-click on the Internet Information Services node in the computer Management console and select All Tasks > Restart IIS…  If you opted to take IIS down as a whole in step 2, now is the time to restart it.
  11. Start the services that were stopped in step 1.  This process is again the same as that given in step 1 except no you are starting services instead of stopping them.
  12. Bring up Team Explorer and verify that everything works.  Make sure you check the work items, reports and team portals to make sure everything looks good.
  13. Take a peek at the Application and System event logs and make sure that nothing unusual happened during your testing of the new environment.

March 31, 2009

TFS Excel addin problem

Filed under: Development — adallow @ 5:27 pm
Tags:

Problem:

Error TF84037: There was a problem initializing the Microsoft Excel Team Foundation Addin.  Re-installing the Team Foundation Client may be required.

Solution:

Office 2003 .Net programmability support is not installed.  You need to modify your installed version of Office and install this option.  I thought we had a better error message for this…

1.  In Add/Remove programs, locate your Office application and select it.

2.  Click on the ‘Change’ button

3.  Select ‘Add or Remove features’ and click ‘next’

4.  Select ‘Choose advanced customization of applications’ and click ‘next’

5.  In the tree view, expand ‘Microsoft Office Excel’ and make sure the .NET Programmability Support option is set to ‘run from my computer’.

6.  Click ‘update’.

from MSDN

Jquery – jtip – tool tip pop up, good for image and text popups

Filed under: Development — adallow @ 3:32 pm

http://www.codylindley.com/blogstuff/js/jtip/

JQuery BeautyTips (tip popup)

Filed under: Development — adallow @ 3:27 pm
Tags:

BeautyTips is a jQuery tooltips plugin which uses the canvas drawing element in the HTML5 spec in order to dynamically draw tooltips (sometimes called “talk bubbles” or “help balloons”) associated with a html element on the page. These tips are highly configurable and can be triggered in many different ways.

http://www.lullabot.com/files/bt/bt-latest/DEMO/index.html

March 19, 2009

Silverlight & WPF Charts

Filed under: Development — adallow @ 2:21 pm
Tags:
  • Visually Stunning Animated Charts
  • Single API for both Silverlight & WPF
  • Embed into Desktop or Web Applications
  • Tiny footprint (204 KB)
  • Dual License – Open Source & Commercial

see: http://visifire.com/

March 17, 2009

ADO.Net XML Provider

Filed under: Development — adallow @ 12:58 pm
Tags: ,

The WilsonXmlDbClient is an ADO.NET provider that enables Xml to be worked with just like any other database in .NET. It supports the most common Select, Insert, Update, and Delete SQL syntax, as well as tranactions and parameters.

Wilson.XmlDbClient is the original open source release by Paul Wilson. It includes:

XmlDbCommand
XmlDbDataReader
XmlDbDataAdapter
XmlDbConnection
XmlDbParameter
XmlDbTransaction
XmlDbException

http://code.msdn.microsoft.com/WilsonXmlDbClient

Delete Workitem in TFS (including the TFS data warehouse)

Filed under: Development — adallow @ 9:13 am
Tags:

taken directly from: http://bappedyanto.com/post/Delete-Work-Item-in-TFS.aspx

In TFS 2008, there’s a capability to delete unused work item. I know some people think that physically delete the work item is not needed because there are several work around to achieve it, nevertheless for the reason of tidiness everything, delete work item physically sometimes is required.

Out of the box, this feature is not available. You need to install TFS 2008 Power Tools and use the TFPT.EXE command line tools (although I believe GUI will be more than useful).

image

Be careful now, there’s no way to recover or undelete the work item by executing this tool.

As the description suggest, using this tool is not deleting records in datawarehouse (TFS uses SQL Server both OLTP and OLAP), only in operational database. The implication is the deleted work item will still appear in Team Reporting.

To fix this, manual deletion is required in TFS Datawarehouse database, some people will say that this practice is dangerous because potentially will break the data integrity but I think if we do it properly, the risk can be eliminated.

in SQL Management Studio, connect to TFS Database Server, and then unfold TFSWarehouse database.

image

Notice five tables with name related to work item. [Current Work Item], [Work Item], [Work Item Changeset], [Work Item History], and [Work Item with Result].

Query [Work Item] table to get the work item id in Datawarehouse with this SQL statement

SELECT __ID, System_Title FROM [Work Item] WHERE System_Id = workitemid

workitemid in here is the work items id that is used in TFPT command. Don’t get confused because in other 4 tables that previously noted the work item id that will be used is coming from [Work Item].__ID.

For the other 4 tables here’s the SQL statement that need to be executed

Delete [table name] where [work item] = workitem_from_[Work Item].__ID

Then rebuilt you cube by executing the OLAP Database and Warehouse Run from web services.

Disclaimer : please be very careful when conducting this procedure. I am not responsible if your TFS data is messed up

February 11, 2009

Reporting Services: Using XML and Web Service Data Sources

Filed under: Development — adallow @ 2:41 pm
Tags:

This white paper consolidates general information, best practices, and tips for designing Microsoft SQL Server Reporting Services (SSRS) reports. It is intended to provide a starting point for design questions and an overview of some of the capabilities of Reporting Services. (12 printed pages)

http://msdn.microsoft.com/en-us/library/aa964129(SQL.90).aspx

February 6, 2009

MSBuild Project Template for Visual Studio

Filed under: Development — adallow @ 8:43 am
Tags: ,

A Visual Studio template that gives a basic framework for editing MSBuild project files from within the Visual Studio IDE, also supporting Source Control without leaving the Solution Explorer window.

http://www.codeplex.com/MSBuildTemplate

February 2, 2009

Using jQuery with ASP .NET AJAX to create a cascading CheckBoxList

Filed under: Development — adallow @ 10:33 am
Tags: , ,

http://weblogs.asp.net/alnurismail/archive/2008/11/21/a.aspx

SQL updating a table with values from another table via a join

Filed under: Development — adallow @ 10:03 am
Tags:

UPDATE dbo.geo_postcode
SET dbo.geo_postcode.geo_region_name = dbo.geo_region.geo_region_name
FROM dbo.geo_postcode
INNER JOIN dbo.geo_region
ON (dbo.geo_postcode.geo_region_code = dbo.geo_region.geo_region_code and dbo.geo_postcode.geo_country_code = dbo.geo_region.geo_country_code);

Thread Local Storage and .Net

Filed under: Development — adallow @ 9:48 am
Tags: ,

the below is taken from:

http://www.developerfusion.com/article/4272/net-threading-part-ii/3/

The Thread class and System. Threading namespace also contain some methods and classes for realizing thread local storage. Thread local storage is a manner of storing data in a container that is unique to the thread. Many threads could then use the same named container to store their data without concern of collision. Each thread’s local storage is distinct from another thread’s local storage and is only available in the one thread. Listing 3 shows a small sample using the thread-local-storage methods and classes.

using System;
using System.Threading;

namespace ConsoleApplication11
{
class Class1
{
public void ThreadStart()
{
string str1 = "My Cookie "+
Thread.CurrentThread.GetHashCode();
Console.WriteLine("worker thread: {0}", str1);
LocalDataStoreSlot lds =
Thread.GetNamedDataSlot("COOKIE");
Thread.SetData(lds, str1);
Thread.Sleep(1);
LocalDataStoreSlot lds2 =
Thread.GetNamedDataSlot("COOKIE");
string str2 = "";
str2 = (string) Thread.GetData(lds2);
Console.WriteLine("worker thread: {0}", str2);
}

static void Main(string[] args)
{
string str1 = "My Cookie "+
Thread.CurrentThread.GetHashCode();
Console.WriteLine("main thread: {0}", str1);
LocalDataStoreSlot lds =
Thread.AllocateNamedDataSlot("COOKIE");
Thread.SetData(lds, str1);
Class1 obj = new Class1();
Thread thread = new Thread(
new ThreadStart(obj.ThreadStart));
thread.Start();
Thread.Sleep(1);
LocalDataStoreSlot lds2 =
Thread.GetNamedDataSlot("COOKIE");
string str2 = "";
str2 = (string) Thread.GetData(lds2);
Console.WriteLine("main thread: {0}", str2);
}
}
}

You could also create and start more than one thread and the behavior of the thread local storage becomes more obvious. I have played with Win32 thread-local-storage functions and created my own for portability to UNIX, but I have rarely found them very useful. I strongly believe in stateless computing and thread-local-storage contradicts this belief.

January 29, 2009

TFS API: Work ItemHistory

Filed under: Development — adallow @ 2:49 pm
Tags:

http://crazedcodemonkey.blogspot.com/2008/06/team-foundation-server-api-provides.html

January 27, 2009

Ordered Execution With ThreadPool

Filed under: Development — adallow @ 9:38 pm
Tags: ,

Interesting from:

http://msdn.microsoft.com/en-us/magazine/dd419664.aspx

“Consider a pipeline implementation that obtains parallelism benefits by having multiple stages of the pipeline active at any one time.

For example, you could have a pipeline that reads in data from a file, compresses it, encrypts it, and writes it out to a new file. The compression can be done concurrently with the encryption, but not on the same data at the same time, since the output of one needs to be the input to the other. Rather, the compression routine can compress some data and send it off to the encryption routine to be processed, at which point the compression routine can work on the next piece of data.
Since many compression and encryption algorithms maintain a state that affects how future data is compressed and encrypted, it’s important that ordering is maintained. (Never mind that this example deals with files, and it’d be nice if you could decrypt and decompress the results in order to get back the original with all of the data in the correct order.)
There are several potential solutions. The first solution is simply to dedicate a thread to each component. This DedicatedThread would have a first-in-first-out (FIFO) queue of work items to be executed and a single thread that services that queue. When the component has work to be run, it dumps that work into the queue, and eventually the thread will get around to picking up the work and executing it. Since there’s only one thread, only one item will be run at a time. And as a FIFO queue is being used, the work items will be processed in the order they were generated.”

MSBuild: Best Practices For Creating Reliable Builds, Part 1

Filed under: Development — adallow @ 4:40 pm
Tags: ,

If your using MSBuild (as we do with our TFS environment) then the following is most useful:

http://msdn.microsoft.com/en-au/magazine/dd419659.aspx

Team Foundation Server Power Tools – October 2008 Release

Filed under: Development — adallow @ 11:55 am
Tags:

Includes:

  • Command line tool (TFPT.EXE)
  • Team Explorer IDE menu additions
  • Build Notification tool
  • TFS Best Practices Analyzer
  • Process Template Editor
  • Work Item Templates
  • Custom check-in policies
  • TFS Server Manager
  • TFS Users tool
  • Alert Editor
  • TFS Power Shell Extensions
  • TFS Windows Shell Extensions
  • Team Members Tool

Download from: http://www.microsoft.com/downloads/details.aspx?familyid=FBD14EEA-781F-45A1-8C46-9F6BA2F68BF0&displaylang=en

Checking your TFS Version

Filed under: Development — adallow @ 11:52 am
Tags:

see http://blogs.msdn.com/bharry/archive/2008/01/15/checking-your-tfs-version-and-extending-trials.aspx

“The program is called TFSVersionDetection.exe and is attached to this blog post (use link above). I recommend that you run the tool on the TFS server itself. You can run it from another machine and point it at the TFS server but it does a less thorough job of detection (due to permissions issues, etc). If you run it on the TFS server and press the “Check” button, you will see a screen that look something like the following.”

Visual Studio 2008 Team Foundation Server Service Pack 1

Filed under: Development — adallow @ 11:49 am
Tags:

http://www.microsoft.com/downloads/details.aspx?familyid=9e40a5b6-da41-43a2-a06d-3cee196bfe3d&displaylang=en

January 25, 2009

Implementing a Brand in a SharePoint Server 2007 Publishing Site

Filed under: Development — adallow @ 8:21 am
Tags:

http://msdn.microsoft.com/en-us/library/dd221375.aspx

January 24, 2009

Using Telerik RadEditor as a Wiki Editor in MOSS

Filed under: Development — adallow @ 3:31 pm
Tags: ,

Source telerik:

“There have been a number of questions, regarding the RadEditor for MOSS and whether it is possible to use it in the SharePoint 2007 Wiki libraries and sites. The short answer to this question is – yes it’s possible. Here is the long version: Wiki pages in MOSS 2007 are stored as normal document libraries. This means that when you edit a Wiki page, you are actually editing a list item. RadEditor for MOSS  supports this scenario and you can use it to replace the default editor in all major browsers – Internet Explorer, Firefox, Safari, etc.

Here is how to activate the RadEditor for MOSS list items (the same guide is available in the RadEditor for MOSS documentation topic Using RadEditor in List Items):

1. You need to get the latest build of our editor. Go to this page for more info and download details – http://www.telerik.com/products/sharepoint/overview.aspx

2. Install the RadEditor for MOSS in your web farm. Installation instructions are available in the documentation, which comes with the download.

3. Browse to the SharePoint site which, where you want to use the RadEditor in list items and open the Site Settings page. From the Site Settings, navigate to Site Features.

4. Activate the RadEditor features. You can use the editor in all browsers, or you can leave the default rich text editor in Internet Explorer and use ours everywhere else. Here is a screenshot with the RadEditor features:

5. You might need to restart IIS to recycle the SharePoint web application. This step is required since MOSS will cache the default editor the first time it is used.

6. That’s it. You can now use RadEditor for MOSS to edit Wiki pages in your site. Remember that the RadEditor features are local to the site, so if you want to edit list items in a different site, you need to redo steps 3 and 4 for it.

After you have our editor up and running, you might want to customize its appearance/options. You can do that with the editor’s tools and configuration files. By default, they are located at \Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.1.0.0__1f131a624888eeed\RadControls\Editor\ (where 4.1.0 represents the installed editor build). The files you need to modify are called ListToolsFile.xml and ListConfigFile.xml”

Removing search scope dropdown in Sharepoint (MOSS 2007) using CSS

Filed under: Development — adallow @ 3:13 pm
Tags:

Open your core.css file and find this line: “select.ms-sbscopes” . This is the css class which is responsible for the search scope dropdown in MOSS 2007.

Now just add this line within the class..:

display:none;

.. and you are done!

Note: If you don’t want to edit the core.css, you can also add the following line on any css file which will be loaded on the page  (or direct on the masterpage):

select.ms-sbscopes { display:none; }

(from Gee’s Blog)

How to find out which Sharepoint version you are using

Filed under: Development — adallow @ 3:12 pm
Tags:

Go to Control Panel -> Add and Remove Programs. Select the product (sharepoint server) and then click: Click here for support

Now a window will pop up that displays your current sharepoint version.

How to extend the Windows Server 2008 evaluation period

Filed under: Development — adallow @ 6:48 am
Tags:

Useful if your running the Virtual PC image of VS 2010 etc

http://support.microsoft.com/kb/948472

TFS Branching Guide 2.0

Filed under: Development — adallow @ 6:32 am
Tags: ,

Jeff Beehler: “Selecting the right branching strategy is one of the most important aspects of TFS deployment. Picking the right strategy can lead to optimized team cooperation, increased productivity and a successful adoption. On the other hand, selecting a bad branching strategy can cause frustration, damage productivity and derail TFS adoption in an organization. We have therefore put a lot of effort in creating a set of practical guidance to educate our customers and partners and support their VSTS adoption efforts.”

You can see the guide at (came out late dec 2008):

http://www.codeplex.com/TFSBranchingGuideII

Microsoft Pre-release Software Visual Studio 2010 and .NET Framework 4.0 Community Technology Preview (CTP)

Filed under: Development — adallow @ 6:28 am
Tags: ,

The CTP (Community Technology Preview) for Visual Studio 2010 including .Net 4.0 can be downloaded from:

http://www.microsoft.com/downloads/details.aspx?FamilyId=922B4655-93D0-4476-BDA4-94CF5F8D4814&displaylang=en

January 14, 2009

Performance Anti-Patterns in Database-Driven Applications

Filed under: Development — adallow @ 10:29 am

http://www.infoq.com/articles/Anti-Patterns-Alois-Reitbauer;jsessionid=112732646B27418BBFF572769610896C

December 19, 2008

Filed under: Development — adallow @ 6:40 pm
Tags:

Small Basic is a project that’s aimed at bringing “fun” back to programming. By providing a small and easy to learn programming language in a friendly and inviting development environment, Small Basic makes programming a breeze. Ideal for kids and adults alike, Small Basic helps beginners take the first step into the wonderful world of programming.

  • Small Basic derives its inspiration from the original BASIC programming language, and is based on the Microsoft .Net platform. It is really small with just 15 keywords and uses minimal concepts to keep the barrier to entry as low as possible.
  • The Small Basic development environment is simple, yet provides powerful modern environment features like Intellisense™ and instant context sensitive help.
  • Small Basic allows third-party libraries to be plugged in with ease, making it possible for the community to extend the experience in fun and interesting ways.”

see: http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx

XML Notepad 2006

Filed under: Development — adallow @ 6:31 pm
Tags:

XML Notepad 2006 provides a simple intuitive User Interface for browsing and editing XML documents.  XML Notepad shows how to use some advanced features of System.XML in the .NET Frameworks 2.0.  The download includes source code. See the handy design doc that goes with it.  Features include:

  • Tree View synchronized with Node Text View for quick editing of node names and values.
  • Incremental search (Ctrl+I) in both tree and text views, so as you type it navigates to matching nodes.
  • Cut/copy/paste with full namespace support.
  • Drag/drop support for easy manipulation of the tree, even across different instances of XML Notepad and from the file system.
  • Infinite undo/redo for all edit operations.
  • In place popup multi-line editing of large text node values.
  • Configurable fonts and colors via the options dialog.
  • Full find/replace dialog with support for regex and XPath.
  • Good performance on large XML documents, loading a 3mb document in about one second.
  • Instant XML schema validation while you edit with errors and warnings shown in the task list window.
  • Intellisense based on expected elements and attributes and enumerated simple type values.
  • Support for custom editors for date, dateTime and time datatypes and other types like color.
  • Handy nudge tool bar buttons for quick movement of nodes up and down the tree.
  • Inplace HTML viewer for processing xml-stylesheet processing instructions.
  • Built-in XML Diff tool.”

See : http://blogs.msdn.com/xmlteam/archive/2006/09/05/741251.aspx

XSLT Profiler Addin for VS 2008

Filed under: Development — adallow @ 6:21 pm
Tags:

XML Tools team has released the XSLT Profiler Addin for VS 2008 – a quick and reliable performance analysis profiler tool that assists in the development and debugging of XSLT documents. The XSLT Profiler Addin for VS 2008 allows developers to measure, evaluate, and target performance-related problems in XSLT code by creating detailed XSLT performance reports. The XSLT Profiler includes a wealth of useful hints for XSL and XSLT style sheet optimizations, which are essential for XSLT-based applications that demand maximum performance.

If you need to develop reliable and robust software, the XSLT Profiler is capable of detecting the performance errors and defects in coding so that they are corrected at an early stage in the development. This is essential in reducing the overall cost of developing software applications. The XSLT Profiler tool is fully integrated into Microsoft Visual Studio 2008 to provide a seamless and approachable user experience, combining several Microsoft technologies, including Microsoft XML Editor and XSLT Debugger, Visual Studio Team System, F1 (Performance Suites), and more.

For more information and download check out Microsoft Downloads site.”

see: http://blogs.msdn.com/xmlteam/archive/2008/02/07/announcing-the-xslt-profiler-addin-for-vs-2008.aspx

Picking the right MSXML Version

Filed under: Development — adallow @ 6:17 pm
Tags:

Good article, the full post is long but relevant if you use MSXML, however the basic summary is below:

see: http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx

  • Use MSXML 6.0 – it is “in the box” on Vista and available for download on Win2k, XP, and 2003. It has the best security, performance, reliability, and W3C conformance
  • MSXML 3.0 is our preferred “fallback” - It is installed on every OS from a fully patched Win2k SP4 installation on up, so it requires “zero-deployment” and is serviced regularly with the OS
  • MSXML 4.0 was released to the web about 5 years ago, but at this point has been superseded by MSXML 6.0 and is only intended to support legacy applications
  • MSXML 5.0 for Microsoft Office Applications is purpose-built for Office applications and isn’t intended for broad deployment. Internet Explorer 7 actually has the MSXML5 components “off-by-default” in the Internet zone so your customers will get a goldbar for each MSXML5 control on a page if your code tries to instantiate it. The best recommendation is to avoid MSXML5 in your web apps (only machines with Office 2003 or higher will have it, anyway.).

Ideally, customers should standardize on MSXML6, but as mentioned above legacy applications or zero-deployment requirements may block full migration to MSXML6 in the short run. In this case there are two tensions that need to be balanced – functionality and test costs. This essentially leads to two options:

  • Try MSXML6 and fallback to MSXML3 – MSXML6 has some improvements that aren’t in MSXML3 such as support for XSD schema, and improved stability, performance, and security. So your app may try out MSXML6 if it is on the box and then “fallback” gracefully. Just remember to test your app with MSXML6 and with MSXML3 so you aren’t surprised when you release your application. Here’s a quick example:

if (Web.Application.get_type() == Web.ApplicationType.InternetExplorer) {

var progIDs = [ 'Msxml2.DOMDocument.6.0', 'Msxml2.DOMDocument.3.0'];

for (var i = 0; i < progIDs.length; i++) {

try {

var xmlDOM = new ActiveXObject(progIDs[i]);

return xmlDOM;

}

catch (ex) {

}

}

return null;

}

  • Standardize on MSXML3 with an eye towards MSXML6 in the future – This limits functionality somewhat to what is in MSXML3 but also keeps down test costs. I’ll try to post something in the future about writing MSXML3 apps that should upgrade more easily to MSXML6 (and beyond).

XML Tools in Visual Studio 2008

Filed under: Development — adallow @ 6:15 pm
Tags: ,

tooling support offered in Visual Studio 2008 that will make working with XML easier. It will cover editing XML files, working with XML schemas, debugging XSLT style sheets and extending Visual Studio by writing your own custom XML Designers.”

see http://www.code-magazine.com/Article.aspx?quickid=0712162

December 17, 2008

MSBuild Copying Files

Filed under: Development — adallow @ 4:49 pm
Tags: ,

http://blogs.parivedasolutions.com/borrell/archive/2007/05/19/MSBuildMultipleDeployments.aspx

http://borrell.parivedasolutions.com/2007/05/msbuild-copy-files-to-multiple-folders.html

http://blogs.msdn.com/msbuild/archive/2005/11/07/490068.aspx

http://www.sedodream.com/PermaLink,guid,8f6bbb30-ec22-4fc6-90a1-c32715598d23.aspx

Executing Unit Tests from MSBuild

Filed under: Development — adallow @ 4:45 pm
Tags: ,

http://geekswithblogs.net/michaelstephenson/archive/2007/04/27/112031.aspx

http://social.msdn.microsoft.com/forums/en-US/msbuild/thread/e0c8ceec-f180-43cd-b92b-c37c3991c169/

http://harriyott.com/2005/07/running-mstest-from-msbuild.aspx

http://paltman.com/2006/12/06/3-steps-to-integrating-cruisecontrol-with-msbuild-mstest-and-code-coverage/

TFS Deployer

Filed under: Development — adallow @ 4:44 pm
Tags:

By way of explaination, TFS Deployer interfaces the Team Foundation Server build store with PowerShell allowing script execution to be triggered across multiple machines when a user transitions the quality indicator of a build from one state to another.

http://www.codeplex.com/tfsdeployer

December 5, 2008

Visual Studio 2008: Visual Studio Team System Database Edition

Filed under: Development — adallow @ 1:47 pm
Tags: ,

VS Database Edition is Part of Team edition as well. check out the features here via video:

http://www.microsoft.com/web/content.aspx?id=visual-studio-2008-database

December 1, 2008

ASP.NET Performance Checklist

Filed under: Development — adallow @ 11:31 pm
Tags: ,

Design Considerations

ms998596.checkbox(en-us,MSDN.10).gif Consider security and performance.
ms998596.checkbox(en-us,MSDN.10).gif Partition your application logically.
ms998596.checkbox(en-us,MSDN.10).gif Evaluate affinity.
ms998596.checkbox(en-us,MSDN.10).gif Reduce round trips.
ms998596.checkbox(en-us,MSDN.10).gif Avoid blocking on long-running tasks.
ms998596.checkbox(en-us,MSDN.10).gif Use caching.
ms998596.checkbox(en-us,MSDN.10).gif Avoid unnecessary exceptions.

Threading

ms998596.checkbox(en-us,MSDN.10).gif Tune the thread pool by using the formula to reduce contention.
ms998596.checkbox(en-us,MSDN.10).gif Consider minIoThreads and minWorkerThreads for burst load.
ms998596.checkbox(en-us,MSDN.10).gif Do not create threads on a per-request basis.
ms998596.checkbox(en-us,MSDN.10).gif Avoid blocking threads.
ms998596.checkbox(en-us,MSDN.10).gif Avoid asynchronous calls unless you have additional parallel work.

Resource Management

ms998596.checkbox(en-us,MSDN.10).gif Pool resources.
ms998596.checkbox(en-us,MSDN.10).gif Explicitly call Close or Dispose on resources you open.
ms998596.checkbox(en-us,MSDN.10).gif Do not cache or block on pooled resources.
ms998596.checkbox(en-us,MSDN.10).gif Know your application allocation pattern.
ms998596.checkbox(en-us,MSDN.10).gif Obtain resources late and release them early.
ms998596.checkbox(en-us,MSDN.10).gif Avoid per-request impersonation.

Pages

ms998596.checkbox(en-us,MSDN.10).gif Trim your page size.
ms998596.checkbox(en-us,MSDN.10).gif Enable buffering.
ms998596.checkbox(en-us,MSDN.10).gif Use Page.IsPostBack to minimize redundant processing.
ms998596.checkbox(en-us,MSDN.10).gif Partition page content to improve caching efficiency and reduce rendering.
ms998596.checkbox(en-us,MSDN.10).gif Ensure pages are batch compiled.
ms998596.checkbox(en-us,MSDN.10).gif Ensure debug is set to false.
ms998596.checkbox(en-us,MSDN.10).gif Optimize expensive loops.
ms998596.checkbox(en-us,MSDN.10).gif Consider using Server.Transfer instead of Response.Redirect.
ms998596.checkbox(en-us,MSDN.10).gif Use client-side validation.

Server Controls

ms998596.checkbox(en-us,MSDN.10).gif Identify the use of view state in your server controls.
ms998596.checkbox(en-us,MSDN.10).gif Use server controls where appropriate.
ms998596.checkbox(en-us,MSDN.10).gif Avoid creating deep hierarchies of controls.

Data Binding

ms998596.checkbox(en-us,MSDN.10).gif Avoid using Page.DataBind.
ms998596.checkbox(en-us,MSDN.10).gif Minimize calls to DataBinder.Eval.

Caching

ms998596.checkbox(en-us,MSDN.10).gif Separate dynamic data from static data in your pages.
ms998596.checkbox(en-us,MSDN.10).gif Configure the memory limit.
ms998596.checkbox(en-us,MSDN.10).gif Cache the right data.
ms998596.checkbox(en-us,MSDN.10).gif Refresh your cache appropriately.
ms998596.checkbox(en-us,MSDN.10).gif Cache the appropriate form of data.
ms998596.checkbox(en-us,MSDN.10).gif Use output caching to cache relatively static pages.
ms998596.checkbox(en-us,MSDN.10).gif Choose the right cache location.
ms998596.checkbox(en-us,MSDN.10).gif Use VaryBy attributes for selective caching.
ms998596.checkbox(en-us,MSDN.10).gif Use kernel caching on Microsoft® Windows Server™ 2003.

State Management

ms998596.checkbox(en-us,MSDN.10).gif Store simple state on the client where possible.
ms998596.checkbox(en-us,MSDN.10).gif Consider serialization costs.

Application State

ms998596.checkbox(en-us,MSDN.10).gif Use static properties instead of the Application object to store application state.
ms998596.checkbox(en-us,MSDN.10).gif Use application state to share static, read-only data.
ms998596.checkbox(en-us,MSDN.10).gif Do not store single-threaded apartment (STA) COM objects in application state.

Session State

ms998596.checkbox(en-us,MSDN.10).gif Prefer basic types to reduce serialization costs.
ms998596.checkbox(en-us,MSDN.10).gif Disable session state if you do not use it.
ms998596.checkbox(en-us,MSDN.10).gif Avoid storing STA COM objects in session state.
ms998596.checkbox(en-us,MSDN.10).gif Use the ReadOnly attribute when you can.

View State

ms998596.checkbox(en-us,MSDN.10).gif Disable view state if you do not need it.
ms998596.checkbox(en-us,MSDN.10).gif Minimize the number of objects you store in view state.
ms998596.checkbox(en-us,MSDN.10).gif Determine the size of your view state.

HTTP Modules

ms998596.checkbox(en-us,MSDN.10).gif Avoid long-running and blocking calls in pipeline code.
ms998596.checkbox(en-us,MSDN.10).gif Consider asynchronous events.

String Management

ms998596.checkbox(en-us,MSDN.10).gif Use Response.Write for formatting output.
ms998596.checkbox(en-us,MSDN.10).gif Use StringBuilder for temporary buffers.
ms998596.checkbox(en-us,MSDN.10).gif Use HtmlTextWriter when building custom controls.

Exception Management

ms998596.checkbox(en-us,MSDN.10).gif Implement a Global.asax error handler.
ms998596.checkbox(en-us,MSDN.10).gif Monitor application exceptions.
ms998596.checkbox(en-us,MSDN.10).gif Use try/finally on disposable resources.
ms998596.checkbox(en-us,MSDN.10).gif Write code that avoids exceptions.
ms998596.checkbox(en-us,MSDN.10).gif Set timeouts aggressively.

COM Interop

ms998596.checkbox(en-us,MSDN.10).gif Use ASPCOMPAT to call STA COM objects.
ms998596.checkbox(en-us,MSDN.10).gif Avoid storing COM objects in session state or application state.
ms998596.checkbox(en-us,MSDN.10).gif Avoid storing STA components in session state.
ms998596.checkbox(en-us,MSDN.10).gif Do not create STA components in a page constructor.
ms998596.checkbox(en-us,MSDN.10).gif Supplement classic ASP Server.CreateObject with early binding.

Data Access

ms998596.checkbox(en-us,MSDN.10).gif Use paging for large result sets.
ms998596.checkbox(en-us,MSDN.10).gif Use a DataReader for fast and efficient data binding.
ms998596.checkbox(en-us,MSDN.10).gif Prevent users from requesting too much data.
ms998596.checkbox(en-us,MSDN.10).gif Consider caching data.

Security Considerations

ms998596.checkbox(en-us,MSDN.10).gif Constrain unwanted Web server traffic.
ms998596.checkbox(en-us,MSDN.10).gif Turn off authentication for anonymous access.
ms998596.checkbox(en-us,MSDN.10).gif Validate user input on the client.
ms998596.checkbox(en-us,MSDN.10).gif Avoid per-request impersonation.
ms998596.checkbox(en-us,MSDN.10).gif Avoid caching sensitive data.
ms998596.checkbox(en-us,MSDN.10).gif Segregate secure and non-secure content.
ms998596.checkbox(en-us,MSDN.10).gif Only use Secure Sockets Layer (SSL) for pages that require it.
ms998596.checkbox(en-us,MSDN.10).gif Use absolute URLs for navigation.
ms998596.checkbox(en-us,MSDN.10).gif Consider using SSL hardware to offload SSL processing.
ms998596.checkbox(en-us,MSDN.10).gif Tune SSL timeout to avoid SSL session expiration.

Deployment Considerations

ms998596.checkbox(en-us,MSDN.10).gif Avoid unnecessary process hops.
ms998596.checkbox(en-us,MSDN.10).gif Understand the performance implications of a remote middle tier.
ms998596.checkbox(en-us,MSDN.10).gif Short-circuit the HTTP pipeline.
ms998596.checkbox(en-us,MSDN.10).gif Configure the memory limit.
ms998596.checkbox(en-us,MSDN.10).gif Disable tracing and debugging.
ms998596.checkbox(en-us,MSDN.10).gif Ensure content updates do not cause additional assemblies to be loaded.
ms998596.checkbox(en-us,MSDN.10).gif Avoid XCOPY under heavy load.
ms998596.checkbox(en-us,MSDN.10).gif Consider precompiling pages.
ms998596.checkbox(en-us,MSDN.10).gif Consider Web garden configuration.
ms998596.checkbox(en-us,MSDN.10).gif Consider using HTTP compression.
ms998596.checkbox(en-us,MSDN.10).gif Consider using perimeter caching.

Patterns and Practices home

.Net 2.0 and Config MaxConnection Values

Filed under: Development — adallow @ 11:15 pm
Tags: ,

Nearly all microsoft.com Web sites have ASP.NET applications that make calls to remote Web service clusters. The maximum number of concurrent remote Web service calls that can be made from a single Web server is determined by the maxConnection attribute of the <connectionManagement> element in the machine.config file. In ASP.NET 1.1, by default the maxConnection value was set to 2. This old default maxConnection value was much too low for sites like microsoft.com that have hundreds of different applications that make remote Web service calls. The result was that ASP.NET requests would queue while waiting for the remote Web service calls to complete. (You can view the number of queued ASP.NET requests via the perfmon counter ASP.NET\Requests Queued.) To enable more calls to execute concurrently to a remote Web service (and thereby improve the performance of applications on the site), we increased the maxConnection value to 40 for our quad processor Web servers. (The general recommended value for maxConnection is 12 times the number of CPUs, but tune this to suit your specific situation.)
In ASP.NET 2.0, however, you no longer need to configure maxConnection manually as it is now automatically scaled and set. This is a result of the new configuration section for the processModel tag in machine.config (for more information about the processModel element, see “processModel Element (ASP.NET Settings Schema))”.

<system.web>
    <processModel autoConfig="true" />
</system.web>
With autoConfig enabled in machine.config (this is the default setting), ASP.NET sets the value of the maxConnection parameter to 12n (where n is the number of CPUs). Enabling autoConfig also causes the following: the maxWorkerThreads parameter and the maxIoThreads parameter are set to 100, the minFreeThreads parameter is set to 88n, the minLocalRequestFreeThreads parameter is set to 76n, and the minWorkerThreads is set to 50.
Prior to making use of autoConfig in ASP.NET 2.0 to automatically scale and set values for maxConnection and the other attributes in the list, be sure to remove any manually set values for these parameters as these values would be used instead of the autoConfig values. This is something to keep in mind when migrating from ASP.NET 1.1 (where maxConnection needed to be explicitly set) to ASP.NET 2.0, where there are defaults.
Again, the autoConfig values for maxConnection and the other attributes listed previously are somewhat arbitrary and may not work for absolutely every instance, but I have found that these limits work well for nearly all microsoft.com applications.
If you decide that you need to tune the maxConnection value manually, be cautious when increasing its value as this can lead to an increase in CPU utilization. This increase is caused by the fact that more incoming requests can be processed by ASP.NET instead of having them wait for their turn to call the Web service. Of course, you should remember that the maxConnection attribute does not affect local Web service calls, only remote calls.
Interesting I came across this code fragment, wonder if it works….
System.Net.ServicePointManager.DefaultConnectionLimit=<your value here>

November 26, 2008

Visual C++ 2008 Feature Pack

Filed under: Development — adallow @ 4:33 pm
Tags:

The Feature Pack provides several exciting features for C++ developers, such as a major update to MFC and an implementation of TR1.  Using the included MFC components, developers can create applications with the “look & feel” of Microsoft’s most popular products – Microsoft Office, Visual Studio and Internet Explorer.  New components include the Office 2007 Ribbon Bar, Visual Studio docking and auto hide windows, Vista theme support, “on the fly” menu and toolbar customization, Shell management classes and much more.  Our implementation of TR1 contains a number of important features such as smart pointers, regular expression parsing, containers (tuple, array, unordered set, etc) and sophisticated random number generators.

This product is a freely available download to any Visual Studio 2008 Standard or above customer and is fully covered under Microsoft’s standard support policies.  

You may also want to take a look at the online documentation and walkthroughs for both MFC and TR1.  The MFC documentation provides some great content to get you up and running quickly with the new components. “

see:

http://blogs.msdn.com/somasegar/archive/2008/04/07/visual-c-2008-feature-pack-shipped.aspx

New ASP.NET Charting Control for .Net 3.5

Filed under: Development — adallow @ 4:31 pm
Tags: ,

Scott Gu has posted about a new free ASP.Net 3.5 Charting Control that you can downlaod from:

http://www.microsoft.com/downloads/details.aspx?FamilyID=130f7986-bf49-4fe5-9ca8-910ae6ea442c&DisplayLang=en

It looks pretty good:

See:

http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx

Next Page »

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.