.net

How to remove "Auth_Password" from ELMAH logs.

For fairly obvious reasons, I would like to identify the best way to remove the Auth_Password from being captured by ELMAH. What is the best way to go about doing so? ...

How do I sort hierarchical data in WPF?

I am creating a menu that will have its menu items injected into it from different modules (I am using the Composite Application Library: Unity, Prism). Example: File - Open - New - A (injected from ModuleA) - B (injected from ModuleB) - C (injected from ModuleC) - Exit Because I don't know which items will be injected, I need...

Authenticating Windows users in Java server

I'm working on a server written in Java, and a client (a desktop application written in .Net) that runs on Windows machines on the same network. I would like to have some basic authentication so that the server can determine the username of the user running the client, without needing the user to re-enter their Windows password in the c...

Best way/technology to implement a generic archive process

We are looking to retire old data in out Oracle warehouse. To give a very simplified overview, a proposal was suggested to develop a process using PL SQL Stored Procedures that, given source/dest table, etc., parameters, use the Oracle ALL_TAB_COLUMNS view to construct a target table that mirrors the source table. If the dest table ex...

Reporting tool for OLAP, *not* OLTP!

I'm looking for a control that I can put on top of an already existing OLAP star schema to allow the user to define their own "queries" and generate reports. Right now I have some predefined reports built on top of the cubes, but I'd like to allow the user to define their own criteria based on the cubes that I've created. I've found lo...

Windows Services Not Logging To Event Log

Hi All, I have a windows service that fails to start under some circumstances. When it fails to start the sequence of events suggest that my .NET code in the service has probably run, but no event log messages appear. Event log messages show up when the service starts properly. How does the event log work? And how does the windows ser...

Possible to convert IQueryable<Derived> to IQueryable<Base>?

I know about covariance, and I know that in general it will not be possible in C# until v4.0. However I am wondering about a specific case. Is there some way of getting converting IQueryable<Derived> to IQueryable<Base> by somehow creating a wrapper class that does not actually perform a query, but can actually "pass through" a .Wher...

querying for dns aliases

I found some code from the msdn site (Code included below), which looks like it will return all dns aliases for a given server. I've implemented the code in a cosole app, which should allow me to enter the host name of a server and it should return all dns alias names. I enter the host name of a server in our domain known to have alias...

Having trouble doing an Update with a Linq to Sql object

Hi folks, i've got a simple linq to sql object. I grab it from the database and change a field then save. No rows have been updated. :( When I check the full Sql code that is sent over the wire, I notice that it does an update to the row, not via the primary key but on all the fields via the where clause. Is this normal? I would have ...

How do I write 'PAGE DOWN' into the console input buffer?

I need to programmatically send a Page Down key press to a console application and I'm lost. I tried Console.SetIn whith a StreamReader over a MemoryStream, then wrote 34 (Page Down in ConsoleKey enum) and nothing happenned. ...

How to get Process in windows mobile

Hi, i want to get the running process in .net compact framework windows mobile.. i want to kill the running process.. but i know process.GetProcessesByName() function is present in desktop, but for mobile its not supported i think so.. please let me know how to kill the presently running process in c# windows mobile. Thanks ...

How do I pass arguments to a Thread in .Net

I have function along these lines: public void view(string msg) { messagebox.show(msg); } . . I want to pass arguments to this it from a thread.. I'm using .Net 1.1. How can I do this? ...

How to handle Server not responding Exception in asp.net mvc?

How do i simulate and handle the server not responding error? And which case do u think it might occur, as when u request a page from the server and if its not responding wouldnt it throw page cant be displayed error? ...

Multiple Add in IE

In asp.net using C#.net in back end, after click on Add I am adding the stock and closing the window (which I have opened using window.open) using Javascript. Although this works well in other browsers, [in MSIE] if I keep clicking on the Add button it adds multiple stock entries. This is really weird behaviour. Any idea on how I can o...

How can I specify the character encoding to be used by OLEDB when querying a DBF?

Is it possible to specify which character encoding should be used by OLEDB when querying a DBF file? A possible work-around would be to encode the query string before the OLEDB call to the DBF file's character encoding and then encode all the results when they are returned. This will work but it would be nice if OLEDB or possibly ADO.N...

Multi language testing framework

I need to write two versions of the same application, one in .NET and the other one in Java. So I'd like to write a single test suite, and then use it against both codebases. Which testing tool would you advise me to use? ...

writing files to Common Application Data folder denied

i have used the follwing function to write data to user application folder private void WriteToLog(string source, string method, string msg) { string LogFile =Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\test"; LogFile = LogFile + "\\Log.txt"; StreamWriter sw = new StreamWriter(LogFile,...

How-To: Auto-Restart Console App. in .NET.

Hello there, any ideas of how to auto-restart (restart) Console application in .NET ? I know that forms application have something like this: Application.Restart(); but this is not possible for Console. Also, NOTE: The problem is, that I can't start two instances of the same app :) ...

Space in a .NET string returned by string.Format does not match space declared in source code - multiple representations?

String returned by string.Format seems to use some strange encoding. Spaces contained in format string are represented using different byte values compared to spaces contained in strings declared in source code. The following test case demonstrates the problem: [Test] public void FormatSize_Regression() { string size1023 = FileHelpe...

Pass Data In Memory from PHP to a .Net Program

How to pass data in memory from PHP to a .Net program? I will use Process to call the php.exe, and pass in the script name (*.php) and the arguments. The issue now is how do I pass back the data, from the PHP to the .Net? Specifically, I am looking at the manner in which PHP can pass out the data so that .Net can intercept it. The .Net...