.net

How to do PDF with C#?

What is the library in C# that I need to output in a PDF? I would like to do a simple report in PDF instead to display information in the screen? Dupe: http://stackoverflow.com/questions/177/how-do-i-programmatically-create-a-pdf-in-my-net-application ...

How Can I Only Allow Uniform Resizing in a WPF Window?

I don't want my window to be resized either "only horizontally" or "only vertically." Is there a property I can set on my window that can enforce this, or is there a nifty code-behind trick I can use? ...

How do you represent a null value in a Data Access Layer (C#)

Hi all: Just wondering if there is any best practice for DAL to represent null value (from a nullable column). We currently have our own in-house DAL and are representing null value with int.MinValue. However, this rise concerns with developers thinking that when comparing values, we are purposely imposing another "added" value onto i...

WSE 2 .Net 1.1 Client calling from inside a LAN to service on the internet. How to set the proxy server?

Hi I am trying to connect to a WSE2 web service (.Net 1.1) on the internet The client (also .Net 1.1) is inside my company LAN and has to go out through a proxy server to the internet. When I make the WSE2 call with the generated proxty it fails with the following Microsoft.Web.Services2.AsynchronousOperationException. WSE101: An asyn...

Is there a generic version of the HybridDictionary?

The description of System.Collection.Specialized.HybridDictionary is this: Implements IDictionary by using a System.Collections.Specialized.ListDictionary while the collection is small, and then switching to a System.Collections.Hashtable when the collection gets large. Is there an equivalent Generic implementation? ...

Novell LDAP C# - Novell.Directory.Ldap - Has anybody made it work?

Hi, I'm trying to use the library released by Novell (Novell.Directory.Ldap). Version 2.1.10. What I've done so far: I tested the connection with an application (LdapBrowser) and it's working, so its not a communication problem. It's compiled in Mono, but I'm working with Visual Studio. So created a project with the sources. I also ...

Migrating from .NET 1.1 to .NET 3.5

What would be some compelling reasons to upgrade a web app from .NET 1.1 to .NET 3.5? ...

Getting started with .NET

I am not new to programming, but most of my experience has been in Java for the last few years. I was introduced to programming in VB 6, and then moved to Java when I started university, and have been using that almost exclusively since. I've taken courses that used other languages (C, Lisp and Prolog, Eiffel) and have worked with SQL an...

I need help setting .NET HttpWebRequest timeout

My objective is to get the answer from up to 6000 Urls in the shortest time. It was working very well (12 seconds for 5200 LAN Addresses) until some delay started to happen. My code uses up to 20 simultaneous HttpWebRequest.BeginGetResponse with ThreadPool.RegisterWaitForSingleObject for timeout handling. However some (up to 4 in 5,000...

How it is correctly to implement IDTExtensibility2 interface for Office COM Add-In?

I am implementing COM Add-In for Outlook. I use IDTExtensibility2. I am not sure whether this is the best way of doing COM Add-Ins but I cannot change that. This interface defines five methods: OnConnection, OnStartupComplete, OnAddInsUpdate, OnBeginShutdown, OnDisconnection. I need to perform the following operations: Load configur...

Rhino Mocks: AAA test syntax without static MockRepository methods?

I have been using (and liking) the new Rhino Mocks AAA syntax. However, one thing that puzzles me is that I have to create my stubs and mocks like this: var v1 = MockRepository.GenerateStub<MyClass>(); instead of with an instantiated MockRepository: var mr = new MockRepository(); var v1 = mr.GenerateStub<MyClass>(); This syntax wo...

Intellisense not showing up for new controls in code behind

Hi- I've added a label control to a webform. It appears when I run the page but when I try to reference it using the codebehind, I get no intellisense and the code I write somehow doesn't work. I've verified the project is running in debug, that debug compilation is set in the web.config. In fact, I can debug all pages. However, when i g...

How to make an existing public API testable for external programmers using it?

I have a C# public API that is used by many third-party developers that have written custom applications on top of it. In addition, the API is used widely by internal developers. This API wasn't written with testability in mind: most class methods aren't virtual and things weren't factored out into interfaces. In addition, there are som...

Windows event scheduler custom service

I need to create a Windows service that works just like the task scheduler in that I can configure what time it runs and it basically just calls a .NET class at that scheduled time (recurring). What is the recommended way to do this? Also, any information on installing/removing that service would be appreciated! Update: Using the task s...

C# Open Source Project Namespace

Hi there, I am considering releasing one of my class libraries written in C# as open source. Before doing that, I am trying to do some refactoring so that it meets the demands of the general public :) I wonder what would be the best namespace schema to use? Basically, I see the following options: namespace MyTool: This just doesn't r...

Changing the initial LazyLoad behaviour in NHibernate

I've just started using NHibernate and fluent-NHibernate which I think is great. I've been configuring all my mappings to use LazyLoading for any relationships between classes because generally I find it isn't neccesary to load everything upfront. However sometimes you know 100% you will be loading all of the relationships or at least on...

Where would you put your new open-source .NET project?

I'm currently working on a .NET project that I will probably make open source. There are lots of places to put it though, anyone have any experience for a friction-less effort? Codeplex? Google-code? Note: I prefer Subversion for the projects source-control. ...

Is there a .NET implementation of an XRI resolver?

In order to avoid delegating XRI resolution to an XRI resolver proxy like xri.net, is there an open source .NET implementation of an XRI resolver? There is an xri4j library that might be ported to .NET, and in fact I started on that effort, but it looked like there was a lot of code in there that could be ripped out since .NET's librari...

Castle Windsor Are There Any Downsides?

I have been looking into the castle project and specifically windsor. I have been so impressed with what is possible with this technology and the benefits of having a such a loosely coupled system are definitely apparent. The only thing i am unsure of is if using this method has any downsides, specifically in asp.net?? for example perfor...

Stacktrace information preserving paths of original source

I am using C#.net for application development. To log and debug exceptions, I use the stacktrace. I executed my application on another machine, but when errors occur it refers to the path of my development machine. Ex: D:\Projects\xyz.CS line no :12 _Error_message_here. Why does it trace to the path on my development machine path ...