November 2008 Entries

Do not pass data between static methods using static data members.

In one of static class in our application, I found local static members that were used to pass data between calls of static methods. It’s wrong and can cause errors that are intermittent and very hard to reproduce. The problem will happen if the same code executed for 2 users simultaneously. In this case value for one user could be used for the second user and result will be unpredictable. The code was similar the following: public static class HelperClass { private static string _dataToPass = ""; ......

Attempt to get Visio Class Diagrams from VS XSD files.

I wanted to have a diagram from .Net Dataset (stored as XSD) and include elements from XSD generated from WCF service. I found that is not supported by MS tools. Dataset Designer doesn't have any export facility.XSD files generated from WCF service, do not have any graphical interface at all. I ended up with manually drawing in Visio objects used by WCF service and merge PrintScreens from VS Dataset Designer and Visio Class Diagram in Paint.Not a nice solution. I've posted a suggestion "Ability to ......

Could not load type 'System.ServiceModel.Configuration.BindingsSectionGroup'

After installing .Net 3.5 SP1 on the existing server, that runs .Net 2.0, I've got the exception: Source : mscorlib Message : An error occurred creating the configuration section handler for system.serviceModel/bindings: Could not load type 'System.ServiceModel.Config... from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934... Filename : c:\WINDOWS\Microsoft.NET\Fr... Line : 100 Errors : ......

SQl Server Management Studio doesn't show new lines in records.

We are storing in the database plain text messages formatted with new lines. When it was required to update the message, my colleague used SQL Server Management Studio to retrieve text in Grid View. The text was shown as one long string without any newline separators. She copied the text to editor, updated it and use SQL Update statement to save the text back to the database row. The problem was that all new line formatting was lost. SQL Server Management Studio didn't indicate new lines and causes ......

Upgrade VS Web Site Project to be VS Web Application Project (WAP)

One of my colleagues wanted to upgrade VS 2005 Web Site Project to be VS 2005 Web Application Project. I pointed him to http://webproject.scottgu.c... Then we had an issue with non-compiling files from OLD_APP_CODE folder-they had Build Action as Content (see http://forums.asp.net/p/106... And now I've read Rick Strahl's post. VS 2008 doesn't have conversion wizard at all. The process has become fully manual-but well described in Rick's post ......

CSS TD element style overrides Table class style.

I've created the MyTableClass CSS class(stored in .CSS file) and specified it to a HTML table. .MyTableClass { font-size: 8pt; } However the size of font inside the table was bigger than I specified. Thanks to VS 2008 CSS properties pane - Applied Rules section I was able to find that the rule was overridden by TD element style TD { font-size: 12px; } It was not hard to create hack to override global TD. .MyTableClass TD { font-size: 8pt; } I feel that having global element rule is not a good idea. ......

TFS Source Control Explorer -no commands shown

We needed to setup TFS for a new user and he had a problem: When open TFS Source Control Explorer , he can see folders, but was unable to run any commands , e.g Get Latest. Trying to find a reason, we gave the new user different security permissions, but it didn't help. Finally I suggested to check in VS Tools/Options/Source Control/Current Source Control Plug-in. and ensure that VS TFS is specified. It fixed the problem ......

«November»
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456