.net

Brute force a confirmation code?

I have a site and for a user to reset this account a confirmation code is email to them, however, after talking it over, it seems this could be a huge security hole. I'd like to make a small app that I can use and show my boss how unsafe the site is. Basically, the code's length is 12 characters with the last 4 being fixed and it only u...

What is the difference between C# , .NET and CLI?

What is the difference between C# , .NET and CLI? ...

Where does IKVM get it's CLASSPATH from?

I have a .Net assembly that was converted from a jar file. This Library looks for files in it's classpath. I keep getting missing resource exceptions when running the application. I have tried: - Putting the resource file in my bin folder - Putting the resource file in my source folder, including it in the VS project and setting copy lo...

Delete Reccords from a table recursively - SQL Server 2008

Table Structure ID DESC PARENT_ID** 35151 Parent 35154 35152 System 35151 35153 Same as System 35151 35154 ParentsParent 35157 35156 Product 35157 35157 Login Group 35159 Where Id is the primary key, and parent_id is the foreign key referenced in the sa...

Which Tastes Better for Security, Java or .NET?

Both this two languages are safe by security point of view with their own levels, but which one tastes better w.r.t your working experience ? Or is it the security depends entirely on the programmer ? The types of vulnerabilities found in .NET code is different than the types of vulnerabilities found in Java code. Its true that Micros...

Suspend Bitlocker programmatically?

Is there a way to suspend Bitlocker for a drive programmatically from .NET? ...

Regex replacement capture followed by digit

I am trying to get a Regex replacement working to update my AssemblyInfo.cs files, so I have: Regex.Replace( contents, @"(\[assembly: Assembly(File)?Version\("").*(""\)\])", "$1" + version + "$3" ); The problem is that version is something like "1.5.3.0", so that when the replacement is evaluated it is seeing "$11.5.3.0$...

.net memory profiler that can profile remote machines

I own the Ants Profiler 4 which is great for performance / memory profiling. Unfortunately it only works on the local machine and I cannot attach to a running process. But I have a memory leak that only seems to occure on our production server. A windows console app written in vb.net runs fine with constant memory usage for several day...

.net installer to add mysql database tables on install

Hi, I am getting to a point now with my program where by i am writing the .net installer to install it in the right location etc. my question is, is there a way that when i run the installer i can also add database tables to a mysql database? or should i write a seperate program to run after install which checks the db and adds the t...

Naming conventions for Code Contract classes of Interface types

Hi All, I'm using the Code Contracts classes in the System.Diagnostics.Contracts namespace to define some contracts for my objects and I'm wondering how others name their contract classes when the contract is defined against a base interface. Let me illustrate with a small example: [ContractClass(typeof(AnimalContract))] public interfa...

What happens to a Reference variable if the referenced object gets deleted?

Say I have the following class... Class1 { private ArrayList myList; private Class1 { // Here fill myList with a bunch of Foo objects. } public ArrayList GetList() { return myList; } } Then say in some other class you have the following code... Class1 myClass = new Class1(); Foo myFavoriteFoo = myClass.GetList...

LINQPad: How to get row count in a table using MetaTable type?

In LINQPad, I'm trying to print all tables in a database and row count in each of them: this.Mapping.GetTables().Select(o => new { TableName = o.TableName, RowCount = ? }) How the row count can be calculated? ...

Is it possible to connect with QT to net remoting server?

Hi all. I have server application writed in .net. To connect with this server I'm using net remoting interface. Is it possible to connect to this server application with QT library? ...

Is there an API for Cruise Control .NET?

Is there some api I can use with ccnet to query for example the status of various builds? I have noticed that there are a few options in the ccnet tray application for connecting but I cannot find any documentation of the service api or examples of how to consume it. TIA Andrew ...

Consume a .NET Assembly from a classic ASP page.

Hi, I have an old .net 2005 web site that has some asp pages and having object reference problem accessing .net dll. The maintenance task was handed down to me and the original developer is nowhere to be found :( I started at .Net already so I don't really master handling this dll hell kind of problem. On the arrow below is where I'm...

How Can I extend the Behaviour of Windows Explorer Click or Extending the Shell Behaviour

Is there any way I can extend or modify the behavior of Windows Explorer click? For example, I want to modify the the click event. On clicking a drive, I should be able to connect to an FTP server instead of opening the drive. The drive will be a mounted drive. So what I want to do is modify the default behavior of Windows Explorer Cli...

Trimming text in ASP.NET

How to get following result in ASP.NET: INPUT string: "Duck, Donald" Required String: "Donald Duck" P.S: The input string is dynamic. ...

How do I get the local port my WCF service runs on?

I'm using multiple self-hosted WCF services on the same machine. I need to open each of them on a different port (obviously), so I used "net:tcp://localhost:0" as address since I figured it would assign a free port this way. Now I need to know which port was assigned actually. This code runs on the server, so I need the local port. How ...

The process cannot access the file because it is being used by another process. (threads)

I write my debug information to a file using a separate thread. During startup, I like to backup any previous file. Unfortunately, it seems the OS hangs onto the file handle for an indeterminate amount of time so when I try to write to the file, it fails. I am using C#, .Net framework 3.5 on Windows XP. (Vista and Win7 have the sam...

XmlSerializer deserialize attribute with empty string to zero

I would like to use XmlSerializer and deserialize attributes with empty string values into zeros for ints. Every question I've seen regarding deserializing attributes with empty strings involves setting nullable ints to null - but I want to set non-nullable ints to zero, not null. Is there any easy way to do this without implementing I...