.net

Enabling/disabling proxy app doesn't work properly with IE.

I have a really strange situation here: I've written an app that, among other things, switches connections' proxy from on to off and the other way round. It is done by changing the value in the registry: public void SetUpProxy(string proxy, bool enable) { RegistryKey key = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Wind...

Toggle BorderStyle with a method. C#

Does anybody know how I can write "cardImage1.BorderStyle = BorderStyle.Fixed3D;" without having to explicitly declare "cardImage1"? I'm trying to put it into a method so that I don't need to write the code to toggle between two Border Styles when a Picture Box is clicked, for every single single picture box (there are 52!) e.g. for e...

Windows Azure - Table Services - Under the Hood

When you use the Table Services API in Windows Azure what is really doing under the hood? I think I read somewhere that this is not using SQL Server. Is it doing a hash table and then filters are really running like map/reduce actions? I'm really new to this stuff and I'm curious to what it is really doing. ...

If you are multi-targeting an assembly how should you name the files?

If you are multi-targeting an assembly how should you name the files? For example if you are targeting both standard .net and silverlight should the files be named differently? Something like MyProject.dll and MyProject.Silverlight.dll Or should they be named the same but exist in different directories Something like DotNet\MyProject...

Nicer notifications in tray

Hi, Do you know any example with nicer notification in system tray? I don`t like standard baloon so maybe there are others free, third-party components I can use? Thanks ...

How do I enable debugging with Visual Studio on Win7 when an application crash unexpectedly?

I have a .NET application that crashes because something is wrong with its configuration file. In Windows XP it asks me if want to debug my application with Visual Studio but in Windows 7 (and I guess in Vista) it shows this error message: How switch this functionality off and get back the Windows XP behaviour? Additional informatio...

Attaching properties and methods at runtime in C# 4.0?

What are the performance implications of attaching methods and properties at run time using dynamic features, as described in this blog post? What are the practical uses of ExpandoObject? ...

.Net desktop program suddenly starts erroring out

A long time ago I wrote a little FTP utility for a client, and it has been working just fine for over a year. The other day, they tell me that they "updated" their machines (including the server where this was installed). Suddenly, my tiny little desktop app started erroring out. Here is the error message: The configuration section '...

Implementing a scripting language in C#

Hi all We got a project where we're supposed to let 3rd party developers create their own GUI / CodeBehind drivers. Our GUI is running on WPF. Now, we got a number of possibilities for doing so, but one of the things we're considering is to create some sort of sub-Xaml XSD to let the create their GUI using markup (dunno if it'll be XAM...

adding COM dll as a reference from specific location

I am posting this query again.Soory, but I dont know how to ask doubts about already asked query. I am using a COM dll as a reference in my Project. I want that dll to be referenced from any location of computer. <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIden...

.NET RegEx Performance vs. C++

Is there any published benchmark results about RegEx performance in .NET vs. unmanaged C++/C? ...

Storing Smtp from email friendly display name in Web.Config

I'm storing my mailsettings in the web config like so... <mailSettings> <smtp from="[email protected]"> <network host="smtp.findremovalcompanies.com" userName="[email protected]" password="password" /> </smtp> </mailSettings> Now when I create a new var smtp = new SmtpClient(); smpt ha...

.NET WinForms - Programmatically End Current Edit - DataGridView

How can you programmatically end the current cell edit without losing the change? I have my DataGridView set to EditOnEnter mode. I tried EndEdit() on the grid but this backs out the current edit. ...

Best practice on exposing webservices

I am new to a development team that is adding a layer of webservices between domain and gui. The approach has a lot of potential but I wonder how to manage the webmethods. At the moment there is just a handful or so webmethods but there will be a lot of them when we get through to the other side. I am sure there must be some very cleve...

WPF XAML Markup Compiler generates a bad URL in InitializeComponent()

Hey All, So I'm integrating WPF into a Windows Forms application I've built. One of the big hurdles I'm running into is that when the Markup compiler generates the .g.cs files in the background, the InitializeComponent method is being generated incorrectly. Here's what's generated: System.Uri resourceLocater = new System.Uri("/MapWorks...

Opensocial + hi5 api

I'm trying to make an application in asp.net, which will grab all my friends from hi5 to my application using OpenSocial.. What are steps I should go through? ...

Embedding IronPython - Can't add reference to System

I'm embedding IronPython in my C# application. For some reason I'm having trouble loading assemblies. Specifically, I want System.dll so I can have access to .NET classes like DateTime. If I try the line: _runtime.LoadAssembly(_runtime.Host.PlatformAdaptationLayer.LoadAssembly("System")); I get: could not load file or assembly 'Syst...

LINQ connecting Many - Many relationships

Hello all, I am using c#.net and LINQ Within my LINQ model I have three database tables: The code below is how I access the data: public IQueryable<tblAvailability> GetAvailabilitiesBySet(int id) { return (from a in dc.tblAvailabilities where a.asID == id select a).DefaultIfEmpty(); ...

Bind SqlDataReader to Repeater. Good practice?

Is this a good practice and is there anything I need to look out for? I was binding repeater to an asp:SqlDataSource. Primary reason for doing this is to gain more control of the SqlCommand (e.g. CommandTimeout). Example: try { SqlDataReader MyReader = GetSomeResultsFromSqlCommand(); MyRepeater.DataSource = MyRe...

What are the shortcomings and annoyances in Ninject and/or StructureMap DI/IoC implementations

I'm looking to replace a home-grown IoC implementation with a standard one. My needs are very simple, translating an interface type into a newly created concrete class. I think you'll agree basically any framework will handle this. Currently I'm narrowing the field down to the following: Ninject StructureMap So again, the question...