.net

with a running .net windows services, how to find out without stopping the service why it use so much memory?

The service was compile with no trace/debug constant and no debug info. How would you inspect the memory usage of that windows services? ...

Investing in competency building for Microsoft Azure and related technologies?

A couple of questions around investing about competency building for Windows Azure. How glorious and revolutionary the platform is. How partners can add value to customers by using Azure. Expanding a little further on my question, there are 2 players in enabling a cloud model for an application The hosting services provider (Micro...

Find Which asp.net Component has Focus

Is there any way to find out which asp.net component has focus by using a server or client script? ...

Trouble loading a C# app on another machine with .Net 2.0 service pack 2.

I'm not really a C#/.Net developer, but I've been asked to solve an issue we are having. We have a small command line app in C# that has been working and recently ran into trouble. On my machine I can build and run it, but when I try to run it on some of our servers it fails. I looks like it fails on the ones that have .Net 2.0 with serv...

How should communication be done n-Tier applications between layers?

Recently I have been debating on the best way to handle communication up the chain in n-tier architecture. Currently the methods I am doing is throwing and handling exceptions between layers for errors, and using events/delegates for other communication (to update progress bars and such). Are these the best way or is there another metho...

How do I elegantly handle using a PasswordBox in WPF?

I'm aware that you can't Bind to PasswordBox.Password in WPF. How do I handle a form that contains one? All other controls on the form are bound to properties on a business object, but I have to manually set and retrieve a password property whenever the input changes. I know that others have created custom controls that allow binding to...

Print .net coordinates units

Hello, please help me. I want to print some reports from .NET app. I read how to use PrintDocument class and Graphics object to draw my report. But i don`t know which units are used in methods, for example: Protected Overrides Sub OnPrintPage(ByVal e As System.Drawing.Printing.PrintPageEventArgs) MyBase.OnPrintPage(e) Dim g A...

Reference assembly located on Network Share in ASP.Net

Where I'm at we have a large number of programs that can run that all use features from a set of assemblies located on a network share: things like writing to a common systems log, DB connection strings, some common business objects and functions, etc. We like this setup, because it makes it easy to deploy bug fixes and new features: ju...

.NET - Windows Azure Queue question - background work on the queue

First let me say, I'm just starting to get up to speed on the Azure platform. I understand how in the Azure Queue model a web interaction could put something in a queue and a later interaction could process it. But... What is the equivalent of a "Windows Service" in the Azure world? What if I just wanted something in the background to ...

Is Active Directory transaction-aware?

Hi, Simple question but I can't find the answer anywhere: is Active Directory transaction-aware? In other words, will the following change be rolled back (since I didn't call scope.Complete()): using (var scope = new TransactionScope()) { DirectoryEntry entry = ...; entry.Properties["givenName"].Value = "New Given Name"; e...

C#: Is it possible to store a Decimal Array in an SQL database?

Hi there, I'm working on an application for a lab project and I'm making it in C#. It's supposed to import results from a text file that is exported from the application we use to run the tests and so far, I've hit a road block. I've gotten the program to save around 250 decimal values as a single-dimension array but then I'm trying to...

How to initialize an array of arrays (or jagged array) using CodeDom ?

I'm trying to use CodeDom to generate C# (.Net 2.0) code that would do the following: int[][] myArray = new int[someSize][]; In CodeDom, initializing an array requires a CodeArrayCreateExpression. The MSDN says: If a language allows arrays of arrays, it is possible to create them by nesting a CodeArrayCreateExpression within a Cod...

WinForm Calendar. Is there a freeware one?

I'd like to display a month calendar with items on the calendar, much like Outlook's month view. I see that there is a ASP.NET calendar but is there nothing for WinForms? I don't want just a small drop down list date selection control. I'm looking for something like this ...

Generating Comma Separated Values

Suppose I have a collection of strings: "foo" "bar" "xyz" And I would like to generate a comma separated values from the list into something like: "foo, bar, xyz" Notice the lack of ", " at the end. I am aware that there are dozens of ways to generate this: use for-loop and string.Format() or StringBuilder. use integer counter a...

Stream.Dispose or stream=null?

I've have some code similar to this: HttpWebRequest req; HttpWebResponse response; Stream receiveStream = null; StreamReader readStream = null; try { req = (HttpWebRequest)WebRequest.Create("someUrl")); req.Credentials = CredentialCache.DefaultCredentials; req.Method = "GET"; response = (HttpWebResponse)req.GetResponse...

Securing Elmah in ASP.NET website

I am having trouble trying to secure ELMAH. I have followed Phil Haacked's tutorial, with the only difference being the demo project is a web application and my project is a website. <add verb="POST,GET,HEAD" path="/admin/elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" /> <location path="admin"> <system.web> ...

Adding mock data to WebBrowser control

I am creating a WebBrowser control webBrowser = new WebBrowser(); webBrowser.Navigate("File.html"); The file has the HTML markup for the page. I have some mock data which I want to insert in the html file. Is there a way to do that ? The mock data binds with the controls on the html file. ...

Is it possible to build a .NET assembly callable from a native assembly writing in C# alone without using COM?

Is it possible to build a .NET assembly callable from a native assembly writing in C# alone without using COM? ...

sendasync (smtpclient) when using the token is sent byval and not byref?

it seem, after looking with reflector, that the sendasync(smtpclient) with the object token in the parameter of the function is byval does it make sense to try to release the attachment in the callback function? everywhere people(myself included) seem to do sendasync(mailmessage,mailmessage) and in the callback(SendCompletedCallback) ...

Data binding not updating.

I created a simple example with data binding (unfortunately we have a similar case in our system). I created a funky combo box: public class FunkyComboBox : ComboBox { private object currentValue = null; public FunkyComboBox() { if (LicenseManager.UsageMode == LicenseUsageMode.Runtime) ...