.net

How many millions records can Mysql reasonably deal with with .NET ?

Anybody can tell his experience with MySQL and .NET dealing with millions of records ? Would myself need to be able to cope with 50 to 100 Millions records and would like to hear about how you cope with this in your precise context so that I may inspire from it. ...

Sending message to windows service by web page

Hello, How could I do this with no access denied problem? I have a windows service: protected override void OnCustomCommand(int command) { if (command == 1) { foreach (Process traceProcess in Process.GetProcessesByName("notepad.exe")) { traceProcess.Kill(); } } } when I do...

Windows Identity Foundation sample MVC application

Is there a sample application for using WIF with a ASP.NET MVC application? Can someone help me get started trying to integrate both of these technologies? ...

ToolStripComboBox -- autosize to items

I have a ToolStrip with a ToolStripComboBox control on it, and I would like it to autosize to fit the widest item in the drop down list. How can I accomplish that? The "Autosize" property is set to "true", but it doesn't seem to be making any difference. I've been banging my head over this for a while. Is it even possible? ...

Can Entity Framework create incremental SQL scripts for updates?

Hi, Can Entity Framework create incremental SQL scripts for updates? (or would you need to do this in a separate database tool) (i.e. for my application updates I need to package the DB upgrade script that gets applied after download - windows forms type app) ...

Entity Framework - How do create an association to/from the same entity?

Hi, In Entity Framework (VS2010) how do I create an association to/from the same table? (a many-to-many is what I want) Background - I was expecting under the bonnet a NODE and RELATIONSHIP table, where the latter has a parent_node_id and a child_node_id (i.e. pointing back to the NODE id column). I can't seem to get the designer to ...

Duplicate elements in a hashset

I have a problem with hashsets at the moment. I have classes which are immutable and contain just one item, when I add two different classes with the same data to a hashset, I get them both in the set. This is weird, because I've overloaded Equals and GetHashCode on both the base class and the superclass. public abstract class Contact :...

Lifetime issue of IDisposable unmanaged resources in a complex object graph?

This question is about dealing with unmanaged resources (COM interop) and making sure there won't be any resource leaks. I'd appreciate feedback on whether I seem to do things the right way. Background: Let's say I've got two classes: A class LimitedComResource which is a wrapper around a COM object (received via some API). There ...

html.actionlink with .net 4.0 renders empty links

This should hopefully be a simple configuration problem. When my application targets .Net 3.5 This code <%= Html.ActionLink("Forgot your password?","ForgotPassword") %> renders this: <a href="/Account/ForgotPassword">Forgot your password?</a> When my application targets .Net 4.0 The same code renders: <a href="">Forgot your ...

Queues And Wait Handles in C#

I've had the following code in my application for some years and have never seen an issue from it. while ((PendingOrders.Count > 0) || (WaitHandle.WaitAny(CommandEventArr) != 1)) { lock (PendingOrders) { if (PendingOrders.Count > 0) { fbo = PendingOrders.Dequeue(); } else { ...

Why doesnt doesnt HTML input of type file not work with Ajax update panel

I have a input of type file and when i try to do a Request.files when the input is wrapped in an update panel...it always returns an empty httpfilecollection. Why??? This is the codebehind: (At HttpContext.Current.Request.Files...its always 0 for the count.) Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.Event...

automated email downloading and treading similar messages

Okay here it is : I have built an c# console app that downloads email, save attachments , and stores the subject, from, to, body to a MS SQL Database. I use aspNetPOP3 Component to do this. I have build a front end ASP.NET application to allow my users to search and view the these inbound messages. It works great. Next Steps (this i...

File location for config file to app installed to local user location

I have a WinForm app that has inside of the app's config file locations to find files for the app to use as it runs. However, the app will be installed locally for each user so it can't be hard coded. For Vista and Windows 7 the installer puts the app in c:\users\\Documents area. Under Windows XP it puts it in a different location. H...

Get/open temp file in .NET

I would like to do something like the below. What function returns me an unique file that is opened? so i can ensure it is mine and i wont overwrite anything or write a complex fn generate/loop BinaryWriter w = GetTempFile(out fn); w.close(); File.Move(fn, newFn); ...

Very simple Error handling with NServiceBus

hey guys, here's a simple scenario NServiceBus Client/Server setup. The "Message" is a custom Class I wrote. The Client sends a request message. The Server receives the message, and the server does this: Bus.Reply(new UserDataResponseMessage { ID = Guid.NewGuid(), Response = users }); Then nothing. The Client never receives a resp...

.net clipboard metadata (or whatever skype quotations use)

Is it possible to use the Clipboard class to grab all the data from the clipboard, like full skype quotes? They use some kind of metadata I think, which is how it knows when something is a quote or not. How can I access that from the Clipboard class? What functions would I call to set/restore Skype quotations? Thanks for the help! Imp...

Calling a .net webservice from a plain HTML site using jQuery

Hi guys, I wanted to know it is possible to call a hosted .net web service from a HTML page using jQuery? I tried this piece of code, but it doesn't work for me: $('#myForm').click(function() { $.ajax({ type: "POST", data: '{}', url: "http://localhost:49590/Service.asmx?op=HelloWorld", ...

what is the accepted naming convention for int, string, array, list, object, etc...

The company I work for now uses a set naming convention for their C# variables such as iSomeName for int, sSomeName for string, aSomeName for arrays, bSomeName for boolean, dSomeName for datetime and so on. My previous employer did not use the i, s, a, b and d prefixes and just named the variables a good understandable name. My impress...

Winform without .NET framework ?

Hi, I have to create few forms and give it as direct EXE (instead of installer, which installs .NET framework, which the end user is not happy, they want something they can directly open and work). I know it can be done as web, but am looking for winforms? Please suggest which tool/technology can handle this? Thanks, Karthick ...

How to get the current application pool user in IIS when using impersonate=true?

In .net when a website hosted in IIS how do you get the current user the website is running under. ie the Application Pool user not the the current user accessing the site. Using windows integrated and impersonate. <authentication mode="Windows"/> <identity impersonate="true"/> ...