Geeks With Blogs

Michael Freidgeim's Blog MS .Net Development January 2009 Entries
Display content of page in a modal dialog- consider jqModal.
I need to show popup info message with single close button, but content is located in separate html file. The current implementation using window.open not working for many users with popup blockers. My question is which tool/framework should I use. Initially I considered to use UFrame (see CodeProject article:UFrame: goodness of UpdatePanel and IFRAME combined )inside ASP.NET AJAX ModalPopup. Then I found question http://stackoverflow.com/qu... ......

Posted On Monday, January 26, 2009 11:53 AM

Windows Workflow: Concatenate all parents QualifiedNames- instead of call stack
MSDN Debugging Workflows tells that The entries in the Call Stack window are a depth-first search of executing activities. You can double-click an entry to put focus on the selected activity.-It doesn't work for me. The text on stack trace is not meaningful, when activities are described. > codeRaiseEvent_ExecuteCode(... sender = {codeRaiseEvent_CAGPNRIterate [System.Workflow.Activities... System.EventArgs e = {System.EventArgs}) Line 671 C# System.Workflow.ComponentMo... ......

Posted On Friday, January 23, 2009 10:55 PM

Code reviews and coding recommendations
We don't have code reviews, but sometimes I have to tell the team quite obvious coding recommendations. There are a few examples: 1. We should do the check if array element is available before access it: E.g. BAD: string departureCity = Flight[0].StartPoint; GOOD: if (Flight.Rows.Count <= 0) { WarningMessageEvent.Raise("... <= 0"); return; } string departureCity = Flight[0].StartPoint; 2. Keep separate functionality in small functions, rather than add morre code to existing functions, ......

Posted On Thursday, January 22, 2009 8:58 PM

Logging application block-how configure different listeners for different level of message.
I've asked on codeplex EntLib forum logging application block-how configure different listeners for different severity? and AvanadeSupport gave me the answer to use "Filter" property of the tracelistener. MSDN Source Schema for the Logging Application Block documents listeners Child Element (loggingConfiguration)/add Child Element Now I am able to make configuration like the following <loggingConfiguration name="Logging Application Block" tracingEnabled="true"> <categorySources> <add ......

Posted On Sunday, January 18, 2009 2:24 PM

Error: "Autogrow of file in database was timed out"
We've had an error Autogrow of file 'MyDatabase_dat' in database 'MyDatabase' was cancelled by user or timed out after 30078 milliseconds. Use ALTER DATABASE to set a smaller FILEGROWTH value for this file or to explicitly set a new file size. I was able to fix the issue using: ALTER DATABASE MyDatabase MODIFY FILE ( NAME = MyDatabase_dat, size=5000MB) We should follow the best practices from MSDN article "Considerations for the "autogrow" and "autoshrink" settings in SQL Server" In particular, use ......

Posted On Sunday, January 18, 2009 11:26 AM

Developers should avoid smart-quotes in Word
We had a Word document, describing steps, based on MSDN instructions Use the Windows Workflow Tracking Service I desided to create batch file createWorkflowTrackingDB.bat to create Database: @echo Change name of Database server if required @echo press control-Z to stop batch @pause sqlcmd -S localhost -E -Q "create database WorkflowTracking" c: cd "C:\WINDOWS\Microsoft.NET\F... Workflow Foundation\SQL\EN" sqlcmd -S localhost -E -d WorkflowTracking -i Tracking_Schema.sql sqlcmd -S ......

Posted On Wednesday, January 14, 2009 8:59 AM

Specify Expect100Continue=false in Web Service client.
The Web Service Provider that we are using recommends NOT send Expect100Continue header. The specifying static value System.Net.ServicePointMana... is not good, because some other providers may prefer to use the header. In the haacked's "HttpWebRequest and the Expect: 100-continue Header Problem" post comment of Mirronelli Jun 02, 2005 6:22 AM suggest to specify webRequest.ServicePoint.Exp... = false; for each webRequest. If I am using web service(derived from ......

Posted On Tuesday, January 13, 2009 11:47 PM

SSIS import from Excel to SQL table doesn't like empty lines
I had a task yo import data from Excel spreadsheet to SQL Server table. Last time I tried to use SQL Server Management Studio import option, but it gave me some not clear errors, that I didn't understand. So I've created SSIS project in VS and was able to narrow down the errors and import the data. This time for similar spreadsheet I had some errors again. The output contained the warnings about length of the string column, that usually can be ignored, e.g.: Warning: 0x802092A7 at First Task, Destination ......

Posted On Friday, January 9, 2009 11:55 AM

"Edit and continue" not working in functions with LINQ
I've started to use LINQ and feel that query expression are very powerfull. Unfortunately , when in debugger I've tried to Edit and continue, it gave me an error Modifying a 'method' which contains a query expression will prevent the debug session from continuing while Edit and Continue is enabled. The post Orcas - Edit and continued not working when linq used - MSDN Forums explains that "it is a limitation of the environment in which Edit and Continue operates". I've submitted suggession to MS - ......

Posted On Wednesday, January 7, 2009 10:25 PM

Function to Convert ASP.NET bool to JavaScript bool.
I was generating some JavaScript in the server code and found that bool.ToString() doesn't create string that JavaScript expects as boolean- .Net uses first letter as capital True/False. Then I found in my own class, that I've wrote helper function a long time ago: public static string JSToString(bool bValue) { return bValue.ToString().ToLower(); } ......

Posted On Friday, January 2, 2009 1:48 PM

Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net | Join free