Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

How To Change TFS 2010 Attachment Size

, 21 Jul 2011
Rate this:
Please Sign up or sign in to vote.
CodeProjectHere is a post from 2008 on how to change attachment size in TFS 2008, the same concept is available in 2010 but there is a small confusion about 2010. Many people had problems changing the attachment size in TFS 2010 using the same web service because the following error: 500 Internal S

Here is a post from 2008 on how to change attachment size in TFS 2008, the same concept is available in 2010 but there is a small confusion about 2010.

Many people had problems changing the attachment size in TFS 2010 using the same web service because the following error: 500 Internal Server Error

image

There where people who changes the attachment size using code:

TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(
    @"yourtfsserver/.../DefaultCollection");
ITeamFoundationRegistry rw = tfs.GetService<ITeamFoundationRegistry>();
RegistryEntryCollection rc = rw.ReadEntries(
    @"/Service/WorkItemTracking/Settings/MaxAttachmentSize");
RegistryEntry re = new RegistryEntry(
    @"/Service/WorkItemTracking/Settings/MaxAttachmentSize", "20971520");  //20MB
 
if (rc.Count != 0)
{
    re = rc.First();
    re.Value = "20971520";
}
rw.WriteEntries(new List<RegistryEntry>() { re });

But the only thing you had to do in order to change the attachment size in TFS 2010 is to change _tfs_resources to the collection name, as follow:

http://localhost:8080/tfs/_tfs_resources/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx?op=SetMaxAttachmentSize 

TO:

http://localhost:8080/tfs/<CollectionName>/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx?op=SetMaxAttachmentSize

Enjoy

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

Share

About the Author

Shai Raiten
Architect Sela
Israel Israel
Shai Raiten is VS ALM MVP, currently working for Sela Group as a ALM senior consultant and trainer specializes in Microsoft technologies especially Team System and .NET technology. He is currently consulting in various enterprises in Israel, planning and analysis Load and performance problems using Team System, building Team System customizations and adjusts ALM processes for enterprises. Shai is known as one of the top Team System experts in Israel. He conducts lectures and workshops for developers\QA and enterprises who want to specialize in Team System.
 
My Blog: http://blogs.microsoft.co.il/blogs/shair/
Follow on   Twitter

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 21 Jul 2011
Article Copyright 2011 by Shai Raiten
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid