.net

How to write my own AuthorizeTag?

Hi I ditching asp.net membership so I am guessing I need my own authorize tags(correct me if I am wrong). Since probably the ones they have all point to the membership classes(Not sure how to verify this though). Now I tried to do this public class MyTest : AuthorizeAttribute { protected override bool AuthorizeCore(HttpContextBase ht...

Iterop Forms Toolkit validation and focus events

I have an existing VB6 application which I am slowly moving its code to DotNet, in a lot of instances this means having to use DotNet usercontrols and hosting them in the VB6 form using the Interop Forms Toolkit v2. At present the current method is to develop the usercontrol in C# and then have a VB.NET usercontrol which inherits from t...

The operation has timed out with WebClient.DownloadFile and correct url's

I am batch uploading products to a database. I am download the image urls to the site to be used for the products. The code I written works fine for the first 25 iterations (always that number for some reason), but then throws me a System.Net.WebException "The operation has timed out". if(!File.Exists(localFilename)) {...

So very very confused about Authentication in asp.net mvc

Hi I come to the conclusion I need to ditch the ASP.NET Membership (for list of reasons). Now really the only thing I see that I need is creating a cookie(done by Form Authentication), custom methods for authentication (done) and finally validation based on if they are logged in or by role. I am stuck on the last one. I am trying to...

integrating .net application with IMail

We use IMail. I am writing a diary/calendar system and ideally would like to integrate with the users IMail calendar. I need to check for appointments, meetings etc in the users calendar before booking appointments. Would like to display a calendar view using data from Imail. Is this possible, if so can anyone suggest a starting point, ...

flip coordinates when drawing to control

I am drawing a graph on a control, but 0,0 is at the top-left hand corner of the control. Is there a way to flip the coordinates so that 0,0 is at the lower left corner of the control? ...

Best way to save/load pictures with .Net & SQL Server 2005?

Hey, What is the typical way to handle product pictures in a web-page selling products? Say I had a database with books or computer components etc, all of which have their own sample pictures for example... Should I save them into the DB as binary data, or somehow handle them in the codebehind, saving them into a directory with the appr...

C# finding item in List<>

I have a list which contains a collection of objects. How can I search for an item in this list where object.Property == myValue ...

Error: Cross thread operation not valid

I am trying to access a form from a different thread to that on which the form was created, and finally ended up with an error: Cross thread operation not valid public static void MakeTopMost(Form form) { SetWindowPos(form.Handle, HWND_TOPMOST, 0, 0, 0, 0, TOPMOST_FLAGS); } I am passing a form which is running in another thread. ...

High-Performance Timer vs StopWatch

Does anyone know if the HiPerfTimer or the StopWatch class is better for benchmarking, and why? ...

DataGridView selecting "Complete Row"

Hi /all In Windows .NET gridview - if a grid is readonly; when I click, a cell is selected; I want complete row to be highlighted instead of just cell. any idea? ...

Accessing .Net 3.5 assemblies from .Net 2

Visual Studio gives a warning when trying to do that, but does not prevent it. Is it safe and what are the implications? ...

Event subscription to a static instance. How to ensure GC.

Hi. I'm fixing a User control component using the .NET 1.1 framework. There are many instances of this user control referencing a singleton wrapping a COM resource. They subscribe to events from this resource. I suspect that the reason why we are having a degrading performance is because the singleton is maintaining a reference to t...

InstallShield 2009 Trial for .NET app

Hello, As I understand there is no direct way to implement trials with InstallShield 2009 and .NET applications. Their documentation claims that there is a workaround: "*InstallShield cannot wrap .NET or Java files for the Try and Buy/Product Activation or Try and Die types of trialware. In addition, InstallShield cannot wrap files th...

How to generate EDIFACT messages (IFIMIN) from .net (C#)?

Hi I am about to start a project where I need to generate an EDIFACT message (message type: IFTMIN). Since my project is .net based (C# + asp.net) I am looking for advise on generating EDIFACT messages in .net. Is there a free (possibly open source) library that will help generate an EDIFACT message? Are there any pitfalls in regards t...

Duck typing library for Silverlight?

Do you know any duck typing library for Silverlight? There are a few for full-blown .Net framework but I'm looking for something lighter. ...

Minimising DirectShow Memory Consumption

Hey, So, I have an application which streams two video sources over a local area connection. Each video has its own filter graph, puts the video through a decoding filter, and an Inifinite Pin Tee filter, and then there is a GMFBridge filter, which is used to turn on/off recording using the WM ASF Filter. There is also a video renderer...

What are the conventions for naming workflow activities in windows workflow foundation?

What naming conventions to be followed when naming the activities?. For example what should be the name for a CodeActivity that sends email to the user. ...

Implementing a database application for multilevel marketing

I'm doing a project in the field of multilevel marketing on .Net and SQL server. In the database it should save like a b-tree. How should i design a database? ...

Is it possible to get private assembly key?

Hi, Is it possible to get private assembly key in .NET using only public token? Thanks, Alexey Z. ...