.net

ASP.NET Profile Data Cached?

Does the ASP.NET SQL Profile Provider use caching? I mean if I pull data from the profile for a user will it hit the DB for each request? I'm looking for a setting or any information on this. I had thought I read it would use cookies but I can't find this now. Edit: http://msdn.microsoft.com/en-us/library/aa478953.aspx describes proce...

Xml DeSerialization from an internal node

I'm working on getting my .net object serialized\deserialized. As a requirement for our XML files, the object must be inside a master node named "MyCompany", here is an example for the file: <?xml version="1.0" encoding="utf-8"?> <mycompany> <station> <serial>VAA008090067</serial> </station> </mycompany> I'm running into an i...

How to handle a lot of controls on a Form?

I am wondering how to handle a Form with a lot of controls. Do you stuff all of the handling code into the Form? This is how I have been doing it, but my most recent project is getting out of hand because of all of the controls that I need to work with. I have menus, multiple toolbars, tabcontrols filled with controls, statusbar, ... ...

Is there a way to make fxcopcmd to always return 0 ?

Hello everyone ! I would like to use fxcop in a continuous build, and almost every class in my project are analysed, but there is some exception (assembly load) and it makes the fxcopcmd exit with error code 8. So the continuous build fails, because of this error code. I want the build to finish, so that i can present all the results, ...

"Request is not available in this context" in a IHttpModule

Hi, I'm getting that exception when I try to access the HttpContext.Current.Request object. I've seen the responses in l1, l2 and l3 ... so... my question then is : For what in the world are IHttpModules now for? I wanted to develop a module that gets hit every time a call enter to may website, so I can log the url accessed, the use...

C# TCP Socket "Blocking" Property Inconsistency

I use a tcp socket in the following way: m_socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); m_socket.ReceiveTimeout = 15; The general flow is that I run the m_socket.Receive in an infinite while loop and at some point the socket becomes empty for a long period but I don't want to close it. Instead I...

problem Accessing .NET DLL resources with res editor

Hello guys, Simple question : why can't I see any resource from my EXE ? compiled in c#, VS 2005, source files contain many .resx files... but so far I can't access them with any resource editor Any hint ? ...

How to get a Wix installer to update an app.config with bindingRedirects

I have a Wix 3.0 project that installs some .Net assemblies into an existing application. As part of the installation, I need to update the application's config file with bindingRedirects so that the correct assembly versions are used, e.g., <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> ...

Changing the default culture info of my Application

Hi, Each thread inherits the default Windows culture unless you change it by accessing the current thread through services provided by the System.Threading namespace. Do you know if it possible to change the default Application culture info instead of setting eac new thread with the culture info of its parent. Thanks! Ronen ...

Escape + (plus) in URI

When user enters an e-mail on my web site, I send an e-mail verification e-mail that contains a link. Link looks something like: http://mysite.com/[email protected]&amp;token=12341234 This particular user's e-mail contains '+' (plus), so link looks like: http://mysite.com/[email protected]&amp;token=...

How do I quickly search for data stored in an XML file within a large number of directories?

A project I have been working on for the past year writes out log files to a network drive every time a task is performed. We currently have about 1300 folders each with a number of files and folders. The important part here is that we have about 3-4 XML files on average within each folder that contain serial numbers and other identifyin...

retrieve a file through .net webservice

In .net web services is there a way where the file name can be sent in the SOAP request and the service returns the File itself as attachment in the SOAP response. I was thinking if the file can only be returned as a filestream object or some sort of .net I/O related object but not as an attachment. I was asked to check if this can be do...

Why are referenced assemblies locked?

I have 2 assemblies. Assembly2 is referenced by Assembly1. Why is Assembly2 locked? I thought the whole assembly is loaded into the RAM by the JIT-Compiler, isn't it? How does the machinism work when a referenced assembly is called? ...

Winforms: Open a second modal dialog in an already open modal dialog

I have an open modal dialog and open again a modal dialog from this dialog (with ShowDialog) The problem is now that the parent modal dialog is not locked and when I click on it the second modal dialog, it moves to the background. When I close the first modal dialog, the second one still remains on the desktop. How can I prevent this beh...

High-performance .NET sweep/oscilloscope graph component needed.

I'm searching for a .NET graph component. It should be able to plot data in sweep (oscilloscope) mode and if possible also as a scrolling waveform. On the x-axis I want timestamps (e.g. 18:25:00) and it should be possible to plot two vectors (DateTime[] and double[]). That is, data points are not equally spaced, but come with their own t...

.NET date formatting

Consider: Assert.Equal("11 Aug 2010", date.ToString(???); Somehow ToString("d MMM yyyy") outputs "11 aug 2010". How can I make it to be Aug instead of aug? ...

Can MEF be used to get the System.Type of classes marked [Export]?

I've been successfully using MEF to obtain exported class instances. However, I came across a situation where I need to enumerate a set of exported derived classes without instantiating them. I've looked up CompositionContainer's documentation and it only seems to be able to return object instances. I know I could have a static Type fie...

Specific .NET Regex Help

I need a .NET Regex that extracts the "field" and "width" values in the following string: <element attribute='{field}' attribute='{field,}' attribute='{ field }' attribute='{ field, 0 }' attribute='{field,0}' attribute='{ field, 10 }' attribute='{field,10}' attribute='{ field, 100 }' attribute='{field...

How is the CountPerTimeInterval32 performance counter type used to measure the average rate of events per minute?

I need to measure the rate an application event which is occuring with a frequence bellow once per sec. Can this be achieved using the CountPerTimeInterval32 counter type and if so how? If not, what is the best type of performance counter to use to measure infrequently occuring events? ...

What type is this: ISNULL(SUM(COALESCE (a.currency, 0)), 0)

I have the following piece of sql query: Sql += " SELECT ISNULL(SUM(COALESCE (a.currency, 0)), 0) AS monthCurrency FROM IW_Awards AS a "; The query works fine, I am trying to cast this value in C# after the query has been submitted and I cannot find what type it is. I tried int, int? and string. When I trie...