.net

Expectation Failed when trying to update twitter status

I can't seem to figure this one out. No matter what I do, I keep getting a "417 Expectation failed" error. Everywhere I've looked says that I need to get rid of the Expect header for the HttpWebRequest. Setting the static property ServicePointManager.Expect100Continue = false or the instance property on the web request request.ServicePoi...

Rotating JPEGs in .NET with minimal loss of quality

I am attempting to support rotating JPEG images from ASP.NET MVC (in 90 degree increments). I am attempting to use System.Drawing (GDI+), however I am running into issues. I tried using Image.RotateFlip which is able to rotate the image but causes a loss of quality. Even with an encoder quality of 100, there are still visible artifacts ...

Support for DEVPATH

Hello I have a question about support for DEVPATH (http://msdn.microsoft.com/en-us/library/cskzh7h6.aspx) in the future. As I have read Microsoft considered deprecating it in the past but decided not to. Do you know if there are plans of deprecating it in .NET 4.0 or further? Or is it going to be supported? Thank You Kuzu ...

how to remove 503 exception in c#

hi Iam developing a application in which i have used a . net browser to display a web page of feed . from that web page Iam storing the latest pub date but after 2 min its giving 503 exception . my code is as follow . how can i get rid of this exception var URL = "http://feeds2.feedburner.com/plasticsnews/plasticsinformation/plastopedi...

Managed alternative to user32.dll FlashWindow

In a .Net application that flashes the title bar and the corresponding taskbar button for a window, to attract the users' attention, P/Invoke code something like this is used: [DllImport("user32.dll")] private static extern bool FlashWindow(IntPtr hwnd, bool bInvert); public static void FlashWindow(System.Windows.Forms.Form window) { ...

Recognize application connected to SQL Server 2005

I'd like to know what application connected to DB and executing SPs. (I want to limit SP execution to only my App - all other - eg MS SSMS would be ignored) So is there a way to find out connected client name? If not maybe you have other suggestion how to ensure only dedicated app is used (App is using Windows' integrated security) ED...

How to convert Byte[] to sql image

I have sql data type image to store the state of the webparts but in .Net it is Byte[]. How do I convert Byte[] to sql image for insert and other operations. ...

VB.NET Datagrid

How should I adda datagrid column dynamically on selectedindexedchanged? ...

How to make a UserControl with a custom DefaultBackColor?

When I right-click on my custom UserControl's BackColor property in the property-grid, then click Reset, I would like the BackColor property to change to (for example) Color.LightGreen, and the property value to appear un-bolded, to indicate that it is the default value. Currently, I know I can do this: public override void ResetBackCo...

Can I add a WCF DataContract to a complex type?

Hi, I have a complex data type, including a number of functions, as well as the usual get and get methods. My life would be considerably easier if I could use WCF so my client can also use this data type. Do I Ignore all the operations, putting [DataMemeber] only where needed. Put the class in question in a shared library assembly fo...

Protobuf-net How to consume a WCF service in NET CF client?

Hello, I'm trying to consume a WCF webservice using the RPC capabilities of the Protobuf-net. Here's my service contract: namespace WcfEchoService { // NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in Web.config. [ServiceContract] public interface IEchoService ...

Does .Disposing a StreamWriter close the underlying stream ?

The StreamWriter.Close() says it also closes the underlying stream of the StreamWriter. What about StreamWriter.Dispose ? Does Dispose also dispose and/or close the underlying stream ...

Does WCF automatically URL encode/decode streams?

I'm programming a service for a program that uses HTTP post/get requests, so I handle all incoming requests with a hook method that takes a System.IO.Stream and returns a System.IO.Stream. When I parse the incoming request (contained in an HTML form) by converting to a string and then using System.Web.HttpUtility.ParseQueryString(string...

how do i add a title attribute to a panel (div) in the c# code behind file?

ASP.NET C# how do i add a title attribute to a panel (div) in the c# code behind file? ...

How do I gather info about contention rate?

Hi, I'm expecting that the load on the software I'm developing will increase over the next couple of months. Therefore I did some stress tests, and gathered some performance data with perfmon. For one of the data I would like to have more information, and that's the contention rate. So my question would be, if one of you knows, if it i...

wsHttpBinding over Internet

We have a set of WCF services hosted in IIS and secured with wsHttpBinding and exposed on Internet. When I am trying to consume those services from a client I am getting an error "Request for the security token has invalid or malformed elements." I am using <security mode="Message"> <message clientCredentialType="None" ne...

NHibernate Conditional Mapping

Hi, I was recently hired at a Software Engineering company and was put in charge of a new project for storing our analytics data. I want to give ORM a shot the mapping doesn't seem difficult but this problem has me vexed. This database will store data for Google Analytics, Quantcast, and any future analytics provider. I was pretty much ...

Windsor Castle: good sources for documentation, tutorials

I'm trying to assemble a list of good documentation sources for Windsor Castle (apart from analyzing its source code). I'm especially interested in documentation about the fluent configuration API. Here's what I've found myself: BitterCoder's Wiki Container Tutorials DimeCast's Setting up Castle Windsor for Auto Registration http://usi...

Turning .NET executable into native executable

Hello all, Is there any approach to convert an application developed in .NET into a native executable (sources are included)? Installing the whole framework (up to .NET Framework 3.5 SP1) takes a lot of time - not always the computers are updated from the internet. Is it possible to call NGen in order to produce independent executable...

Source control for Visual Studio that doesn't require a server?

Can anyone recommend a source control solution for Visual Studio? I am going to be the only person using it, I just need something to back up my data every so often or before I undertake a big change in the software. I tried AnkhSVN, but this requires an SVN server. Is there anything that can be used locally that takes the pain out of co...