.net

How to arrange controls based on their size? (without inheriting from Panel)

Scope I am trying to have my application arrange lines of some complex controls and split those lines into pages. Something like this: Much like a word processor would do, only there are complex controls instead of words. Note that the requirement of splitting into pages is essential. Also note that the obvious solution of inheritin...

Microsoft .NET vs. LAMP for startups

for startups with limited capital, creating web based business application, which platform is the best bet, is it MS.NET (browser+IIS+Database+vb.net/c#) or LAMP stack? Any views with respect to RAD, real cost of software (not just the licenses), architecture, SOA, OOP, framework, scalability, extensibility would be helpful on .NET vs ...

Multi table COUNT in NHibernate with joined subclasses

I have been trying to find a way to do this query using a NHibernate criteria (preferred) or HQL, with no luck. Here is the query: select COUNT(sa.Id) from Accounts a join Sources s on a.Id = s.Account_Id join SpecialArticles sa on sa.SpecialSource_Id = s.Id Notes: SpecialSource is subclass of Source and is mapped as a JoinedSubCla...

Webforms to Winforms

I am what I would consider a very experienced web developer, not to mention programmer in general. One area I have never seriously moved into is winforms development. Could someone recommend some resources that would be assist me in getting familiar with winforms? Many of the resources I have found are less than desirable in that they ei...

AJAX Accordion renders scrollbars in Firefox but not IE

Hi all, Having a bit of a problem with the AJAX Accordion Control... I have two panes, one of which is open by default, but in Firefox it displays scrollbars across both axis - when you extend the second panel, these disappear. In IE no scrollbars are rendered - which is what i'm aiming for! Using FireBug, I can see that when the Acco...

WIX 3.0 Generate Features from .NET projects.

I have a large .NET source tree (185 C# and VB projects, of which 60 are apps or websites) that i want to create a wix setup for. The general idea is to have 1 setup msi and to make each executable a feature, and to have each app be installed in a separate directory. like %progfiles%/company/app1 /app2 ...

Using external objects from MarshalByRefObject descendant in .NET Remoting

I'm using .NET Remoting to communicate between client and server applications. The MarshalByRefObject on the server side activates as singleton. The question is: how can I get from this object some other objects that have been created in server application runtime? Here is a simple example: what if the remote object needs to show somethi...

Updating a product?

Hello All, I am having a page view products and in that grid I am having a Edit link whick takes me to the edit page and now On the Edit I am having a file upload control. How will I use the request.files because while editing something We use collections in the controller class please tell me how will I do this, It is very necessary. ...

Image loading memory leak with C#

Hi, I have a memory leak issue in my application which loads a large amount of images. I'm rather new to C#, and thought my days of memory leak issues were past. I can't figure out the problem - maybe I'm using some unmanaged modules which I'm not handle correctly? To illustrate my problem I've simplified the core of what causes the p...

Facebook Developer Toolkit - Publishing a Message

Hello, I am trying to use the Facebook Developer Toolkit (http://facebooktoolkit.codeplex.com/) to publish user messages from my .NET applicationn. I have a user id for a facebook user. My question is, how do I publish a message to this user's Facebook stream? Currently, I written have the following code: ConnectSession session = new...

Microsoft Server 2003 with .NET 3.5

As a follow-up question on this; The server running is a Microsoft Server 2003. Are there any possible (bad) outcomes when trying to install .NET 3.5 on such a server, that only has 1.1 installed and running in order to split up web-applications based on 1.1 and 3.5? ...

What Can be Done to Resolve the Font Rendering Issues in WPF applications?

It seems like it would behoove me to learn this GDI replacement, WPF. I dropped some controls on a new WPF project and started looking around. It's obvious the playing field has changed again. If the past has taught me anything, I know I need to get this this thing under my belt (like it or not). That being said, I'm not sure I can g...

Active Directory authentication WCF service for multiple domains - how?

I am working on a WCF service (not externally available) that will authenticate users against Active Directory in two domains for users of our .NET 2.0 WinForm application. The authentication portion is mostly working, but I'm having some problems modifying Active Directory. Here are the basics on the situation and the requirements. So...

Read text file within a .NET project

Is there a way I can open and read a text file within a .NET project? I know I can use the System.IO.StreamReader class to do it for a Windows text file. I'd like to store some SQL scripts for upgrading my database in text files within my project. Since I'm writing this in VB I can't just paste the scripts directly into my code due to l...

How to use the secure desktop in Windows Vista and W7?

Windows Vista added a new feature called the "Secure Desktop". It looks great and really draws the user's attention. But now, I want to use this desktop in my .NET/C# or Delphi/WIN32 application. And use it for my own dialog, which will ask the user for about 5 different but sensitive pieces of information. Is there a way to use it in ....

Passing user's identity across tiers with ASP.NET and WCF

I'm new to WCF. Let's say I have two asp.net apps, one that uses windows authentication (an intranet app), and one that uses forms authentication (an internet app). I want both of these applications to have a service reference to a physically separate machine where all my business logic will live (in WCF). So, the app is like this: Brow...

Entity Framework Association b/t non-keys

Is it possible to create associates b/t 2 non-key fields in the Entity Framework? Example: Take the 2 tables in a legacy application (i.e. keys/structure cannot change) Order - OrderId : int : PK - OrderNo : varchar OrderDetails - DetailRecordId : int : PK - OrderNo : varchar In the Entity Framework, I want to create an associatio...

FxCop command line and paths with spaces

I'm having problems getting the FxCop command line to work when I specify paths with spaces in them. Yes, I use the quotes properly. M:\build\IOService\src>"c:\Program Files\Microsoft FxCop 1.36\FxCopCmd.exe" /c /f:".\My Library\bin\Release\" /r:"c:\Program Files\Microsoft FxCop 1.36\Rules\" Microsoft (R) FxCop Command-Line Tool, Versio...

Building an installer that can install the same package multiple times (to different folders) with multiple configurations

Hi, We have a bit of an odd setup, which comes from the fact we provide hosted installations of our software to our clients, and each client may be on a different version of our software and be running with a seperate database. We also allow clients (under a different licensing scheme) to install our software locally at their premises...

Is is possible to check if an object is already attached to a data context in Entity Framework?

I am getting the following error when trying to attach an object that is already attached to a given context via context.AttachTo(...): An object with the same key already exists in the ObjectStateManager. The ObjectStateManager cannot track multiple objects with the same key. Is there a way of achieving something along the lines o...