Version 4.5 of the Microsoft .NET Framework. Use for questions specifically related to .NET Framework 4.5. For questions on .NET Framework generally, use the .net tag.
I have this code in the global.asax.cs
protected void Application_Start(object sender, EventArgs e)
{
string logFile = HttpContext.Current.Request.PhysicalApplicationPath + "log4net.config";
}
It works fine in .NET 4.0, but throws the following…
I'm trying to understand tasks in .net from what I understand is that they are better than threads because they represent work that needs to get done and when there is a idle thread it just gets picked up and worked on allowing the full cpu to be…
From the .NET 4.5 FW there is builtin support for WebSockets handling.
http://msdn.microsoft.com/en-us/library/system.net.websockets.websocket(v=vs.110).aspx
The definition for creating WebSocket() instance in JS is simple as a crystal.
Also... the…
I am using C#4.0 and .NET 4.5.
I have this class which is the point of entry in the current context:
public static class HttpConfigurationImporter
{
public static readonly string ConfigurationMethodName = "Register";
…
Can someone give me good explanation why this has to fail?
const int bufferSize = 2 * 1024, testValue = 123456;
var buffer = new byte[bufferSize];
var serializer = new DataContractSerializer(typeof(int));
//Serialize value
using (var memStream =…
I have an application that works fine on all machine bar a single client. I went on site and took a dump file...
I have read the documentation and correctly created a .DMP using the 'Kernel Memory Dump' option. This has created a ~300MB file and I…
I can set the GCLatencyMode to Batch, Interactive or SustainedLowLatency. Does varying the value of the element (link) give me any additional options on top of the latency mode? It's not immediately obvious how these things interact…
I am trying to use Facebook Authentication on my website which I have built using Visual Studio 2013 .Net framework 4.5 Web Forms (Note: I am not using MVC).
Now, I am able to authenticate users via Facebook but after successful login, I want more…
Im tray to compile a Visual Studio Solution and get this error.
Error 1 Error inesperado en la tarea "ResolveManifestFiles".
System.ArgumentException: Value does not fall within the expected range.
at…
I have a binary file which contains more than 100 millions of objects and I read the file using BinaryReader and return (Yield) the object (File reader and IEnumerable implementation is here: Performance comparison of IEnumerable and raising event…
I'm attempting to update my ViewModel to use INotifyDataErrorInfo instead of IDataErrorInfo and am running into the following problem:
Validation for the currently editing field appears to work correctly, but the row-level error indicator doesn't…
The FrameworkElement.FindName(string name) method returns an object from the XAML namescope. As a reverse to this, is there a way to get the name of the object as a string by passing the object?
Example:
The following ViewPort3D contains a red cone…
I created an EventSource (WebApiEventSource) in my ASP.NET WebApi application (to is as ITraceWriter-implementation):
[EventSource(Name = "WebApi")]
public class WebApiEventSource : EventSource
{
public static readonly WebApiEventSource Log =…
I try to write a class with method that uses some awaitable operations. This condition makes me define this method as async. But I can't return non-void value from this method. BitmapImage in my case. Here's the code
public sealed class…