When we converted from TFS 2008 to TFS 2010 everything seemed fine. But then I created new build definition and got this error:
The path XXX
OK, I talked to IT who made the setup and they told they changed Build agent Working directory to
$(BuildDirectory)\$(BuildDefinitionPath)\$(BuildDefintionId) (added BuildDefinitionId).
When we tried to reverse it back we got the same error message for old converted builds, the new one started to work. Going back and forward, trying to clear workspace with tf.exe command we couldn't resolve it. Either one or another build failed.
Finally, I asked him to change Wokring Directory to some completely new folder, suspecting that we had conflict with some old settings in workspaces that we could not clean. And it helped. So, we may still have some old settings somewhere, but changing working folder to new one we had clean start and it's working so far.
Discovering .NET
Here I will post problems I and my colleagues met and solutions we found.
Wednesday, June 30, 2010
TFS 2010 build machine workspace issues
Tuesday, June 29, 2010
Reporting Services and Web farm
So, we switched to using Microsoft Reporting Services instead of Local reporting. However we had one issue with our configuration. We have our web site running in a farm with two servers with NLB implemented. Also, we have one server where we have our Reporting Services running. Since reports not that critical for our application, we decided just to have one server for that.
What we found though, is very often we got this message: ReportServerException: Execution 'uj2yx4bxgzfvwsvegkwuex45' cannot be found (rsExecutionNotFound)
While first googling suggested problems with timeout, I was pretty sure it's not the issue, and started to google specifically for this error and load balancing.
What we found out is that Reporting Services create some session to handle subsequent requests. Since we have cluster, those requests come from different servers. The problem though is that in our configuration requests came from different users, particulary
Our solution was simple, we configured our web site to run under dedicated user, the same for both instances.
Here are links that helped me:
http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/1eb12568-bfea-4e4e-bd09-1f09b055c595
http://www.andypotts.com/Blog/2009/03/30/rsExecutionNotFoundWithReportViewerInALoadBalancedReportingServicesEnvironment.aspx
Tuesday, April 13, 2010
Simple way of editing enumerators using ComboBox in WPF
Here is the simple way of setting ComboBox for editing values of some enum type.
I would not use in application for production, since it's not localizable etc. But when I need to quicky write some testing application, it works perfect.
First, put this to your resource section:
<Window.Resources>
<ObjectDataProvider
MethodName="GetValues"
ObjectType="{x:Type sys:Enum}"
x:Key="keyName">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="a:enumType" />
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
</Window.Resources>
Then, in your combobox use it like this:
<ComboBox ItemsSource="{Binding Source={StaticResource keyName}}" SelectedItem="{Binding propertyName}">
Friday, February 12, 2010
Get Reflector Pro Beta
If you google Reflector and the open cached version of the page, you can download Beta version of Reflector Pro that integrates with Visual Studio. I assume it will be released soon for money.
Monday, November 16, 2009
ReportViewer control from Microsoft
Recently we needed to add reporting capabilities to our web site. We had following requirements
- All standard requirements for report designs, they are pretty much the same everywhere.
- Ability to share report designs between web and desktop applications.
- Export to PDF and Excel.
- Royalty free.
We decided to try Microsoft Report Viewer control from VS 2008. And we started with web. Also, we have our "Data Access layer" which produces data as lists of objects, no direct access to the database. There is some logic involved in building these data both in database and in .NET.
You can find what report viewer control can and cannot do anywhere, what surprised me is the way it's done.
First of all, we didn't use Reporting Service, we used LocalReport.
- LocalReport uses a lot of memory. To give you an idea, we used set of data with about 50,000 records. It took about 16Mb of memory for the data and then it took about 200Mb to prepare report in PDF. It was much worse for Excel, 500Mb. We tried to add/remove sorting from rdlc template - 100Mb difference. This was exporting reports without using ReportViewer control itself.
- Then we tried to use ReportViewer web control. The problem here was that it uses about same amount of memory from sessions. OK, it doesn't make much sense to prepare such reports in "on-demand" mode. Still it took about 20Mb for 3000 records. This is just terrible
- Not only control uses session, it leaves objects in session when rendering is done and we clear the list of data sources.
- Export to Excel is supported for Office 2003, not 2007
- Not an issue, but everything is copied in two namespaces, WinForms and Web. Why not to reuse LocalReport?
So, what we are going to do next? First of all we are going to try to use Reporting Services. I expect it to be little bit tricky since we still don't want to use direct access to the database, but use our Data Access layer, but it seams doable. When using Reporting Services ReportViewer control supposed to be able to work without using session.
Second, we will break batch reports into multiple files. Having grouping and sorting in mind, this two will require some additional efforts.
I will report how this is going.
Wednesday, November 11, 2009
Changes in the direction of this blog.
I didn't post for a long time. One of the reasons for that is that I became less of a programmer and more of... I would like to call it an application architect.
Different people may define "architect" differently, nevertheless, the point is that I may have more thoughts about development of software, which I want to put in writing. So, there will be some "offtopic" posts.
Wednesday, June 24, 2009
This element is not currently associated with any context
When debugging WCF you can see this exception. Some people advice to just disable stop on exception But it's useful feature.
The better is to go into details of this dialog and disable just this specific exception. The only small problem is that it's not in the list. But it's really a small problem. You can add it.
Just press "Add..." button, choose "Common Language Runtime Exceptions" from the drop down list and type the exception type, which is System.Configuration.ConfigurationErrorsException. Now you can disable stopping on just this exception and not all of them.