.net-2.0

LINQ on the .NET 2.0 Runtime

Can a LINQ enabled app run on a machine that only has the .NET 2.0 runtime installed? In theory, LINQ is nothing more than syntactic sugar, and the resulting IL code should look the same as it would have in .NET 2.0. How can I write LINQ without using the .NET 3.5 libraries? Will it run on .NET 2.0?...

Asynchronous Remoting calls

We have a remoting singleton server running in a separate windows service (let's call her RemotingService). The clients of the RemotingService are ASP.NET instances (many many). Currently, the clients remoting call RemotingService and blocks while the RemotingService call is serviced. However, the remoting service is getting complicated...

Convert an asp.net application to IIS7 integrated mode

What steps I need to perform in order to convert asp.net 2 application from IIS7 classic to integrated mode? ...

Add .NET 2.0 SP1 as a prerequisite for deployment project

I have a .NET 2.0 application that has recently had contributions that are Service Pack 1 dependent. The deployment project has detected .NET 2.0 as a prerequisite, but NOT SP1. How do I include SP1 as a dependency/prerequisite in my deployment project? ...

Design problems with .Net UserControl

I have created a UserControl that has a ListView in it. The ListView is publicly accessible though a property. When I put the UserControl in a form and try to design the ListView though the property, the ListView stays that way until I compile again and it reverts back to the default state. How do I get my design changes to stick for t...

Reading "chunked" response with HttpWebResponse

I'm having trouble reading a "chunked" response when using a StreamReader to read the stream returned by GetResponseStream() of a HttpWebResponse: // response is an HttpWebResponse StreamReader reader = new StreamReader(response.GetResponseStream()); string output = reader.ReadToEnd(); // throws exception... When the reader.ReadToEnd(...

What is the best way to gzip and cache static images in Asp.net mvc

I'm trying to find the best way to speed up the delivery of the static images that compose the design of an mvc site. The images are not gzipped, nor cached in the server or on the client (with content expire). Options are: Find why images are not cached and gzipped direcly from IIS6 Write a specialized http handler Register a special...

MSCT Certification, Exam 70-536, your advices?

At the beginning of the year, I was proposed by my company to take some MS certification exams. Since then, they generously paid for the Self-Paced Training Kit book. I was promised to have some time to study, but the project is running late (a habit around here). Let's face it, I'll have to study on my own time to get this certification...

Best way to bind Windows Forms properties to ApplicationSettings in C#?

In a desktop application needing some serious refactoring, I have several chunks of code that look like this: private void LoadSettings() { WindowState = Properties.Settings.Default.WindowState; Location = Properties.Settings.Default.WindowLocation; ... } private void SaveSettings() { Properties.Settings.Default.WindowS...

Why can't you bind the Size of a windows form to ApplicationSettings?

Update: Solved, with code I got it working, see my answer below for the code... Original Post As Tundey pointed out in his answer to my last question, you can bind nearly everything about a windows forms control to ApplicationSettings pretty effortlessly. So is there really no way to do this with form Size? This tutorial says you need...

Best TinyMce editor Image Manager / File upload for Asp.net Mvc

What is the best Image Manager to integrate in TinyMce editor apart the official Moxiecode commercial ones? I'm looking to integrate a light texteditor in an asp.net mvc application and I choosed the Tinymce solution (and not the classic FCKEditor as this seems more lightweight and more jquery friendly). Sadly TinyMce doesn't come with...

System.Web.Caching vs. Enterprise Library Caching Block

For a .NET component that will be used in both web applications and rich client applications, there seem to be two obvious options for caching: System.Web.Caching or the Ent. Lib. Caching Block. What do you use? Why? System.Web.Caching Is this safe to use outside of web apps? I've seen mixed information, but I think the answer is m...

MS Project Gantt chart control usage in C#

Hi, Has anybody used the MS Project Gantt chart control in C#? If yes, can you share some resources regarding this? Many thanks, Dragos ...

Reserved Keyword in Enumeration in C#

Hi, I would like to use "as" and "is" as members of an enumeration. I know that this is possible in VB.NET to write it like this: Public Enum Test [as] = 1 [is] = 2 End Enum How do I write the equivalent statement in C#? This: public enum Test { as = 1, is = 2 } does not compile. Thanks in ad...

Capturing a repeated group

I am attempting to parse a string like the following using a .NET regular expression: H3Y5NC8E-TGA5B6SB-2NVAQ4E0 and return the following using Split: H3Y5NC8E TGA5B6SB 2NVAQ4E0 I validate each character against a specific character set (note that the letters 'I', 'O', 'U' & 'W' are absent), so using string.Split is not a...

What does ServerVariables["APPL_MD_PATH"] retreives the metabase path for the Application for the ISAPI DLL mean?

Hello, I've trying to get an ASP.net (v2) app to work in the debugger and keep running into a problem because the value returned by HttpContext.Current.Request.ServerVariables["APPL_MD_PATH"].ToLower() is an empty string. I have found out that this "Retrieves the metabase path for the Application for the ISAPI DLL". Can anybody shed s...

Moving from Visual Studio 2005 to 2008 and .NET 2.0

Hello, I'm currently using VS2005 Profesional and .NET 2.0, and since our project is rather large (25 projects in the solution), I'd like to try VS 2008, since its theoretically faster with larger projects. Before doing such thing, i'd like to know if what I've read is true: can I use VS2008 in ".net 2.0" mode? I don't want my custome...

What control is this? ("Open" Button with Drop Down)

The "Open" button on the open file dialog used in certain windows applications includes a dropdown arrow with a list of additional options -- namely "Open with..". I haven't seen this in every windows application, so you may have to try a few to get it, but SQL Server Management Studio and Visual Studio 2005 will both show the button ...

Help accessing application settings using ConfigurationManager

In .net frameworks 1.1, I use System.Configuration.ConfigurationSettings.AppSettings["name"]; for application settings. But in .Net 2.0, it says ConfigurationSettings is obsolete and to use ConfigurationManager instead. So I swapped it out with this: System.Configuration.ConfigurationManager.AppSettings["name"]; The problem is, C...

Preventing XML Serialization of IEnumerable and ICollection<T> & Inherited Types

NOTE: XMLIgnore is NOT the answer! OK, so following on from my question on XML Serialization and Inherited Types, I began integrating that code into my application I am working on, stupidly thinking all will go well.. I ran into problems with a couple of classes I have that implement IEnumerable and ICollection<T> The problem with the...