.net

Sharepoint CMS vs UmbracoCMS

I work for a large local government organisation who are about to embark on using SharePoint to replace our ageing intranet with an all-singing all-dancing collaborative site. The focus for the intranet will be replacing random files, content pages and documents that are spread across the organisation with a SharePoint installation which...

StructureMap, LinqToSql, testing best practise

This is my first project using StructureMap, it is an MVC web app and I'm using LinqToSql for my dataaccess. I'm following the repository pattern so a large amount of testing will avoid the db. However, for my CRUD operations I'm going to have the DataContext create a new db for each test. My domain model is being held in its own assemb...

Real Time File sharing - Windows Mobile

Hi, Is there any technology, library or component that provide real time file sharing on mobile platforms like Symbian , and windows mobile?? RealRime File Sharing means, the ability to share for example word file on windows mobile (Group of users), and the ability to edit the file in real time by any one of the usrs , while the other...

How would one modify the Upgrade Code of an application after it is installed?

I have a .Net application (VS2008) that is already installed, and I would like to change its Upgrade Code on the machine on which it is installed. So - no recompile, just change the Upgrade Code. Is it possible? If so, how? (I realize this is not exactly a standard practice.) ...

Write to Event Log Windows Scheduled Task

Hi all, I have a console app that will be running through a scheduled task and what i'd like to do is have it write to an Event Log in a catch block. I've tried using EventLog.WriteEntry("My App Name","Error Message - " ex.ToString() ); but for some reason it is not writing the error. Am i doing something wrong? Thanks ...

Is it possible to handle exceptions within LINQ queries?

Example: myEnumerable.Select(a => ThisMethodMayThrowExceptions(a)); How to make it work even if it throws exceptions? Like a try catch block with a default value case an exceptions is thrown... ...

Getting bad generated code from "Update Service Reference"

In VB.NET (using Visual Studio 2008) my WCF service has an interface something like: <ServiceContract()> _ Public Interface IThingService <OperationContract()> _ Function GetThingByNumber(ByVal thingNumber As MyKeyClass) As Thing <OperationContract()> _ Function GetThing(ByVal thingId As Guid) As Thing ' ... End Inter...

Ideas on building in automation in an application

I am working on a .NET internal test tool at the moment. The tool is GUI based at the moment. One of the things I want the tool to be able to do is to run in command line mode. This way we can run it in an automated fashion and have it crunch on some data every day. We started to put in a Command line mode in it but I am just not happy...

Blocking Connections By IP

I need to able to block any and all connections to my pc from a specific IP address , i know this is possible with a firewall but i need to do this in c#. Any idea how (need code). Update : Its a generic C# app not asp.net , target platform is WinXp till Win7 ...

Is .NET Remoting really deprecated?

Everyone is saying how .NET Remoting is being replaced by WCF, but I'm wondering just how accurate that is. I haven't seen any official word that Remoting is being deprecated, and it seems to me there are certainly scenarios where Remoting makes more sense than WCF. None of the Remoting-related objects or methods have been deprecated, ev...

Embedding User Controls a bad idea?

I am embedding usercontrols in a panel and using DevExpress Navigator control to navigate from one to the other. What I am concered about is any implications to this method? I would give examples of what I am concerned about but then I wouldn't need to ask this question... I have a primary form, ShellForm that has a docked Navigator...

Visual Studio .NET - MbUnit tests using Gallio Integration - issues with multiple asserts

I am using gallio to integrate mbunit's test runner with the mstest test runner in visual studio. it works VERY well - except when I am running a test with multiple assert statements. The test will either pass or fail based on the FIRST assert statement. I know a lot of people are against multiple asserts, but they are unavoidable in cas...

WCF IsFault and FaultException

OK, I am getting myself a little confused here. I have a WCF service (service A) that calls another WCF service (service B). When I throw an exception on Service B e.g. throw new Exception("test") then service A does not get an exception, instead the IsFault is set to true on the response message e.g. responseMessage = forwardingChanne...

Why is CAS demo code running in localhost (127.0.0.1) not recognizing security zones?

I'm running the labs in MCTS 70-536 Training Kit chapter 11 about Code Access Security. I'm running XP Pro. The first lab creates an assembly which checks for different permissions and reports a message if they exist. However when I run it as \\\127.0.0.1\c$\ListPermissions.exe it is supposed to recognize being in the intranet zone and u...

Rules of Thumb in GDI+

I have been working on some GDI+ code in .NET and have been learning my lessons the hard way. Simple things like: What looks good on screen may not look nice on paper and vice versa Caching too many objects can result in an OutOfMemoryException Floats aren't exact ...and so on. I'm sure there is a lot more that experienced folk can a...

Table-Valued Functions in Entity Framework?

Is it possible to call a Table-Valued Function (TVF) using Entity Framework? I have three TVFs defined in my database, and they do not show up in the Entity Framework's model, or in the "Update Model from Database" wizard. It's easily possible to do this in Linq-to-SQL, you simply drag the TVF onto the design surface, but in L2E it doe...

Linq to Sql Add Child records

I have two entities in Linq to Sql setup as a Parent/Child relationship (Parent can have many Children). I have an existing parent record and trying to create new child records to be "added" to the parent. Let's use the familiar Order and OrderDetails model for explanation. I am trying a bunch of things to add my "child" to the parent...

How do I create a fixed-size ThreadPool in .NET?

Hi, I want to create a fixed arbitrary size ThreadPool in .NET - I understand the default size is 25 - but I wish to have a different size e.g. 5 or 10. Anyone? ...

Proper way in WPF MVVM to start a threaded lookup task

So I've got a task that can be preformed by my GUI that will pull information to populate a ViewModel with SQL database query response. Assume I want to start this task and keep my gui free to proceed with other things, and in the meantime play a "searching" animation, what is the proper way to do this in WPF/MVVM? I'm assuming you nee...

.NET WinForms DataBinding - BindingList<IBindableItem> where some implementations of IBindableItem may also implement IList

This is related to another question of mine, and unfortunately I'm having a difficult time summarizing the issue in my Title--so please bear with me. I've created a databindable class called Folder which implements a ITreeItem interface and inherits from BindingList<ITreeItem>. I have a second class, TreeLeaf, which is a leaf in the tr...