.net

Progress Bar help

Hello, I'm very much new to programming and have been doing fairly well so far. But progress bars still confuse me. The web unfortunately has to many differing examples for me to get anything out of them. Some say to use background worker some don't, etc. Below I have what I THINK should work but doesn't. Its just supposed to she a progr...

Entity Framework with strongly-typed MVC

I'm using the ASP.NET MVC and the ADO.NET Entity Framework together. I want my Views and Controllers strongly-typed. But how am I supposed to handle entity associations? Here's a simple example: A Person has one Department. A Department has zero or more People. My controller passes an instance of a Person object and a collection ...

What is the best way to encrypt a lot of large images?

I need to encrypt a lot of large JPEG files. The pictures are very sensitive and need to only be decrypted inside my application. Because of the number and size of the images, speed is an issue. ...

How a client side object (Proxy) register to an event to be fired on the server side?

I would like to make a class where the client side (proxy) of the instantiated object can register to an event (or delegate) and be informed whenever this event is fired on the server side. I tried directly but I get a SecurityException informing me that System.DelegateSerializationHolder cannot be serialized at this security level. Is...

print preview doesn't show barcode

When I write to the windows form directly it looks fine, when I print to the printer from the print preview it looks fine. However the print preview itself is not rendering the barcode text with the barcode font. Public Class frmPrintPreview Private Const testString1 As String = "*A1C1S1B1*" Private Const testString2 As String = "*A99C9...

How do I detect the application closing?

I'm building a component in a server application that manages connections between my application and an external service. My component detects when the server is unavailable, starts a background thread until the service becomes available, then re-enters a "working" state. My problem is that if the process calling the component exits whi...

AutoSize ElementHost in Excel 2003 ActionsPane

Hi, I'm hosting a WPF chart in an Excel 2003 ActionsPane. The chart is set to stretch both horizontally and vertically, however, although the ElementHost and the chart fill the ActionsPane horizontally, I have not found a way to enable the ElementHost to fill vertically. The only property that seems to have any affect on the layout of t...

Anybody else regretting using Entity Framework?

I have a project that implemented Linq To SQL, and I was pretty happy with it. For quite awhile the biggest problem was just that the designer was buggy. Unfortunately, my project now requires multiple table inheritance, and Linq to SQL does not support it. I decided to switch to Entity Framework when I learned that it does support mul...

Entity Framework with ASP.NET MVC

How can I use strongly-typed Controllers with EntityObjects? My failures... First I tried this: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(Guid id, Department Model) { db.SaveChanges(); return RedirectToAction("Index"); } This failed to actually save any changes to the database. So, I tried to attach the model t...

Environment.GetFolderPath(...CommonApplicationData) is still returning c:\Docs&Set on Vista

As i understand it, you're supposed to use Environment.GetFolderPath method so you have OS independent code... WinXP uses C:\Docs and Settings\ Vista uses C:\ProgramData and c:\Users I'm using the code below on a vista computer and it's returning a c:\documents and settings directory instead of c:\ProgramData like it should... Any ide...

.Net Encryption

Similar questions have been asked here, but their answers are not enough to me. What I would like to know is the definite approach to encrypting connection strings in a config file. Here are my questions: Using machine-level encryption, can't anybody accessing my server write a little .Net program to read the contents of the connectio...

Help : Found conflicts between different versions of the same dependent assembly using SQLIte

One of my projects uses Elmah, which references SQLite. Elmah is built against SQLite for .Net version 1.0.44.0 well I was experimenting with some 64 bit stuff (my dev box is 32 bit) so I needed the 64 bit version of SQLite for .Net. I grabbed the latest build of it (1.0.51.0 at the time) and used their installer to install it. For my 3...

.Net Remoting without using .Net remoting?

After some advice more than anything. I have the following example. Appication1.exe - Has object MyList Application2.exe - Needs to gain access to MyList and interfact with the object as if it was created from Application2. My question is - should I be using .Net Remoting (ie 2.0) or WCF or another technology stack? What framewor...

How can I access a running instance of a .NET standalone executable from a .NET Dll or Exe?

I have have an application which consists of an windows form project and a class library project. When it starts the executable sets a static value in the dll. using MyClassLibrary; namespace MyExeApplication { public partial class MainForm : Form { Hashtable ht = null; void Form_Load(...) { ht = ...

How to make OpenFileDialog accept "valid" URIs

I need to use OpenFileDialog to input a URI or local path. The problem is that the schema of the URL is not something windows knowns about (or should know about because it's a hack for testing). I can turn off all validation and as long as I don't feed it a invalid chars it returns but then it will happily eat anything else and that isn...

.NET 2.0 program (VS 2005) runs in Visual Studio but not from Windows Explorer

Has anyone seen this? There is a few second delay, then one of those dialog boxes saying "Yada Yada has encountered a problem and needs to close. We are sorry for the inconvience." (This is weird because my program has an exceptional handling system that gives useful error messages if the exception is thrown within my code, but it is cl...

Send message to .NET app from javascript?

I'm working on a help system in HTML, and I'd like to have links that the user can click to execute commands inside an application written in .NET (eg, to complete steps in a tutorial or workflow). I've looked at the TCard() method for HTML help, but it only works in compiled help (.chm), and I'd like to do this in plain html that can b...

OracleConnection throws EEMessageException in managed C++

I have an native C++ app which needs to connect to an Oracle DB. Oracle data layers written in C#.Net so was hoping to reuse the code as a dll. I decided to try using managed C++ to bridge the gap between native C++ and C#. The managed C++ adaptor layer works fine (almost). The unmanaged C++ exe can invoke various classes and meth...

Is an apostraphy allowed to appear unencoded in the content occurring between start and end XML tags?

In an attempt to write an RSS reader I ran into problems with the .NET XML Reader throwing an exception if an unencoded apostraphy appeared between the start and end tags found in an RSS feed. I am wonderring, is the XMLReader in .NET 2.0 not completely standards compliant? Or did I run into someone's buggy implementation of a feed gene...

Which CRT version is bundled with .NET 3.5?

To minimize deployment package, I'd like to know the CRT versions which are already included in .NET redists. The info I've already gathered are: .NET 2.0 -> CRT 8.0.50727.42 .NET 2.0 SP1 -> CRT 8.0.50727.762 However, I cannot find the CRT versions for .NET 3.5. I roughly remember I used to come across a blog page list all the version...