ASP.NET: Best way to restrict access by IP address
For an ASP.NET C# application, we will need to restrict access based on IP address. Edit: I liked @Mitch Wheat's answer. Will use this in our implementation. Thanks. ...
For an ASP.NET C# application, we will need to restrict access based on IP address. Edit: I liked @Mitch Wheat's answer. Will use this in our implementation. Thanks. ...
Hi, Assuming an IMouvement Object which contains some subobjects like ITache, IStockPalette. public interface IMouvement : IObjectBase<Guid> { ITache Tache { get; set; } IStockPalette StockPalOrigine { get; set; } } How can I Mock this using Rhino Mocks ? Assuming this test, what's wrong with this ? [TestMethod] pub...
When doing thread synchronization in C# should I also lock an object when I read a value or just changing it? for example I have Queue<T> object. Should I just lock it when doing the Enqueue and Dequeue or should I also lock it when checking values like Count? ...
I'm trying to build a very, very simple "micro-webapp" which I suspect will be of interest to a few Stack Overflow'rs if I ever get it done. I'm hosting it on my C# in Depth site, which is vanilla ASP.NET 3.5 (i.e. not MVC). The flow is very simple: If a user enters the app with a URL which doesn't specify all the parameters (or if an...
How-to Mock WCF Services Proxies with Rhino Mocks ? ...
Can I host an XBAP in my WPF application dynamically? Can I download an XBAP, set it to be hosted in my WPF application, and interact with it programatically? ...
I've been coding a Windows app chess game in C# as an exercise in honing my skills, and also because it's fun. I have included functionality that allows a player to select the option to highlight the squares a piece can legally move to when it gets clicked. A CustomControl handles the rendering of the chessboard and it also highlights th...
I have a utility that I put together that uses the .NET Framework to capture an image of a web page so that I can use the thumbnail image to preview a page. There are sites which offer this service like websnapr.com, kwiboo.com and shrinktheweb.com. I would like to instead do it myself and leverage Firefox (Gecko) and Safari (WebKit) to ...
the question is in the title ...
I'm working on a project for the .net platform and would like to support multiple database types. I would like to keep the DDL under source control in a generic format then convert it to database specific DDL for deployment. So I'm looking for utilities that will convert generic DDL into database specific DDL. Ideally it would support M...
Hi, How can I keep my WCF Service Client Connected with WinForm even if a Faulted State appened ? Thanks. ...
I just found out that my program is losing 5% execution speed when it go through dotfuscator community edition. is that normal? what could be an alternative(free) to dotfuscator that wouldn't do that? ...
Setting up ASP.net MVC with Linq2SQL or Entity Framework's context to have scaffolding work out of the box is extremely easy. What tweaks would you make to make it work with ADO.net Data Services? ...
Consider the following code: private static void WriteProcesses(StreamWriter sw, DateTime d) { sw.WriteLine("List of processes @ " + d.ToString()); Process[] localAll = Process.GetProcesses().Where(o => o.ProcessName.ToLower() != "svchost"); if(localAll.Length > 0) { ...
What do you see as benefits for one over the other? As far as I know, it's just preference. I have way more experience with C# than I do with Visual Basic and was wondering if I should dabble in Visual Basic for certain types of projects? ...
Is the .NET Framework included in Windows 7? If so, which version? ...
given a path and filename how go i get the image object Image image = ...(filename) ...
Hi, i have a listbox with a data template that contains a button. When the button is clicked I want to get in the button click handler the index of the listbox item that was current?? How do I do this please? Malcolm ...
Hi, This is related to my last post. i want to have up and down buttons on listbox items so that they can moved up/down ie changed its index in the list. Any ideas how I would actualy do this? Malcolm ...
In WPF 3.5 (with SP1), I have simply StackPanel that I would like to animate when I change the property Visibility. I have no idea of the height of this StackPanel since its content determines its height. So when I change the property of my StackPanel to Visible (progressPanel.Visibility = Visibility.Visible;) I would like to see an anim...