.net

Using multiple platforms in a single project

I'd like to use C#, Java and PHP in an upcoming project. What potential pitfalls should I watch out for? Are there advantages to using multiple platforms for a project? The target development team is people with varying backgrounds working over the internet on this project. Edit: Please be specific and let me know what possible proble...

How do I access a string(index) in .Net 1.1?

I have converted this existing C# .NET 2.0 code (which appears to take in a string with any characters and return only the numbers in that string): private static string StripMIN(string min) { string result = string.Empty; int digit = 0; for (int i = 0; i < min.Length; i++) { if (int.T...

Encrypting Windows Authentication connection strings

I am accessing an SQL Server database using Windows Authentication Do I need to encrypt the connection string in the web.config? Does the name of the connection string (or database) matter in terms of security? (viz: ApplicationServices? ...

Is there any good ORM for VistaDB?

Hi I'm looking for a good ORM for VistaDB database. It's for an small desktop application and it might expand in future. Open source solution will be preferred, but I'm ready to shell out if required. Regards, Vikas ...

Fastest socket method for a lot of data between a lot of files

I'm building a socket application that need to shuffle a lot of small/medium sized files, something like 5-100kb sized files to a lot of different clients (sort of like a web server, but still not quite). Should I just go with the standard poll/epoll (linux) or async sockets in winsock (win32), or are there any methods with even more pe...

Problems with DataContractSerializer - how to correctly serialize objects deriving from List<T>?

Dear ladies and sirs. Observe the following sample code: namespace A { [Serializable] internal class ComplexObject<T> : List<T>, IEquatable<ComplexObject<T>> where T : IEquatable<T> { private T m_state; internal T State { get { return m_state; } set { m_state = value; } } public bool Equals(C...

How to remove the current DataItem from being bound to a ASP.NET Repeater?

I want to evaluate the current DataItem being bound to a repeater and remove it from being added if my condition meets. I would have thought that setting e.Item.DataItem to Nothing would work, but it does not. Any ideas how to not add a DataItem to the repeater when a certain condition meets? Protected Sub rpt_OnItemDataBound(ByVal send...

MySQL local/online servers won't respond to C#/.NET

So, I'm sort of a beginner on C# and I'm working on this project that needs a connection to a MySQL database. I got MySQL's own library for this and, just to test the connection, I wrote this code: public object connectionTest() { MySqlConnectionStringBuilder builder = new MySqlConnectionStringBuilder(); builder.Server = "local...

Are there any .NET/ JAVA free or opensource SPAM detectors that yield good results?

I am looking for a .NET/ JAVA free or opensource SPAM detectors accesible via an API that yield good results. I would consider paying for a good service that accomplishes this as well, but ideally, I would like to go open source. Does any one have any good experiences with any or recommendations? Ideally, I would get the text/markup to ...

Silverlight 3 WCF Service `CommunicationException` Server returned error: NotFound

I have a Silverlight 3 application, which 95% of the time is successfully requesting data from a WCF Service (in the same webapp) and displaying it. This happens infrequently, usually if I hit the service a bunch of times quickly, but sometimes it'll happen on a single lone request. Every once in a while, if I request a lot of transac...

Creating a long running, nightly task in .NET 3.5 for use on Windows Server 2008

I have a long running, compute and disk intensive task that needs to run nightly on Window Server 2008; my Framework of choice is .NET 3.5 sp1. There's a chance this task could fail too for any number of reasons (i.e. lack of disk space) and I'd like to make sure errors are handled & reported reasonably. Also, this task would require p...

How to choose a WCF binding?

WCF binding chooser algorithm I have watched a speak at a TechEd conference that showed a simple algorithm for choosing a WCF binding. I can't find this algorithm but I remember some of the main ideas: If your WCF service will have non-.NET clients choose Http Soap If your WCF will have .NET clients in other machines choose Net Tcp If...

Best way to call back/noftify parent page of an event?

In a Silverlight 3.0 app, there is a shell page that serves as the navigation piece for a number of child controls and other Silverlight pages. The Silverlight pages are included in the shell page via the Frame object (). The pages are rotated dynamically via the code-behind file, so there isn't a direct reference to them in the xaml. ...

Mocking an NHibernate ISession with Moq

Hello, I am starting a new project with NHibernate, ASP.NET MVC 2.0 and StructureMap and using NUnit and Moq for testing. For each of my controllers I have a single public constructor into which an ISession is being injected. The application itself works just fine, but in terms of unit testing I essentially have to mock an ISession in or...

Will my object always "be there"?

If I have an object stored in memory, and I walk away from my application for an hour, will the object still be there when I get back? In other words, will the .NET garbage collector throw my object away because it hasn't been used for awhile? ...

How do I setup FitNesse for use with .NET?

I'm trying to get started with FitNesse for .NET on Windows Vista. In all tutorials I find on the web I'm told to execute the run.bat file, but all i get when downloading the latest release is a .jar-file. When i run this, the filestructure is unpacked and I can reach the fitnesse server by browsing to http://localhost. Now, when I'm try...

How to store custom settings for a WCF service?

People says that libraries shouldn't have configuration files. I can't pass arguments to my WCF service class from its host (but I can from the client). I don't want to store the configuration on the client. What should I do? ...

WPF - Updating DependencyProperty Metadata

What is the technical reason for not being able to update a DependencyProperty's metadata after it has already been set? If you try to do something similar to below it will generate an exception saying: Cannot change property metadata after it has been associated with a property. MyProperty.DefaultMetata.PropertyChangedCallback ...

How to find the Form that hosts a particular a Winforms Control within the Control?

I want to be able to access whatever Form hosts my control within the code of my Control, so like: myControl.ParentForm Is this possible? If so, how? ...

securing a clickonce update location

I've got an app that publishes and updates from an http update location (I publish to the ftp site of the host, and update from the website). The publish.htm page is very handy as I can install the app on any machine, anywhere without needing media. The problem is, so can anyone else. How can I secure the update location so that only au...