.net

Control.EndInvoke resets call stack for exception

I don't do a lot of Windows GUI programming, so this may all be common knowledge to people more familiar with WinForms than I am. Unfortunately I have not been able to find any resources to explain the issue, I encountered today during debugging. If we call EndInvoke on an async delegate. We will get any exception thrown during executi...

Count checked CheckedListBox items

Hi! I have CheckedListBox and four item in it! Now I want to count number of checked item. For this I use: countnumber=CheckedListBox1.CheckedItems.Count But countnumber is always 0 even if I checked CheckedListBox items or not! What I am doing wrong? ...

Howto set my IServiceLocator implementation as ServiceLocator.Current?

I'm working on replacing Unity with Ninject in the Prism framework. This requires me to implement a Ninject specific IServiceLocator. From what I've understood I can inherit the ServiceLocatorImplBase instead, so that's what I do. Now how can I set this to be the Current ServiceLocator? I need this in order to have e.g. the RegionManager...

How to display a DateTime with chosen date parts, but in the order of the FormatProvider?

I want to display the date in the order that the culture provides, but with the elements I want only. The DateTime.Tostring() method has a list of patterns that are very useful but I would like a very small change in it. The CultureInfo used in the following the following code are chosen as example, I don't want to rely on a specific l...

WCF: Share Libraries with non-.NET webservice

Hi, I have exposed a Sonic ESB process as a webservice and wrote a .NET application to upload data to it by calling its methods. To this end, I have a library of complex object on the .NET side that I added in xml format to the web service definition on the Sonic ESB side. This is a necessary step in exposing the Sonic ESB process, be...

How to install other setups before installing the main application using .NET's Setup Project?

Hi, I have created an application for which I want to create an installer using .NET's Setup and Deployment project. The problem is that my application requires certain setups (Drivers, SDKs etc.) to be installed before it. I want these to be installed first and then the main application. How do I do it? ...

Castle ActiveRecord Save() will update but not create

Hello, I'm updating a program and adding a new table to the database. The program uses Castle's ActiveRecord with repositories. I've set the classes and repository up and can get the test case out of the database fine. However, when I try to add a new record to the database, nothing happens. No error and no new record. If I get the test...

MPIexec.exe Access denide

I have installed microsoft compute cluster and MPI.net, now i have trouble to run program using mpiexec.exe on cluster. When i try to run it on console i get message: "Access Denied", and pop up: "mpiexec.exe is not valid win32 application". I tried google it, but found nothing. Pls help. :) ...

NHibernate 2.1 MsSql2000Dialect error

Hi. I had an old (but great) app using NHibernate 1.0.2. Worked like a charm. But then I decided to upgrade to NHibernate 2.1.2. Had to change some stuff, worked great also. Problem is, I founded out that new version works in some machines and do not work in others. What the heck? Thinking a while, I discovered that it only works in p...

Difference between Url.Action and Html.RenderActionLink and Html.RenderAction

Whats the difference between Url.Action and Html.RenderActionLink in asp.net mvc? ...

Deployment project in VisualStudio: Is the output in Debug or Releaase mode?

I have a solution in Visual studio containing a winform project(WinProj) and a deployment project for WinProj. I added to the deployment project the primary output from WinProj. Does it be compiled in Debug or Release mode? I am asking because in the WinProj code I have conditional precompiler statements #if DEBUG throw; #endif ...

nHibernate Domain Model and Mapping Files in Separate Projects

Is there a way to separate out the domain objects and mapping files into two separate projects? I would like to create one project called MyCompany.MyProduct.Core that contains my domain model, and another project that is called MyCompany.MYProduct.Data.Oracle that contains my Oracle data mappings. However, when I try to unit test this...

Show alert message box from the Global.asax (on Application_Error event)

Normally I just redirect to a custom error page in on the Application_Error event, but I have a specific error for which I'd like to display an alert message while the user is still on the page which triggers the error. How can I make this happen? I'm open to a modalpopup or any other type of error message, I just want to ensure the us...

How to update a custom dependency property when the datasource list changes

Hi We have a user control with a custom dependency property (DP). The DP is bound to an ObservableCollection. When a new item is added to the collection programatically, the databinding does not update the target DP. Why? We think it's because, unfortunately, in our case the target is not a ListBox or ListView, but a Canvas. The DP, whe...

Html.ActionLink showing query url instead of pretty url.

The Html.ActionLink <li> ${Html.ActionLink<HomeController>(c => c.Edit(ViewData.Model.Id, ViewData.Model.Title), "Edit")} </li> When created as html shows the URL to be Edit/5006?title=One . How do I change this to a pretty URL like Edit/5006/One ? My Edit Action method is public ActionResult Edit(int id, string title) ...

How to Remove Top-level bookmarks from PDF using LiveCycle?

Hey fellow LiveCycle users (the few of you), I have been using the MTOM .NET API for LiveCycle development and I'm running into one limitation that I hope can be overcome: I need to be able to programmatically remove all top-level bookmarks from a PDF, and have all nested bookmarks get automatically moved up one level as a result. For i...

HowTo: obtain culture dateTime format

?string.Format(CultureInfo.GetCultureInfo("en-US"), "{0:d}", now) "4/12/2010" ?string.Format(CultureInfo.GetCultureInfo("fr-FR"), "{0:d}", now) "12/04/2010" I want to write a method: string GetDateFormat(culture) ?GetDateFormat(CultureInfo.GetCultureInfo("en-US")) "M/d/yyyy" ?GetDateFormat(CultureInfo.GetCultureInfo("fr-FR")) "dd/MM...

In NHibernate, how do I combine two DetachedCriteria instances

My scenario is this: I have a base NHibernate query to run of the form (I've coded it using DetachedCriteria , but describe it here using SQL syntax): SELECT * FROM Items I INNER JOIN SubItems S on S.FK = I.Key The user interface to show the results of this join allows the user to specify additional criteria: Say: I.SomeField = 'Use...

Creating a subscription based website in ASP.NET

I'd like to update my website to make it subscription based. It's a ASP.NET Web forms project. I am looking for the following functionality: Ability to have users sign up for different plans (Gold, Premium etc) Ability to have users upgrade / downgrade to and from plans Ability to hook this up to a Payment processor Ability to have a c...

.NET platform, .NET environment or .NET framework which is correct? And what's the difference between platform/environment/framework?

In some documents (i.e. ECMA-334) the name of '.NET framework' is used, but in other documents (in many books), '.NET platform' is used. I saw someone refer .NET as .NET environment. Which one is correct nomenclature for .NET? In general, what's the difference between platform/environment/framework? ADDED It's not easy to see that t...