.net

Is there any safe refactoring tool for .net (or at least c#)?

Hello, I recently read Michael C. Feathers' book Working effectively with legacy code and came across the point where he mentioned a way to test the safety of automatic refactoring tools. My question is: Are there any safe refactoring tools for the .net platform?; that means tools which only allow real refactorings and e.g. don't allow ...

c# API to use wordnet-what is better?

Hi, I am doing a web based chattebot system and my problems are these. I need to get a particular user question and check for some specific keywords in it(for example take the nouns) and find for synonyms and well as do the spell check? Therefore What is the best C# API for wordnet?? Well what I want to do is get a sentence from a te...

How can I parse two subjects from a string?

This is fairly difficult to explain. I am working on a text adventure at the moment and I am parsing input from a player. When a player enters input, there can be two possible subjects (let's call them subject1 and subject2). For example, in the following: "hit door with stick", subject1 is "door" and subject2 is "stick". In this case,...

Connection string for .DBF file don't work on IIS

I am using this connection string to query some .DBF Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\Dbfs; But if i run the application on IIS (7.5) the connection cannot be opened and i get this OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ...

Is there AzMan 64bit?

Is there 64 bit version of AzMan? We have an app that uses Microsoft.Interop.Security.AzRoles.dll.Is there a 64 version of this ? ...

How do I implement this command to prevent deadlocks with LINQ to SQL?

I would like to implement SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED in my project which uses LINQ to SQL. My understanding is that this will affect all select statements globally. Do I put this in my DAL which contains the context object? If so, how? Thanks! Mark ...

How to programmatically create an X.509 certificate in .NET?

I'd like to create a new X.509 certificate in .NET, that meet the hash algorithm and key length requirements that I set. This will be a self-signed certificate. Creating a new certificate may create a new key, or perhaps I'd like to import an existing private key that I have in byte[] form. Does anyone know how to do it? ...

Enumerating ListView.SelectedIndices is slow on huge ListView

I have a ListView with VirtualMode = true and huge number of items (for now ~800,000). My goal is to sum a field in all selected items, each time selected items changed. The problem is that enumerating all selected items takes long time when huge number of items are selected. for example, it takes 1 second for enumerate 800,000 selecte...

Visualization tool for modeling application that uses object-oriented design?

I'm currently writing up a text document for a .NET solution that contains multiple projects and assemblies and I'm needing to communicate the relationship between the classes/interfaces/etc. so that others can understand how data needs to be "wired up" inside the application. For example, I might need to say something like: The MyS...

Err.Number (VB6 versus C#)

I've used Artinsoft's VB6 to .NET wizard to convert a VB6 application to C# and I'm getting an upgrade warning in any place where Err.Number was previously used; //UPGRADE_WARNING: (2081) Err.Number has a new behavior. The converted code is referring to; Microsoft.VisualBasic.Information.Err().Number I haven't had any luck fin...

WPF TextBox won't fill in StackPanel

I have a TextBox control within a StackPanel whose Orientation is set to Horizontal, but can't get the TextBox to fill the remaining StackPanel space. XAML: <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml...

Best Practices for mapping MVC Controllers to Views?

What are the best practices when it comes to mapping controllers to views? For example, say for the urls mysite.com/login and mysite.com/register...I can have my LoginController and a RegisterController map to Login/Index.aspx and Register/Index.aspx views. Alternatively, my HomeController could handle both of these and map them to Hom...

Accurate IP detection regex help

I need to find Internal IP addresses by using a regex, I've managed to do it, but in the following cases all 4 is matching. I need a regex which doesn't match the first but matches the following 3. Each line is a different input. ! "version 10.2.0.4.0 detected" + "version 10.2.0.42 detected" + "version 10.2.0.4 detected" + "version 10.2...

filesystemwatcher.filter appears to be case sensitive (but only on our 2003 servers)

This is utterly baffling to me. I have a service with an array of file system watchers, the path and filter of each set at runtime. Protected Overrides Sub OnStart(ByVal args() As String) Dim l As String = ConfigurationManager.AppSettings("dirs") Dim x As String = ConfigurationManager.AppSettings("extensions") Dim locs() As...

How can I sign someone out using forms authentication and wcf

I have an asp.net aspx page that I log the user in using forms authentication. Later on I want to log the user out using a call to a wcf service that I created. The wcf service will call formsauthentication.logout... I try this but it doesn't seem to work.. ...

DataSet to SQL mapping framework?

Hi, I'm developing a system that needs to accept sql queries dynamically. I'm looking for something where someone can define a select query in a file external to the system -- the system would execute the query and return the results as a DataSet. Then the system would read a mapping file (also defined external to the system) that woul...

A few question about images uploading

I need to upload images to my website, make some image processing(resize, get image size\resolution, convert to jpg format etc ) and then embed it to page of my website. I have a few question: How to check that uploading file is image? Where is better store images - mssql or just folder? How to detect image type. Is MIME trust source? ...

How do you create a dynamic amount of objects? Design Pattern help

Hey Stack Overflow'ers, I'm stuck in a C# program I'm developing, and I think it's because I am taking the wrong approach. You see, I have these settings in an XML file, which are read at runtime. For each setting, I want to create a new object that does stuff. I think I can do that, but the problem is, how do I reference those obj...

Entity Framework 4, free Oracle provider?

Can i user ODAC or another free provider in EF4? ...

Where is Microsoft.Scripting.Core.dll?

I installed IronPython 2.6.1 on Windows Vista x64 on a machine with Visual Studio 2010 installed. I expected to find these DLLs: Microsoft.Scripting.Core.dll Microsoft.Scripting.ExtensionAttribute.dll ... in the IronPython directory, but they are not there. Is this a difference between IronPython 2.6.0 and 2.6.1 or do I have a proble...