.net

IIS 7.0 Error - 500.19 Internal Server Error

Hi I am currently on a shared hosting plan with iis 7.0 I have an asp.net mvc application in the wwwroot of my hosting. Now I made a virtual directory to store my webservice in(I don't want to have to host this on a sub domain and pay extra) However when I put my web service code in my virtual directory and try to run it I get this E...

Validate for a valid SQL string

Is there a way (or existing library, not necessarily built into .NET) in C# that performs simple SQL string validation? Scenario: Building update statement to reduce load on SQL load vs. individual statements. In case the string build does something "odd", like ending with a comma for instance, I'd like to be able to validate that the s...

Fluent NHibernate: ManyToMany Self-referencing mapping

Hi, I need help in creating the correct fluent nh mapping for this kind of scenario: A category can be a child of one or more categories. Thus, resulting to this entity: public class Category : Entity, IAggregateRoot { [EntitySignature] public virtual string Name { get; set; } public virtual IList<Category> Parents { get; s...

Communication between c# and MySql solution required

I am developing Desktop application using c#.net and MySql. Is there any solution to communicate with MySql with out any extra dll file. as I am using MySql.Data.dll and I have to put that file with my exe file which is not feasible solution. ...

Anyway to override a bool property with a Nullable<bool> property

I'm almost sure the answer is simply no, you can't do that. So I'm working on options for my app. I've got a decent setup so I have the global options and the local options since you can have different options selected on different tabs. For the global options I want to represent when an option isn't consistent across all the tabs by r...

Reporting System Architecture

We have built enterprise/LOB software that, for example, manages orders, customers, inventory, etc. in .NET 3.5 and SQL Server 2008. We do all kinds of reporting such as traditional reports (SQL queries) dashboards (with charts, lists, etc.) alerts (e.g. if an order is cancelled, email a supervisor) Right now, we are querying our op...

how to check the range and number of records in that range without using cursor ?

Hi All, I have a table "RANGES" with the following columns LowRange as int HighRange as int with the data similar to below select * from Ranges LowRange HighRange 1 100 101 200 201 300 . . . 901 1000 And another table "infoDetails" with the following columns Range as INT amount as money ...

Connecting to sql server database mdf file without installing sql server on client machine ?

I am creating a window application that need to use sql server database. I want to install this application to client machine without installing sql server so that my application can still connect to a database i.e mdf file that i will be providing at client system. How can i connect to a database(mdf) on client machine through my win...

C# Returning object from Array leaves pointer to Array item

I have a List<T> and I do the following: var myObj = List[2]; //Return object at position 2 myObj.Name = "fred"; //If you look at List[2] its name has changed to fred I tried the following but it still updates the item in the List var newObj = new MyObj(); var myObj = List[2]; //Return object at position 2 newObj = myObj; newObj.N...

Get unread Mails from Outlook

Is there any way to get all mail from an specific Folder into my Application? ...

Null value checking

i have one issue attrval[5] = WrmService.WindowsAgent.AgentVersion; From above if attrval[5] is null or not getting any value or any strings other than numeric values i want to assign attrval[5] to value '0.0.0.0' otherwise i will display the numeric value which is coming.What coding i have to implement here and finally at UI there a...

Getting changed entities from NHibernate session

Hi all, I wonder if there is a smooth way of keeping track of changed entities using NHibernate. Session.IsDirty() is a fine way of knowing there are changes, but not which. Up to now, I've logged my changes in a List to be able to specify them later on. Eventually I would loop over that list and call Session.Save() on each of them an...

Using multiple folders per project in Visual Studio 2008

I would like to know how to have multiple folders per project in Visual Studio. Of course namespaces and DLLs have to be the same when the solution is built with or without using multiple folders. I tend to be forgetful at things especially this one and forgot to bookmark the link. As far as I know it is an answer in SO. I looked at ...

Data Binding and controls

We have the following operation to be performed on the control in our WinForms application. public class BindableDataItem { public bool Visible {get; set; } public bool Enabled {get;set;} } Now we want to bind the BindableDataItemto a TextBox. Here are binding association. TextBox.Enabled <==> BindableDataItem.Enabled TextBo...

Link against non specific version of an assembly ?

I'm getting an error like this in an application, Could not load file or assembly 'MySql.Data, Version=6.2.2.0, Culture=neutral,PublicKeyToken=c5687fc889699c44d' or one of its depedencies. The located assembly's manifest defenition does not match the assembly reference. Which is expected, as this installation happened to...

Is there an easy way to convert an image to grayscale with .NET

I need to convert all the images in a folder to greyscale (I believe their gif files if that matters). Any suggestions? I have .NET 3.5 (sp1) ...

How to find bad endpoints earlier?

When I try to connect to an unavailable machine, I get an EndpointNotFoundException but it takes too long (about 20 seconds). Setting closeTimeout, openTimeout, receiveTimeout or sendTimeout has no effect. Can I get that exception earlier? ...

Control.Invoke getting 'stuck' in hidden ShowDialog

(I have a workaround for this problem, but it's not the first time I've been bitten, so I'm trying to understand exactly what's going on.) From my application, I ShowDialog a form. On the form is a button, which when clicked calls code on another (non-Gui) thread. The non-GUI thread sends back statuses (Pushed then Released) via a Con...

Can Anyone recommend a well design open source project with Entity Framework?

Can Anyone recommend a well design open source project with Entity Framework? I had some tastes about the Entity Framework 4, but I would love to know how people use this framework in some large projects. Many thanks. Daoming ...

Multiple ordered translate / scale transforms in GDI+

I have a number of graphics objects which I am plotting in a graphics context in a windows forms application. There is some interaction with the ui element in which the paths are rendered which allows the user to pan, zoom and set an origin for the zoom point. The question I have is, is it possible to set up a sequence of transform opera...