.net-2.0

MembershipProvider and PasswordRecovery control

Hi, I need help using the PasswordRecovery control in .net 2.0. My situation is the application has changed from storing the passwordformat in Hashed to Clear. The problem is the newly created users have a clear password stored and there are still users with hashed passwords. When I use the passwordRecovery control as below for users w...

Editing dictionary values in a foreach loop

I and trying to build a pie chart from a dictionary. Before I display the pie chart, I want to tidy up the data. I'm removing any pie slices that would be less than 5% of the pie and putting them in a "Other" pie slice. However I'm getting a Collection was modified; enumeration operation may not execute exception at runtime. I understan...

Office interop: developing with 2003 PIAs on a machine with Office 2007

I have Office 2007 on my dev machine. I have a small app I'm building for a customer server with Office 2003 that needs to do some interop. My program will run as a scheduled task in a nightly batch process. No matter what I do, I can't find the version 11.0 of the Access interop assembly so that will work on the server. I've tried...

Using Sql 'In' Operator within .NET 2.0 DataTable Filter expression.

Does the .NET 2.0 Framework DataTable filterexperssion property support the SQL "IN" operator? If you have a solution to this please provide example code. Thank you. ...

Is it possible to programmatically create a DBLink in SQL server 2005 in C#?

Is it possible to programmatically create a DBLink in SQL server 2005 in C#? Suppose I have database A and B. I want to create a DBlink in A to connect B. I will capture the B database info from user and create the DBLink in database A. Is this possible in C# .Net version 2.0? ...

.Net 2.0 Windows Service Process Communication: Database or IPC?

I have a Windows Service running on a .Net 2.0 environment (NOT UPGRADABLE TO 3/3.5). The service uses a System.Timers.Timer on a X second Interval to poll for items on a database table. The Timer.Elapsed event handling code is wrapped around a lock statement to prevent the next Elapsed event of running if the previous processing has no...

Random Access by Position of Key/Value Pairs in .NET (C#)

I am currently developing a program that uses C#'s Dictionary container (specifically, SortedDictionary). This container works very well for my purposes except for one specific case because I want random access. Specifically, I am generating a random position using a pseudorandom number generator and I need to be able to access that va...

How to take a screenshot and send by email programaticly on dotnet

Background: I'm developing a bussiness application, and in the final stages we are encountering some extrange errors, mostly with connection and some edge use cases. For this kind of exceptions, we now provide a nice dialog with error details, of which the user take a screenshot, and send by email with some remarks. Problem: I would...

How can we work with VB6 dll called from a multithreaded c# windows service application?

I'm running a multithreaded windows service that need to call a VB6 dll. There's no documentation about this VB6 dll and this legacy system supports a very critical business process. At first time (1º thread), this dll performs well. As other threads need access, it start provide wrong results. I read one guys saying: "Just be careful...

ASP.NET 2.0 Compilation Error: Make sure that the class defined in this code file matches the 'inherits' attribute

Okay I'm completely stuck on this compilation error. It's a Web Site (not web app), .NET 2.0. I have a file in this directory: welcome_teams file name: default.aspx Page Declaration: <%@ Page Language="C#" MasterPageFile="~/masters/Site.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="welcome_teams_default" %>...

Problem with 'Update Web Reference"

Occasionally I have a problem when I attempt to update a web reference in Visual Studio 2008 (this also happened in VS2005). It has happened in several different solutions. When I have a solution with a (.NET 2.0) web service and a project that references the web service I get "There was an error downloading 'http://localhost:3890/MyWeb...

Migrating parameters from ArrayList to List<T>

I have a large project which was originally written in C#1.1 and is now targeting C#2.0. There are several classes which have methods which take an ArrayList parameter I would like to start to move these to accept List<T> as a parameter, but this can't be done all at one time, so I need to accept both parameters. My main reason for the...

How do I get the Data from the textboxes within the gridview, nested in the repeater?

Hello All... I tried posting this before with only text...there was only one response the suggested I update onblur..which didn't seem like the best route as there could be a considerable amount of records: I have the following Gridview built during a repeater ItemDataBound event: '> <asp:GridV...

How to get the list of SqlInstances of a paricular machine

Can anyone tell me how to get remote Sqlserver instances using c# and SMO or any api? I have a remote server name "RemoteMC", which has 2 instances of sql server: "RemoteMc" and "RemoteMC\sqlexpress" I try to get the instances in code like this: Server srv=new Server("RemoteMC"); DataTable dt=SmoApplication.EnumAvailableSqlServer(true...

Log4Net Not Rolling

Hi Everyone, I have a problem with Log4Net. Running C# .Net 2.0 Log4Net Ver. Not Sure. How do I check it? Think it's 1.2 It seems to only spawn a new file everytime I restart the web config. Any ideas why my log file isn't rolling over? <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender"> <max...

How to select specific combobox item with multiple keystrokes? First few characters of item

Windows explorer in XP will allow you to make a file selection based on typing a few characters. I would like to know if there is any simplistic .net feature I can use to mimic this behaviour in a combobox? I think I've seen this happen in comboboxes before, and would like to know if there is a property I can use? I know I could develo...

Automatically print/save NUnit XML output

I've setup some Nunit tests for validating my statistical formulas within my .net v2 application, for company records i need to have a printed copy of this output. Is anyone aware of any commands in NUnit to automatically print the XML to default printer? If printing isn't possible saving to a folder may work for us. thanks in advance...

How do you provide a default type for generics?

I have a class that currently has several methods that take integer parameters. These integers map to operations that the application can perform. I'd like to make the class generic so that the consumers of the class can provide an enum type that they have with all the operations in it, then the methods will take parameters of that enum ...

Displaying thumbnail icons 128x128 pixels or larger in a grid in ListView

Original Question (see Update below) I have a WinForms program that needs a decent scrollable icon control with large icons (128x128 or larger thumbnails, really) that can be clicked to hilight or double clicked to perform some action. Preferably there would be minimal wasted space (short filename captions might be needed below each ico...

Problem in Form authentication.

I am using form authentication inmy ASP.NET 2.0 website. Today during testing i was faced major probleM. After authentication, i have default page createuser.aspx. From that page i am creating new user.It is working fine. There is logout button in which i am clearing all sessions and redirecting it in login page. All was working fine. ...