.net

.Net 4.0 Framework Causing Issue for aspnet_regiis during installation

Hi Folks, We have a ASP.net 2.0 web app with an installer which appears to hit an issue with .Net Framework 4.0. This has occurred on XP and Windows 7. Seems to happen every time. During the installation, we call aspnet_regiis for various tasks such as encrypting the web.config. If .Net 4 is installed this throws the error: aspnet_r...

WCF Data Service Proxy Class

I am pretty sure this is a stupid question, but here goes anyway. I have a WCF Data Service exposing an object, let's say Person. This Person object is in the namespace Domain.Person. I have a client with a proxy to the WCF Data Service. This client has code that works with the referenced Domain.Person class. However, the proxy is return...

How do I enable SecuredSettingsEnabled when using AxMsRdpClient to connect rhough RDP to a Cloud Instance?

Hey everyone, I've searched the web high and low and just cannot wrap my head around this. Basically I want to connect to a windows server 2008 instance, located in the cloud and run a batch file (which is located on the instance). I'm using the AxMSTSCLib and MSTSCLib to connect to it through RDP, but cannot get the batch running. T...

How can I rearrange string with SQL?

Declare @CustTotalCount as int Declare @CustMatchCount as int select @CustTotalCount = count(*) from ENG_CUSTOMERTALLY select @CustMatchCount = count(*) from Task where MPDReference in( select ENG_CUSTOMERTALLY_CUSTOMERTASKNUMBER from dbo.ENG_CUSTOMERTALLY) if(@CustTotalCount>@CustMatchCount) select distinct substring(ENG_CUST...

How to disable an exe file after first installation?

Does anybody know the solution for this? I create an exe file of my software. After first installation I have to disable the exe, so it cannot be run again because when someone purchases the software from me they can install it only once. ...

Passing A Lambda into a method with MVCContrib

I have a method in my class that takes a bool and returns a string so that the user doesn't see true or false in the view. I am then trying to use this method in the MVCcontrib grid public string BidStatusText(bool status) { if (status == true) return "Bid Confirmed"; else if (status == false) ...

Finding the Installation location of a silverlight OOB App

Is there any way to find where an OOB app is installed at runtime? I realise that once an OOB app is installed it is placed in a folder in "OutOfBrowser" within AppData. However, the folder is named with a long number (probably time stamp related) which I wont know as it changes on each installation. As I would like to launch the OOB app...

Autmatic update-search + download + start?

Hi, I have a DotNet Application, a little tool. I devliver it as a "exe"-file, no installation, no DLLs. I will now have a automatic update-search (Timer?!), if and update is found, the exe should be closed and the new one should be downloaded and start. How to do? Develope a second tool that assist the first tool, or is there an add...

writing a DSL for the .Net platform

I am thinking of writing a DSL to be run in the .Net environment. I am most likely to implement this in C#, though I am flexible on this. Is there a recommended online resources that show the main steps involved in writing a DSL for the .Net platform? Ideally, I would like a resource that would provide at least an overview on the follo...

Have OptionalField been obsoleted in C#?

It seems that the OptionalFieldAttribute is not longer (if ever) needed for serialization with BinaryFormatter. With a example from codeguru there is no longer any exception thrown when building the code in Visual Studio 2010, even when targeting older versions of the .NET framework. Another question on stackoverflow suggests that it's...

How .NET build / compilation works

Hi, I was trying to find some simple overview but found nothing. So I hope someone will help me here. I would like to know what is the flow of compilation/assembly process in .NET. I just know: 1)The code is compiled into CIL 2) 3) ... 4) Executable binaries ...

Rx: Are observables "repeatable" like IEnumerable, and if not, how does this code work?

Yesterday I watched the screencast Writing your first Rx Application (on Channel 9) where Wes Dyer shows how to implement Drag 'n' Drop using Reactive Extensions (Rx). Something that I still don't understand: Towards the end of the screencast, Wes Dyer types in the following: var q = from start in mouseDown from delta in mouseM...

Reading INI files using Nini / .NET

I'm using "Nini" to read INI files. It works well but I've just found a problem that could be a bug. Do you know it? The situation is when I read a string (using 'get' or 'getstring' functions) which contains = or " signs Nini stop reading the rest of the line and ignore it. It seems that it stops reading after some characters, but I co...

How to export constant strings from .Net to COM?

I have a .NET DLL which I call from a VB6 project. Until now, I've had a public static class with a bunch of public const String STRING_NAME = "STRING VALUE"; When I needed to use one of them from VB6, I directly wrote inline the literal value in the code. Now I'd like to replace those literals with the .NET constants. I have t...

Calculating Total Count of Items in List<T> for multiple KeyValuePairs in Dictionary<string,List<string>>

I have a Dictionary<int,List<string>>. I have multiple KeyValuePairs so int the first KeyValuePair the List may have 10 items in it, the second KeyValuePair may have 100 etc. I need to work out the total count for all items in each list so in my example above I would have a result of 110. ...

How to add RSS feature to my web site?

Hello everyone, I am using VSTS 2008 + C# + .Net 3.5 + IIS 7.0 + ASP.Net to develop a simple web application. I want to add RSS feature to some of the pages of my web site, so that people could use their popular RSS reader to receive notification of content update. Any easy way to do this in my development environment? I only need very...

Outlook Email Send event raised on Background Thread

I am creating an Outlook Mail Item object and watching for the Send event. All appears well, but when the Send event fires, the event is raised on the background thread of my application. The reason this is a problem is that this event creates a record of the email sent through my application, which is added to a collection of objects. T...

Filtering out bad characters using a Regular Expression

I have a string which has to be matching @"^[\w*\$][\w\s-\$]*((\d{1,})){0,1}$". If it doesn't match this regex i want the characters that do not match to be deleted from the string. How can i set this up? ...

Serialization bugs in .NET?

I'm reading up on serialization, and have so far been messing with BinaryFormatter and SoapFormatter. So far, so good - and everything have both Serialized and Deserialized perfectly. However, when I try the code below, I would expect my datafile to NOT contains the info for Name - and it does. Why would it contain that, when I specify ...

Merging two or more visual studio project into a one project

I am working on a solution that contains bunch of projects. I am going to refactor the solution by merging some of the projects together. Is there any tool or visual studio extension that helps me refactor my large solution by merging one or more projects into on project. Of course this can be done manually but I am hoping for a more a...