.net

Need MD5 hash for an in memory System.Drawing.Image

The title says it all. ...

Adding a Byte[] to a datarow

I'm trying to write a test that returns a data-reader with one of the columns being a byte[]. I figured I can create a datatable and create a reader from that. var cboTable = new DataTable("CBOTable"); var colValue = new SqlBinary(ASCII.GetBytes("Hello This is test")); cboTable.Columns.Add("ByteArrayColumn"); cboTable.Rows.Add(colValu...

"...ambiguous in the namespace..." errors when compiling VB.NET code

I'm getting a ton of errors like this when attempting to build an empty VB.NET project: 'GenerateCodeAttribute' is ambiguous in the namespace 'System.CodeDom.Compiler' Is this some problem with my .NET installation? Thanks ...

publish rdlc files in .net web app?

We have a web site that uses rdlc files to show some reports, but when I publish the website within visual studio these files are not included. how do I add these files to the publication? is copying these rdlc files to the publication secure? thanks ...

Walk folder tree, bottom up

I'm looking for ideas for fast and effective way to walk through folders bottom-up using C#/.NET 3.5 for example: -0 --1 ---12 --2 ---21 ---22 ---23 first walk though: 12,21,22,23 then: 1,2 Thanks ...

Should I block even when I'm sequentially processing

I have a windows service that periodically needs to do some work. So I set up a System.Timers.Timer to do this. Lets assume that its possible that the processing time could be greater than the timer interval. Lets also assume it would be a very bad thing if this happens. To avoid this I'm setting the AutoReset on the Timer to false and...

Dynamically Adding Application Settings in a WPF Application

I have a WPF application that loads different client data based on a setting in a random config file on the machine. I use the client ID read from this config file to load data from a different folder within the application. The data includes a Sql compact database, Images, Videos, etc. The content in the application will change based on...

Is it possible to determine what language a .NET assembly was written in?

Is there a method to determine the original language of a .NET assembly if the source code is not available? ...

How do I calculate someone's Age?

Possible Duplicate: How do I calculate someones age in C#? How do I calculate someone's age in C#, if I have their Birthdate and today's date? ...

Are there any major pitfalls using PostgreSQL as a replacement for SqlSever

I'm just looking at the possibility of using postgresql as an alternative to sqlserver for a .NET web app. (as a cloud hosted sqlserver costs an arm and a leg once the size of your data is over 20GB or so) so really looking for something with reasonably good performance that can hold a lot of data. However, I'm not entirely sure wha...

Passing by reference and using ref

I looked at the similar questions and read some articles. THis article has some pictures which makes it clear. SomeObject so = new SomeObject(); somefunction(so); Console.write(so.x); // will print 1 SomeObject so1 = new SomeObject(); somefunctionByRef(so1); Console.write(so1.x); // will print 1 static void somefunction(SomeObject s...

what is the java's servlet equivalent on .net

hi, Please let me know what is equivalent of servlets in .net. The purpose of my question is to write a servlet or whatever it is on .net which just sends me a file when that URL is called. ...

Process.Start Performance

I've scoured the internet and this site in search of an answer to my problem to no avail. I'm completely out of ideas and desperate for answers! The issue: When I run a specific processor intensive executable from a .NET environment (using Process.Start()), the process takes upwards of five minutes to complete. In contrast, when I run ...

XML Serialization of the default values of optional attributes

I have a set of classes build using xsd.exe, and I am trying to serialise them. However, an attribute is not being included in the resulting XML. Here is part of the schema where the problem lies. <xsd:element name="Widget"> <xsd:complexType> /* sequence removed for brevity */ <xsd:attribute name="Version" type="Vers...

Managing WinWord document content for badges printing application. Best practice

I have to generate winword document for badges printing application. Basic scenario is the following: User selects employees from list, click "print badges", winword appears to allow user make some editions before printing. Badges should be represented as table with some columns. Every table cell has image background (badge), some text...

How to use .NET PerformanceCounter to track memory and CPU usage per process?

http://msdn.microsoft.com/en-us/library/system.diagnostics.performancecounter.aspx ...

WCF Username/Password Prompt

This is kind of a dumb question, but I can't seem to find the answer on google. I'd like to protect my REST enabled WCF service WSDL with https username and password logon (like my Linksys router prompts me to enter when I navigate to 192.168.1.1). I'm already using a BasicAuthenticationRequestInterceptor with the WCF Rest Starter Kit....

.Net Compact framework's httpwebrequest works differently than the complete .Net Framework ?

Hi, I am developing a Windows Mobile 6 application on the .Net Compact framework 2 platform. I am trying to develop a http client which communicates with a normal tcp server. When I open the request stream with HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("http://10.108.10.57:8001/"); System.Net.ServicePointManager.Expect100Co...

"Gracefully" killing a process

Right now I am using Process.Kill() to kill a process. Is there a way though, instead of just killing it immediately, that I can like send a message to the process instructing it to close so that it can gracefully clean up and shut down. Basically, I'm looking for the equivlent to just clicking the red X in the upper right hand corner, w...

Extracting private key from a strong name file?

As the title states, does anyone know how to extract the private key from an snk file? We want to use the private key from the StrongName for encryption purposes. I read in: http://msdn.microsoft.com/en-us/library/k5b5tt23(VS.80).aspx that sn -o key.snk will extract both the private/public key if they exist in the file but i tried it and...