.net-3.5

Are we moving towards classic ASP using MVC framework in .Net 3.5?

Looking at MVC frameworsk, it seems we require more of classic ASP knowledge then ASP.NET postbacks and Viewstates. Are we moving backwards to complex UI + code logic in the actual HTML? ...

Is there a memory limit for a single .NET process

We are currently thinking of building a cache-system to hold data pulled out of an SQL database and make it available to a couple of other applications (website, webservice, etc). We imagine the cache to be running as a windows service and basically consist of a smart dictionary which holds the cache entries. My question is, is there a l...

Outlook VSTO not firing on NewMailEx event?

I've created a VSTO in C# that is supposed to hook Outlook 2007's NewMailEx event. However, it doesn't fire sometimes when I do a manual send/receive, or when there is only 1 unread mail in the inbox. It almost seems as if it fires on the inbox BEFORE the message actually arrives. Is there a better way of monitoring for new messages eve...

How hard is it to incorporate full text search with SQL Server?

I am building a C#/ASP.NET app with an SQL backend. I am on deadline and finishing up my pages, out of left field one of my designers incorporated a full text search on one of my pages. My "searches" up until this point have been filters, being able to narrow a result set by certain factors and column values. Being that I'm on deadline...

OutgoingWebResponseContext does not display non-english characters

We have implmented a REST-style get service Using WCF in .Net 3.5. This service retrieves research documents. The string 'synopsis' indicated in the code bolow contains non-english characteres which the browser deliveres as "????????". private void ReturnSynopsisInfo(IApiWebOperationContext context, OutgoingWebResponseContext outgoingR...

Error when using extension methods in C#

I came across an issue that makes me think there is bug in the 3.0 framework. When I try to use extension methods I get the following error: Missing compiler required member 'System.Runtime.CompilerServices.ExtensionAttribute..ctor' When using this simple code: public static class StringUtils { static void TestExtension(...

What is the best way to serialize xml into appropriate objects when versioned by namespaces?

My question is the following. I have xml that is versioned by a namespace. I want to serialize this received xml into the appropriate object, but the only way I know to do this means I have to process the xml two times. First to discover the namespace, and then in order to serialize to the object of the proper type based on the discov...

how to release resources of a process

I am invoking an external process by using System.Diagonistics.Process and passing two filenames as parameters. Now some time this process terminates due to exceptions and it seems that files handle are not being released by the process. How can i release the resources occupied by the process. ...

WCF Service Custom Configuration

In an application that is hosting several WCF services, what would be the best way to add custom configuration information for each service? For example you may want to pass or set a company name or specify the connectionString a service or some other parameter. I'm guessing this might be possible by implementing IServiceBehavior. i....

Can I safely download and install .Net framework 3.5 SP1 without requiring my customers to upgrade their .Net Framework distributable? (currently running 3.5)

Can I safely download and install .Net framework 3.5 SP1 without requiring my customers to upgrade their .Net Framework distributable? EDIT: And without changing my build script EDIT: I'm currently running 3.5 ...

How do C# Events work behind the scenes?

I'm using C#, .NET 3.5. I understand how to utilize events, how to declare them in my class, how to hook them from somewhere else, etc. A contrived example: public class MyList { private List<string> m_Strings = new List<string>(); public EventHandler<EventArgs> ElementAddedEvent; public void Add(string value) { ...

.NET Framework 3.5 wont install on VISTA 32bit

Running VISTA 32bit. I am trying to install c# Visual Express 2008 - but it requires .NET 3.5. One of the prerequisites during the install is .NET 3.5 ... it attempts to install it but fails, with no real error message. So I downloaded .NET 3.5 standalone from MS website and tried that.Again it fails with the error [10/17/08,23:17...

Can't create xmlns reference to other project in XAML

I have a WPF project defined like this: MyApp.sln MyAppWPF MyApp.Domain In one of my xaml files in the MyAppWPF project I'm trying to reference a class defined in MyApp.Domain project. I have a project reference in MyAppWPF to MyApp.Domain. I am trying to create the reference like this: <Window x:Class="MyAppWPF.Window1" ...

What is the best way to localize an IEnumerable?

What is the best way to localize a collection (IEnumerable)? From the BL I retrieve a collection of entities which still need to localized, I figured I write a method which extends the IEnumerable and returns the localized list. How can i get the code underneath working? Any ideas? Maybe better options? public static IEnumerable L...

Class-member access-modifiers

I want a method of the class: "One" ("AccessibleWithinSameNamespace") to be accessible by the class: "Two", without having "Two" extending "One". Both classes are in the same namespace, so I'm thinking that maybe there's an access-modifier that emulates the "protected" modifyer, but for namespaces. Some code: namespace Test { clas...

Join arrays in VB.net

What's the simplest way to join one or more arrays (or ArrayLists) in Visual Basic? I'm using .NET 3.5, if that matters much. ...

Can I define a cross container TabIndex order in XAML (or code-beside)

Control.TabIndex Only allows me to overide the Tab order of controls in a given container. Is there a way to specify this across all the controls in, for example a UserControl, regardless of the contains used to arrange the controls. Cheers, Jan ...

.NET 3.5 SP1 network shares allow exe application to run

I could probably find this out from somewhere else but thought it would be a nice question to have on stack overflow. .NET 2.0 by default stopped managed exe's running from network shares despite the fact you can run unmanaged exe's. I have seen mention's that this was changed in .NET 3.5 SP1 Is this true? Would that include any dll...

.net 3.5 SP1 Bootstrapper not found for Setup

I am getting a warning when trying to include the .net 3.5 sp1 prerequisite for my setup project. The warning states Prerequisite could not found for bootstrapping. Any suggestions? Thanks ...

Creating a byte array from a stream

What is the preffered method for creating a byte array from an input stream? Here is my current solution with .NET 3.5. Is it still a better idea to read and write chunks of the stream? Stream s; byte[] b; using (BinaryReader br = new BinaryReader(s)) { b = br.ReadBytes(s.Length); } ...