.net

How can I create an Outlook PST file using .Net?

I'm writing an app that will manipulate Outlook data. I want to make a backup of that data first and am hoping I could just loop through the contact/calendar items, etc and write them out to a PST file. How can I write the contents of 1 or several Outlook folders to a PST using .Net? [vb or c# no matter] ...

Stream Read Problem

Suppose we have a code block like this : //Assuming s is a stream: byte[] data = new byte[1000]; s.Read(data,0,data.Length); The read Method could read anywhere from 1 to 1000 bytes, leaving the balance of the stream unread. This is what a C# book says. I don't understand,why Read method would read anywhere from the stream ...

Visual Basic & Context Menu

Is there a way to add a Header to the popup menu? I don't find a property for this. ...

Add event handler for WCF concrete class instance

Is it possible to retrieve the concrete class instance from the ServiceHost, so that I can add an event handler for the events of that class? Public Class Widget Public Event MessageCalled(sender as object, e as EventArgs) Public Sub DoSomething() '-- do a whole lot of stuff --' RaiseEvent MessageCalled...

Understanding Covariance and Contravariance in C# 4.0

I watched a video about it on Channel 9 but I didn't really understand it much. Can someone please give me a simple example about these that's easy to understand? After that maybe how it would be used in practice? ...

Calling LocalReport.Render in background thread

I have been working with the Winforms ReportViewer control for a while now. I have added a custom toolbar, and am handling all report functions manually. My problem is with extra large reports. In order to render my reports to Image (which I use to print) I call the ReportViewer.LocalReport.Render method. Larger reports end up free...

Uploading files across domains in ASP.NET

Having a little trouble and i wanted to see what you'd all suggest. Thanks for your input. We have an ASP.NET website, one feature is that this website will allow users to upload files and then the server saves them to a UNC path. Some of our users cannot upload the files. I think this would likely be security issues as these users ar...

Visual Studio 2008 .Net - Step Over Current Process

I try to debug several applications that communicates with each other - and want to have ability to step over without switching to another process/thread. So Visual Studio has command "Step Over Current Process (Ctrl-Alt-F10)" - which looks like what I want but it's disabled, why? I've found the same question but for C++: http://stackov...

How to run CruiseControl.NET task but only after a specific task ends?

For example I have three tasks: task1, task2, task3. How to write a CruiseControl.NET configuration file that runs task3 but only after task2 ends with success? ...

Debugging .NET Problems on Remote User PCs

I support a .NET IE Toolbar, for a population of users that have a variety of OS and IE versions, in a variety of remote locations. For a small number of these users, the toolbar installs properly, but never actually loads when they try to enable it in IE. We haven't been able to replicate this situation on our test pcs. Most of our su...

MVC IgnoreRoute to ignore requests coming to a specific folder

My site is under the bombardment of some image requests for images that don't exist on my server. Seem to be porn related images that got nothing to do with my site. Pattern is like this; /loc208/th_e82_shower028.jpg /loc171/th_251_shower014.jpg /loc295/th_21e_shower052.jpg so they all look under /loc* folder Is there a way I write...

Generate a PDF from an ASPX page

Hi, I have a form with all the data, I need to generate the PDF. Also there are some attachments like word files. Is it also possible to embed the contents of the attachment in the PDF? I am mainly looking for a solution for #2. ...

Unique value in StackTrace?

Background: I have written a generic logging library in .NET 3.5. Basically the developer needs to call the Begin() method at the beginning of their method and the End() method at the end of it. These methods do not take a parameter - the library uses the stacktrace to figure out where it came from. The library has a collection that k...

Automatic combo box in datagridview in .net

dim dt as new datatable dt.columns.Add("Check", Type.GetType("System.Boolean")) datagridview1.datasource = dt A boolean type datacolumn a datatable, when bound to a datagridview automatically shows as DataGridViewCheckBoxColumn. With no code hassles Inclusion of what type of datacolumn in the datatable will populate a DataGridViewCo...

sending USSD in C#?

Hi, I want to write a simple c# application runs on windows mobile 6 which can send USSD messages Is there any library that could help me in doing this?? or is there any examples that explains how to use lineSendUSSD thanks ...

Receiving an 'InvalidPrinterException' - "No Printers are installed." Error

But I have several printers installed. I think the code is pretty standard... Dim printDocument As New System.Drawing.Printing.PrintDocument Dim pageSetupDialog As New System.Windows.Forms.PageSetupDialog pageSetupDialog.Document = printDocument pageSetupDialog.ShowDialog() Did I miss something? I can even enumerate ...

Document library in .NET

Hi, I'm looking for document library. Which allow users to tag files in certain categories but let files saved on PCs in network. This database let users search on intranet website. And use IIS as Web server and MSSQL as db server. Any Ideas? Thanks! ...

lazy initialization of singletons

While reading Jon Skeet's article on singletons in C# ( http://www.yoda.arachsys.com/csharp/singleton.html ) I started wondering why we need lazy initialization in a first place. It seems like the fourth approach from the article should be sufficient, here it is for reference purposes: public sealed class Singleton { static readonly...

Support for compact framework in subsonic 3.0?

I was wondering when support for compact framework and sql server compact edition will be added to the Subsonic 3.0 project? ...

Freeware Colordialog Control for .Net

Hello, anybody know any .Net freeware control for color selection (color dialog) that supports RGB, HSL and CMYK color models. I'm looking for something like this. Thanks. ...