Team System Bug Entry Webform for ASP.NET

A common request for ASP.NET projects that are using Team System is to have a "new bug" webform. This way, customers or users have a way to get their bug submissions directly into Team System.

I whipped up a quick little "hello world" demo of an ASP.NET webform that connects to Team System and enters a bug on behalf of the user. It's a single page plus a configuration section, with some basic error handling logic in case something goes wrong.

Download the Visual Studio 2005 solution (7kb)

It's intentionally simple as is, but you could easily extend it to add more complex work items with attachments, and so forth.

The web.config looks like this:

<configSections>
  <sectionGroup name="TFS">
    <section name="Server" type="TFSConfigurationSection, TFSWebDemo"/>
  </sectionGroup>
</configSections>

<TFS>
  <Server server="http://tfsserver:8080" userName="username" password="password" domain="domain" project="projectname" />
</TFS>

Be sure to edit this to select the right server, user, and project. Note that you may need to grant permission to the 'C:\Documents and Settings\Default User\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache' folder for the user specified in web.config. Or at least, I did on our web server.

posted on Monday, April 09, 2007 12:17 PM by jatwood

Comments

# re: Team System Bug Entry Webform for ASP.NET

You should be able to avoid having to grant permission to that directory by setting a WIT-specific configuration property your web.config under appSettings:
<add key="WorkItemTrackingCacheRoot" value="D:\Data\Cache" />

This will create the WIT metadata cache in the specified directory instead of the default. You'd still have to make sure the ASP.NET user has access to the new directory, so I'm not sure how much of a win this setting is. Also, I believe you must have SP1 of TFS if you want to use this setting without bugs in an ASP.NET app.

Naren's blog has a good post about this:
http://blogs.msdn.com/narend/archive/2006/07/29/682032.aspx
Monday, April 09, 2007 2:09 PM by Ben Pryor

# re: Team System Bug Entry Webform for ASP.NET

How would you set it up so as not to expose a password in the config file?
Tuesday, April 10, 2007 6:02 AM by joe

# VSTS Link - 04/10/2007

Brian Harry on Cool work item add-on. David McGhee on TFS lock checking. Paul Hacker on Cool WorkItem...
Tuesday, April 10, 2007 11:02 AM by Team System News

# re: Team System Bug Entry Webform for ASP.NET

A smoother alternative would be to install IEeee!, available here http://blogs.msdn.com/ukvsts/archive/2007/03/03/ieeee-has-been-updated.aspx.
Monday, April 16, 2007 7:30 AM by Vlad Iliescu

# Anothr feed track -Team System

One new subscriber from Anothr Alerts
Sunday, January 13, 2008 6:15 PM by anothr user