.net

Is This really an ASP.NET Web Forms Bug?

I have a web application hosted by a set of load-balanced servers. I have an ASP.NET text box and button on the master page for getting a value and searching for it in the database. The search result is displayed on a page called search.aspx that takes a query string with the value entered in the text box placed on the master page. The ...

Is there a Future<T> type in .NET?

My Google-fu is failing me -- Is there a Future<T> type in .NET? I thought I remembered seeing some code for that, but maybe I was reading Java.... By the way, my musing started after reading This Article ...

.net InterBase FireBird SQL

I am using InterBase and FireBird SQL in C# .net Enviroment. I would Like to use Transaction Scope in my program. How to do that Effectively with InterBase-FireBird ? Any Idea ? ...

Silverlight or WPF?

I’m about to start work on a new LOB application which is mainly forms over data. I am going to use either WPF or Silverlight but am not sure which technology to use. Silverlight seems to have everything I need with the bonus of being cross platform as well. Is there any reason why I should use WPF in this context? or is Silverlight the ...

Stacktraces dangerous on a live website?

We are running multiple Sitecore websites and just got feedback that it might be dangerous to have stacktraces available to users of the website when getting errors. Will the website be alot more vulnarable to hackers now that people get stacktraces? ...

Force exceptions language in English

My Visual Studio 2005 is a French one, installed on a French OS. All the exceptions I receive during debug or runtime I obtain also in French. Can I however do something that the exceptions messages be in English? For goggling, discussing etc. I tried the following: Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US"); t...

Custom sort with FastObjectListview is not working.

Hey, I'm using the FastObjectListview and now I need to sort on 2 columns. So I tried using the example I found on the ObjectListview website but I can't get it to work. class MyCustomSortingDataSource : FastVirtualListDataSource { override public void SortObjects(OLVColumn column, SortOrder order) { // do some amazing sor...

checking dependency to older dot net versions

Hello all I have some project that written in .net 3.5 environment. But there still some dependency to .net 2.0 . How I can find this dependence parts of the code that use the old API ? I just want to update all code to 3.5 version. Project written in vb.net. Thanks a lot for help. ...

How can I set "S-1-5-32-554" groups in msmq?

How to set "S-1-5-32-554" or "Pre-Windows 2000 Compatible Access" group in msmq using C# code? Thank in advance Susanta ...

Casting method arguments of a Generic Class...

I've made a generic class that saves and queries objects from a flat file. I keep having to change the method arguments to objects so I can cast them and I'm wondering if I'm going about this the right way... 'T' will always inherit 'FlatFileRecord' This does not compile: public class FlatFile<T> { public void Save(T record) { ...

How to mark .NET objects exposed to COM-interop as single threaded?

When defining a COM-visible class in C++ I can define the supported threading model in the header file (the threading(single) line): [ coclass, default(IComInterface), threading(single), vi_progid("Example.ComClass"), progid("Example.ComClass.1"), version(1.0), uuid("72861DF5-4C77-43ec-A4DC-ED04396F0CCD") ] ...

How do i use Activator.CreateInstance with strings?

In my reflection code i hit a problem with my generic section of code. Specifically when i use a string. var oVal = (object)"Test"; var oType = oVal.GetType(); var sz = Activator.CreateInstance(oType, oVal); Exception An unhandled exception of type 'System.MissingMethodException' occurred in mscorlib.dll Addi...

Are there any Outlook Contacts Controls in ASP.NET?

How can I access Microsoft Outlook contacts using ASP.NET? Are there any controls that can do this? ...

What are good rules of thumb when writing cross-platform apps in C#?

I haven't yet needed to write any cross-platform apps in C#. However, everytime I come to work with paths etc I always wonder what things I should be doing to make my life easier should I need to cross compile to Mono. I understand the GUI could be an issue. I would like to try and employ good cross platform practices in my normal Wind...

Is there a book/web site “VB.NET from a C# mind set”?

see also Good VB.Net 2008/3.5 Reference Book? and Converting C# knowledge to VB.NET any potential problems? Or other good resource for an experienced (5 years C#, before that 10 years C/C++) C# programmer to learn VB.NET. I am being forced to program in and understand a lot of VB.NET code (I was not told that most of code w...

ASP.NET membership

I configured ASP.NET membership and created some users as well as a protected folder. now, what's weird is that after being successfully authenticated, instead of going to the protected page, the login page is loaded again.! for example, I have a role "HR" and a user "hr1" who is a member of "HR". I have a protected folder "HR" which is...

How to check that I can SUM values of given type

In our application we have number of AggregatorTypes (idea copied from SQL Server) i.e. MinAggregator MaxAggregator, CountAggregator, And SumAggregator. Now I should check if Aggregator supports type of provided values. For Count it is not important. For Max and Min I use checking for IComparable. But what to use for SUM? I tried Conve...

C#: Startup a computer programmatically at a given time

How do I startup a computer from C# code at a given time? This should be done locally from the computer that is to startup, but other alternatives can be interesting. Are there any prerequisites to get this to work? Like the computer has to just be in sleep mode, not shut down? ...

Changing Property Types in Designer

Hello, I have a property in a control that exposes an interface. IElementTemplate. What I was hoping to do was to use the designer control to override the reference to change it to a class that inherits from this interface, but this isn't working: protected override void PreFilterProperties(System.Collections.IDictionary properties) ...

Regular expression to strip everything between anchor tags

Hi , I am trying to strip out all the links and text between anchors tags from a html string as below: string LINK_TAG_PATTERN = "/<a\b[^>]*>(.*?)<\\/a>"; htmltext = Regex.Replace(htmltext, LINK_TAG_PATTERN, string.Empty); This is not working anyone have ideas why? Thanks a lot, Edit: the regex was from this link http://stackove...