.net

How do I make a WiX installer with a completely self-contained .NET 3.5 sp1 installer?

I need to include the full .NET 3.5 sp1 installer into my installer, which is in WiX. I need that boostrapper to be entirely self contained, with no web access at all. It is just not allowed for this installer to require the web; we have customers in outer Mongolia (I'm serious, not just using the place name because it's remote) to who...

Implementing a custom sort for WinForms ListView

I have a class called Picture and that has a name and size (int) property. I was going to sort them using size, but not the displayed file name which is the item name in the listview. I implemented IComparer<Picture> for the Picture type, and then when I write this: this.PicList.ListViewItemSorter = AllPictures[0]; or this.PicList....

Is it practical to build an ad-driven Smartphone app? (Compact Framework)

Theoretically, it is possible to embed ads into a winforms app running on a smartphone, with .NET CF. Is it practical to do? Are there ads available in "the right size" for the compact device"? How would I get topical ads? Will I get the volume of ad clickthrough that would justify the engineering effort? How would I get started ...

.NET Data Provider that can Insert 300,000 Records Really Fast?

I am making an application that is able to display log files and search throught them, in C#. I need data provider that can insert 300,000 records really fast. Does anybody have any sugestions? I am currently using Microsoft Compact server 3.5 and that is going really slow. I tryed sqlite but it performed slow because I could not do bulk...

Crystal Reports Merge Module for Visual Studio 2008

Visual Studio 2008 did not include Merge Modules for Crystal Reports. This means that if you upgraded your Windows Forms application from 2005 to 2008 the reporting application would no longer work on client machines. There are a number of conflicting reports over the web about the status of this - whether a merge module will be or has ...

Internationalize HelloWorld program .NET

I have small test app which has 2 resource files (Resources.resx & Resources.de-DE.resx) with the same exact string names, but one has the strings converted to German. For my form I set the Localize property to ture. In my application I am getting the strings as such: this.Text = Properties.Resources.frmCaption; In my release folder...

ASP.NET MVC: OutputCache and http headers - Cache-Control

Hi guys I have just started using OutputCache on some of my controller actions and I am not quite getting the response I would expect. Basically I have set Location = OutputCacheLocation.Any and the http header is as follows: Server ASP.NET Development Server/9.0.0.0 Date Wed, 15 Jul 2009 02:14:21 GMT X-As...

How do I format hours in DateTime to return 0 instead of 12?

By default, the hour in a format string for a DateTime transforms 0 into 12. For example, if you have DateTime dt = new DateTime(1999, 1, 1, 0, 0, 0); string s = dt.ToString("h:mm:ss"); the value of s will be "12:0:0", not "0:0:0". Is there a way to get "0:00:00" instead? ...

How can I maintain two separate projects but merge them into one DLL?

I'm hoping that there is just something simple that I am missing here. I am trying to maintain two separate projects ProjectName.Core & ProjectName.Infrastructure This is made in a typical Onion architecture so I can loosely couple my services and gain a greater flexibility. The Infrastructure project references the Core project. Once...

Why am I getting this message: Cannot convert type 'bool' to 'string'

Below is the code snippet that I am using. using System; using System.Collections.Generic; using System.Text; namespace businessTMS { public class SignIn { public string authenticate(String UserName, String password) { dataTMS.SignIn data = new dataTMS.SignIn(); string authenticate=(strin...

Deployment and automating update

Hi I have WCF client server application, and create msi setup projects for both projects. Server is a windows service that hosts WCF service, client is a WPF application. Now I have a requirement to automate client update mechanism. That is on client's open it should check is there updates in the server, if yes downloads and install and ...

Streaming audio file to another computer

Hello everybody, This is what I am trying to do. We are 5 people in a room. Everybody has a PC. Each PC has mp3 files but only one of the PCs has speakers (ex. called Speakers-PC). So, instead of asking the person on Speakers-PC to play you a song you want, I was thinking of an application that can take an audio file from a No-Speakers-...

Windows Forms visibility issue

Hello everyone, I am confused about how to make a Form visible. When we create a Windows Forms application, the default Form1 is automatically visible, even without explicit call to Show method. But if we want to show another Form and make it visible, we have to make it visible by calling Show. Any ideas why there is such differences? ...

How to handle dynamic GUIs in .net

Hi All, I've come accross a problem, that is probably seen pretty often, but has never really been discussed here. In my Gui, I'm adding Controls in a for loop to a Flowpanellayout. The point is to display "reports" from a database. It has to be dynamic, because the number of reports can be different from day to day. Pseudocode Addi...

.NET 1.1 and MS SQL 2005 problem

Suddenly I'm getting the following error on all web applications using dotNET 1.1 and trying to access MS SQL 2005. The applications and SQL server run on the same machine. System.Data.SqlClient.SqlException Message: General network error. Check your network documentation. I have googled the following and tried all suggested solution...

Possible causes of Generic Server Error message for SoapException

I am currently accessing a web service. The only message I got from the thrown exception is "Server Error." During the past tests, the only exceptions I encountered have HTTP error codes in it i.e. 401 Unauthorized, 403 Forbidden, etc. This one doesn't have it and it is really generic. Any experiences on what the possible causes are?...

Setter insection using named session instance strategy with structure map

Hello. I'm using Structure map and want to inject instance (constructed by container) into controller's property. Instance should be named and stored in http session context container. In the previous version of my application I've used custom DI framework and it was easy enough to make such things: public class MyController : Controll...

PropertyGrid RTL support

Is it possible to switch PropertyGrid to RTL layout? Seems to be that setting RightToLeft property to Yes does not do the job. There are RtlTranslateAlignments and RtlTranslateContent methods in PropertyGrid, should I use it in any way? If this property is unsupported are there free analogues that support RTL layout correctly? Note: I'...

How to Display Parent-Child Relationship in a single datagrid Windows Forms .Net

I need to know is there a way to dispaly parent-child relation in a single datagrid in Windows Forms .Net C# ...

Simple thread-safe non-blocking file logger class in c#

I have a web application, that will log some information to a file. I am looking for a simple thread-safe non-blocking file logger class in c#. I have little experience with threading. I known there are great logging components out there like log4Net, Enterprise Library Logging Block, ELMAH, but I do not want an external dependence for m...