Archivi categoria: .Net

Error HTTPOnly cookies

I found this problem requesting a site by C# Here an interesting link I also invite you to read the documentation that I am quoting here for you: If the server sends HTTPOnly cookies, you should create a System.Net.CookieContainer … Continua a leggere

Pubblicato in .Net, c# | Lascia un commento

Pass json POST data to Web API method and enumerate it

This is a very tricky problem. I had to create a REST service that receives any json class and elaborates its properties and values without knowing anything about the object received. Here the body posted And here the REST service’s … Continua a leggere

Pubblicato in .Net, c#, REST | Contrassegnato , , | Lascia un commento

POST Ajax and redirect file response to the browser

Yesterday a collegue of mine had a problem: How post an ajax form and redirect the file result to the browser. If you post a form to an handler that response with a file the result will be downloaded by … Continua a leggere

Pubblicato in .Net, Asp.Net, c#, MVC | Contrassegnato , , | Lascia un commento

Optimize Entity Framework performance

This wouldn’t be a complete article on how to improve EF performance but only a little reminder. Every time you have performance problem on updating or adding entity these properties will help you. You can find a lot of articles … Continua a leggere

Pubblicato in .Net, Entity Framework | Lascia un commento

Multiple content type

Today I’ve worked on a generic handler that recovers file from else where, than it sends the file to client browser. When you write a generic handler it is important to specify the contentType before complete the response. There are … Continua a leggere

Pubblicato in .Net, HTML5 | Lascia un commento

Serializing Entity Framework classes with JSON (Web API) without relationship

How many times have you ever tried to serialize an object of a type generated by EntityFramework. As you know with Entity Framework the relationship between to tables are made using virtual IEnumerable. As just you try to access to … Continua a leggere

Pubblicato in .Net, Asp.Net, c#, Entity Framework, MVC | Contrassegnato , | Lascia un commento

Missing compiler required member ‘Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create’

If you are working with MS unit test that use dynamics object, you’ll get this error. Missing compiler required member ‘Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create’ to solve it add the reference to Microsoft.CSharp

Pubblicato in .Net, c# | Contrassegnato , , | Lascia un commento