Solving: A generic error occurred in GDI+. in C#
I was creating an image in C# by using code similar to: public void SaveImage() { byte[] byteArray = null; // Put the bytes of the image here.... Image result = null; ImageFormat format =
I was creating an image in C# by using code similar to: public void SaveImage() { byte[] byteArray = null; // Put the bytes of the image here.... Image result = null; ImageFormat format =
If you are developing an ASP .NET website that uses Windows Authentication and add a host header in IIS to the ASP .NET web application, accessing the site on the local box, might not work.
If you want to use Windows Authentication in your ASP .NET website, you need to add the <authentication mode="Windows"/> tag in the Web.config. <system.web> <authentication mode="Windows"/> If the HttpContext.Current.user.Identity.Name is still empty. Check the authentication
Just a code snippet for transforming an input file to an output file in C# by using XSLT: /// <summary> /// Transform an input file to an output file, by using XSLT. /// </summary> public
To convert a byte array to an image in C#, you can use the following code: [TestMethod] public void Test() { byte[] bytes = new byte[100]; // Supply your bytes here. Image image = bytes.ToImage();
If you want to convert an Image to a byte array in C#, you can use the following extension method: [TestMethod] public void Test() { Image image = null; // Supply your image here.
If you want to serialize an object to a string or want to deserialize a string back to an object, you can use the following class: The XmlSerializationTask class using System; using System.IO; using
When a assembly is not found, when using the standard probing method, an assembly resolve event is fired, allowing to load the assembly from a different file system path: public void Test() { AppDomain
Let says you want to store your application settings in an App.config or Web.config file and these settings should contain collections of settings, then use can use the following code to deserialize an object containing
If you create a new .NET 4.0 console application in Microsoft Visual Studio .NET 2010 and add a reference to the Log4Net v1.2.10 dll, you can add the using statement [using log4net;], but after