.net

Connect to network drive with user name and password

How do I supply credential so that I can connect to a network drive in .NET? I’m trying to retrieve files from a network drive and need to supply user credentials to access the drive. ...

Calculating x-height in .NET 2.0

How can we calculate x-height of a font (typeface) without needing .NET 3.0 or later (for example I would like to avoid System.Windows.Media namespace). ...

Can an ORM be use for a system where the access is thru methods that returns DataTables ?

We have a system (third party) where we access a web service to read data from its underlying database that returns .Net DataTable objects and in some cases even DataSet. The system sometimes (depends on the web method) accepts the modified DataTable/DataSet to update/insert/delete data. Other times, some web methods only have paramete...

Opinions and Methods to send Time Based emails

I have a website and would like to send out emails regularly one or twice a week. One method I know of sending a email say every thursday at 5:30pm would be to have a windows service start up at the correct time and open a webpage of my website. This page would be a hidden page which then would make all the emails and send them out! T...

ObjectSerializer.SerializeObject and nested classes

If I have a class with many child classes and I use ObjectSerializer.SerializeObject will it also serialize the child classes as well? ...

What is the most suitable .NET Web technology to implement this?

I will be interfacing with a third-party - the exchange of information is done as follows. If my application is the client and the third party is the server, then: Server-to-client: I give them a pre-defined URL and they push data with HTTP POST. The POST parameters contain a variable "xml" with the request in a proprietory XML format...

Can't use Mono Soft Debugger Remote Debugging because 'debugger-agent: DWP handshake failed' error

Hello! I've embedded mono in my application. The application is console application that supports plug-ins. Plug-ins are .NET assemblies. All work great, but i want to debug them. To enable debugging in my C-code i have: mono_set_dirs (ASSEMBLIES_DIR_NAME, ASSEMBLIES_DIR_NAME); assembly_add_to_bundle(API_ASSEMBLY); soft_debug = getenv...

Recommend an open source case managament system written in C#/.Net?

Hi, We are looking for a Case Management System capable of the following: 1. Ability to create different types of tickets each with different fields. 2. Ability to add validations which call external web-services (we are willing to use js as the last resort, but extensibility points will help). 3. Ability to create fields which pull dat...

How can i obtain an Sql Language name from a .Net Culture.

Hello i'm using SQL server full-text search. when i use the FreeText predicate it need the language as parameter, but sql parameters name is different from .net culture names. So my question is How can i obtain an Sql Language name from a .Net Culture. ...

Linq Expressions and Aggregate classes

How do I build Linq Expressions for aggregate classes? Let me explain with an example of what I am trying to do. Say, I want to find all employees with pay not equal to 50000 and here's the class structure. Employee e1 = new Employee { Name = "Jane", PDetail = new PayDetail { Salary = 100000 } }; Employee e2 = new Employee { Nam...

Can you recommend a step-by-step tutorial on developing C# Code Templates with MyGeneration?

Hi, Basically the documentation provided in the official web site is not helping me so much to understand how it works. Can you recommend a step-by-step tutorial on developing C# Code Templates with MyGeneration? Thanks ...

Control positioning & binding

I have been using WinForms since the first framework introduced and invested a lot of time and effort in it. Now I am attempting to move to WPF and, honestly, it's not so easy. Now I have a task, I need to implement a simple wizard, each page of which has a aligned to center group of controls. The group contains a set of buttons, four b...

Highlighting columns on a WPF DataGrid as mouse moves

I wish to highlight the columns on a WPF datagrid as the mouse moves. Some of the problems I face are: Getting the coordinates of columns to test for when the mouse is over them Changing the background color of a column Any help will be much appreciated. ...

How to store a non truncated varchar(max) string with NHibernate and Fluent NHibernate

My DB schema has a string as a varchar(max). I have read the other questions concerning setting Length to more than 4000 or 8000 so that it really generates a (n)varchar(max) in the mapping but when I use Length(10000) in my mapping class, the hbm file actually shows length="10000" and if I save an entity with more than 10000 chars, it i...

Generating html files in a console application

I need to get data from a database and I need to spit out this data in html formatk using my command line app. For this I am planning to use some sort of template-engine. I was wondering if there is anything in .NET that can do this for me? The best option would be if I could reuse the asp.net mvc template engine (razor) in my app, thi...

Adding line WPF control on ToolBox

I need to draw lines and dots (circles) in WFP. (VS 2010) I tried using Ellipse control for dots, but I don't have the line ones. I however added <Line element directly in XAML and this worked... but how I have the line control in the toolbox? ...

DragDropEffects.Scroll: why -2147483648 not 8?

A standard enumeration in System.Windows.Forms: [Flags] public enum DragDropEffects { Scroll = -2147483648, // // Summary: // The combination of the System.Windows.DragDropEffects.Copy, System.Windows.Forms.DragDropEffects.Link, // System.Windows.Forms.DragDropEffects.Move, and System.Windows.Forms.DragDropEf...

Draw lines and circles in WPF

I need to draw a graph like bus station schema: o-School----o-Church-------o-Police. So, simple line and circles. Also I need to zoom it. As I have VS 2010, I thought WPF(as I understood it uses vectorized graphics) should be the good canvas to start drawing. Is it possible, complicated, and what do you recommend for a WPF beginner. ...

C# Network Packet Spoofing

I am connected via ethernet to a simple I/O hardware device which is controlled by a very old, inflexible .NET driver. I've used WireShark to peek at the packets and they are very small, simple packets containing the name of the driver and a few bytes for data (unencrypted). Each packet receives a success packet from the hardware device ...

reading while open/writing to file in .net?

I notice many applications like firefox allow me to watch part of a video (using VLC) when the file is still downloading. I would like to do that with my application. When i tried opening the video with VLC i get an error. How do i allow reading when i write to a file? my open line is File.Open(fn, FileMode.Append) i do append so i ...