July 2008 Entries

DataRow.SetParentRow Method

I've noticed an existence of DataRow.SetParentRow Method. MSDN documentation is quite brief: Sets the parent row of a DataRow with specified new parent DataRow. It wasn't clear does the functions fills foreign key values in the child row from the parent one. Thanks to Reflector, I confirmed, that it does SetKeyValues . Please note that from performance point of view it is important to call SetParentRow first and add the childRow to the child table later ......

Shortkey Alt-B,U is ambiguous in Visual Studio 2008 team edition

In Visual Studio I like to use shortkey Alt-B,U to start build of the current project. However in VS 2008 team edition it doesn't start the build, but just opens menu and waits for extra "Enter" click. The reason is that on the Build menu,there is extra "Queue new build" menu item with the same u shortcut, which conflicts with "Build Project" menu item. The issue reported to MS Connect and they told, that it is fixed in a future release. Is it possible to change alt shortkeys for standard menu items? ......

QuickCode.Net 2008 new TAB shortcut key

QuickCode.Net has a new free 2008 version. UPDATE: in a new release 3.0.6. it's possible to assign any shortcut key. In VS 2008 Customise keyboard I've selected command QuickCode2008.AddIn.Replace... and assigned a shortcut key Alt-Q. It uses <TAB> instead of previously assigned Alt-Q hotkey. <TAB> is consistent with standard VS snippets. If you press the TAB key after your QuickCode, e.g. tc<TAB> the QuickCode will expand. If the same pattern exists in snippets and QuickCode, ......

"Login failed for user" may mean "database name is invalid"

One of my colleagues tried to work with a new database from DevServer and got an error "Login failed for user". We checked everything related to security and permissions, but it didn't help. After a while we recognize that there was spelling mistake in the name of the database in connection string. In this case "Login failed for user" error actually meant "database name is invalid" Why it wasn't shown as a reason in plain English? Other possible reason for the errors are described in multiple articles, ......

Generate C# class from XSD file.

I have an existing C# file, generated a long time ago from XSD definition. The XSD files were changed, and proxy class should be regenerated. I've tried to use XML Schema Definition Tool (Xsd.exe) to generate C# class, but it returned the error: "The datatype is missing". I've actually have two XSD files -outer and imported Thanks to the post: XSD.exe is kicking my butt, man...redux , it pointed me to specify all necessary files on the commandline. Note that name of generated file is combined from ......

Visual studio 2008 "Build action" properties: Shadow and CodeAnalysisDictionary

I've noticed that in Visual Studio 2008 files have additional "Build action" properties: Shadow and CodeAnalysisDictionary. I've tried to find their meaning on Google but without success. Does anyone know,what they suppose to do ......

Disk Cleanup Utility should delete temporary .Net files.

I noticed that one of our servers with low disk space had a lot of security.config.cch files(or security.config.cch.number) in individual user folders, as well as in .Net.Framework config directories. According to the thread http://www.pcreview.co.uk/f... -it seems they are safe to delete. But why they are located in config folder, not in some temporary directory, like NET\Framework\{version}\Tem... ASP.NET Files folders? And they should be suggested for deletion by standard ......

Links:How to save html file to PDF

I want to save html file generated by ASP.NET to PDF. I was pointed to itextsharp open source project. I found a few links, discussing how to do it: http://www.velocityreviews.... iTextSharp Tutorial Chapter 7: XML and (X)HTML iTextSharp Demo(asp.net 2.0):http://rubypdf.com/ite... introduces HtmlParser.Parse.(see the source code here) We tried to use it. HtmlParser.Parse does NOT throw any error , ......

Call Synchronous Web Services Methods Asynchronously

I need to asynchronously call a few web services at the same time. VS 2005/2008 Web services proxy generator creates several proxy class methods , including synchronous MyWebMethod(parameters) and asynchronous pair BeginMyWebMethod(parameters) and EndMyWebMethod(parameters) The way to use Begin/End methods is described in article "Calling Web Services Asynchronously " Even if I am going to use asynchronous method in the real application, for unit testing(including TestHarness ) it is much easier ......

T-SQL not equal WHERE condition excludes records with null values.

I've had a query which expected to return all records except with specified value in the nullable column. Select * FROM MyTbl where (MyColumn<>'ValueToEx... But the query didn't return any records with null values in the column. The correct query to include records with null should have explicit is Null condition like the following: Select * FROM MyTbl where (MyColumn<>'ValueToEx... or MyColumn is Null) Update: I found, that it is a well known problem, discussed in many forums, ......

Visual studio conversion wizard opens each time for converted 2008 solution

I have a big solution in VS 2005 that I converted to VS 2008. However each time when I closing and then re-opening solution, the Conversion Wizard opens again, runs for some time and shows that conversion completed successfully. UPDATE: I finally found the reason of re-running of Conversion Wizard. My solution had some UNLOADED projects, that were in VS 2005 format and failed to be converted. I expected that unloaded projetcs will be ignored , but Conversion Wizard each time tried to convert them. ......

Find which MOM rules use a script.

In MOM 2000 there is no ability to quickly find which rules use the script. I found a script in MOM/Rules/Advanced/Scripts/ ( or alternatively in DB one point Script table) and my question was which rules run the script. Use [OnePoint].[dbo].[ProcessRu... table to find the rules. select * from [OnePoint].[dbo].[ProcessRu... where Idscript='5c4a58cf-709c-4a1... GUID is just example) select * from [OnePoint].[dbo].[ProcessRule] where idProcessRule in ( select idProcessRule ......

View Windows Workflow Tracked Data Tools

For some reasons, it took me a few google search attempts to find the following tools: MSDN includes Workflow Monitor Sample -Windows executable to view details of tracked workflows. When downloaded, copy EXE to your bin directory when custom workflow DLLs are located. Ensure that tracking database doesn't have too many instances, to avoid timeouts. Jon Flanders put together the ASP.NET implementation of the Workflow Monitor SDK sample. MSDN Tracking Samples mostly described how to store tracking ......

Enterprise Library Logging Application Block and Alternatives Links

Overview of to Enterprise Library Logging Application Block and Alternatives Loren Halvorson's comparision of the Enterprise Library Logging & Instrumentation Application Block and Log4Net (Published in 2005) Comments on the EntLib/Log4Net feature and performance comparison (Published in 2005) EntLib v4 has a few performance improvements in Logging Block. Based on quick read I feel that Log4Net and NLog are simple and may be sufficient for small applications. But they seems do not support specifying ......

Profiling Performance of ASP.NET Code Links

Below are a few links that I found about Profiling Performance of ASP.NET Code Code performance analysis in Visual Studio 2008 and Find Application Bottlenecks with Visual Studio Profiler * Tool : VSProfiler - Analyze Performance of Managed Code How To: Use CLR Profiler and Transcript: Profiling Managed Code with the CLR Profiler are talking about CLR memory allocation profiler. - * Auto Performance Tuning in ASP.NET 2.0 process model (processModel) section of machine.config comes with default value ......

«July»
SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789