.net

custom action dll in managed code

How can I call a custom action dll written in managed code (.net) from an installer without using an unmanaged intermediary? ...

How do I store information in my executable in .Net

I'd like to bind a configuration file to my executable. I'd like to do this by storing an MD5 hash of the file inside the executable. This should keep anyone but the executable from modifying the file. Essentially if someone modifies this file outside of the program the program should fail to load it again. EDIT: The program processes ...

Optimizing/Customizing Sharepoint Search Crawling

With SharePoint Server 2007, there is also a Search Feature and a Crawler. However, the Crawler is somewhat limited in that it only supports Basic Auth when crawling external sites and that there is no way to tell it to ignore noindex,nofollow attributes. Now, there is a site i'd like to index, unfortunately this site uses it's own Auth...

Best practices for signing .NET assemblies?

I have a solution consisting of 5 projects, each of which compile to separate assemblies. Right now I'm code-signing them, but I'm pretty sure I'm doing it wrong. What's the best practice here? Sign each with a different key; make sure the passwords are different Sign each with a different key; use the same password if you want Sign ea...

FileUpload control inside an UpdatePanel without refreshing the whole page?

According to Microsoft the FileUpload control is not compatible with an AJAX UpdatePanel. I am aware that a PostBackTrigger can be added to the submit button of the form like this: <Triggers> <asp:PostBackTrigger ControlID="Button1" /> </Triggers> The problem is that this forces the form to perform a full post-back which voids out...

How to embed user-specific data in .NET windows setup app at setup download time?

I'd like to have a link in my ASP.NET web site that authenticated users click to download a windows app that is already pre-configured with their client ID and some site config data. My goal is no typing required for the user during the client app install, both for the user friendliness, and to avoid config errors from mis-typed technic...

Get a list of current windows, and give one of them focus, in .Net

Hey all, Without resorting to PInvoke, is there a way in .net to find out what windows are open? This is slightly different than asking what applications are running in memory. For example, Firefox could be running, but could be more than one window. Basically, I just want to be privy to the same information that the taskbar (and al...

What logging is good logging for your app?

So we've discussed logging in passing at my place of work and I was wondering if some of you guys here could give me some ideas of your approaches? Typically our scenario is, no logging really at all, and mostly .NET apps, winforms/WPF clients talking through web services or direct to a db. So, the real question is, where or what would...

P/Invoke in Mono

What's the current status of Mono's Platform Invoke implementation on Linux? And on Solaris? ...

How can I play compressed sound files in C# in a portable way?

Is there a portable, not patent-restricted way to play compressed sound files in C# / .Net? I want to play short "jingle" sounds on various events occuring in the program. System.Media.SoundPlayer can handle only WAV, but those are typically to big to embed in a downloadable apllication. MP3 is protected with patents, so even if there w...

3rd Party UI components for .net Compact Framework?

I have a .Net compact framework application with a frankly unimpressive UI. My win32 app uses Dev Express components and looks great, but I can't find anything similar for the compact framework. Can anyone recommend components that will jazz up my UI? Does such a thing exist, oram I going to have to owner draw my components or even wo...

In .NET, how do I launch a file with command line arguments (without knowing the location of the exe)?

Here's the situation: I am trying to launch an application, but the location of the .exe isn't known to me. Now, if the file extension is registered (in Windows), I can do something like: Process.Start("Sample.xls"); However, I need to pass some command line arguments as well. I couldn't get this to work Process p = new Process(...

Why is .NET exception not caught by try/catch block?

I'm working on a project using the ANTLR parser library for C#. I've built a grammar to parse some text and it works well. However, when the parser comes across an illegal or unexpected token, it throws one of many exceptions. The problem is that in some cases (not all) that my try/catch block won't catch it and instead stops executio...

How much should one DataSet represent?

How much should one DataSet represent? Using the example of an ordering system: While showing your order I also show a list of items similar to one of yours as well as a list of our most popular items. While your items are tangled in a web of relationships involving you and your past orders, preferred suppliers, and the various other ki...

Alternative to HttpUtility for .NET 3.5 SP1 client framework?

It'd be really nice to target my Windows Forms app to the .NET 3.5 SP1 client framework. But, right now I'm using the HttpUtility.HtmlDecode and HttpUtility.UrlDecode functions, and the MSDN documentation doesn't point to any alternatives inside of, say, System.Net or something. So, short from reflectoring the source code and copying it...

How can I store user-tweakable configuration in app.config?

I know it is a good idea to store configuration data in app.config (e.g. database connection strings) instead of hardcoing it, even if I am writing an application just for myself. But is there a way to update the configuration data stored in app.config from the program that is using it? ...

Why do .Net WPF DependencyProperties have to be static members of the class

Learning WPF nowadays. Found something new today with .Net dependency properties. What they bring to the table is Support for Callbacks (Validation, Change, etc) Property inheritance Attached properties among others. But my question here is why do they need to be declared as static in the containing class? The recommmended way ...

How can I render a PNG image (as a memory stream) onto a .NET ReportViewer report surface

I have a dynamically created image that I am saving to a stream so that I can display it on a ReportViewer surface. Setup: Windows Client application (not WebForms) Report datasource is an object datasource, with a dynamically generated stream as a property (CustomImage) Report.EnableExternalImages = true Image.Source = Database Ima...

Is there a good yacc/bison type LALR parser generator for .NET ?

Thanks in advance. ...

Virtual functions in constructors, why do languages differ?

In C++ when a virtual function is called from within a constructor it doesn't behave like a virtual function. I think everyone who encountered for the first time was surprised but on second thought it makes sense, if the derived constructor hasn't yet run the object is not yet a derived so how can a derived function be called? The precon...