Geeks With Blogs

News ASP.net Forms Justin Hoffman
Justin Hoffman
Recently I had a need to write some tests making Web Api calls that would be deployable to the build server without any special configuration.What I did was utilize the Self Hosting feature in the Asp.NetWebApi. First, I created a simple Api controller . // GET /api/values public class ValuesController : ApiController { public SomeObjects GetByName(string ......

During the upgrade of a solution from the Web Api Preview 6 to MVC 4 Beta Web Api, I encountered a bug with a custom MediaTypeFormatter. In the Api controller I had a need to take the posted content object as well as some string identifiers/keys as parameters. The problem I encountered as that if I utilized a custom MediaTypeFormatter, these values ......

After upgrading to the MVC 4 Web Api a problem came up where the custom MediaTypeFormatters we were using were no longer functioning.You must now override, CanWriteType and CanReadType in your customer formatter, or it will return false by default. 'Headers.ContentType' must be set before 'ObjectContent' can serialize its content"vIdeally, some checks ......

Recently, while browsing Visual Studio extensions I came across the SharpKit tool. It sparked my curiosity as I'm always looking for ways to improve my jQuery and Javascript in general. Working off the example in my previous post about Updating the Content of a WebGrid async we can generate the same Javascript via the SharpKit project. First, head to ......

Previously, I blogged about how to update the WebGrid in MVC 3 asynchronously. This was when MVC 3 beta came out. Later, I received a comment which confirmed that in fact my example no longer worked!!. Hopefully, I can redeem myself with this post. I took a slightly different approach in this example, using a partial view and reloading the grid with ......

Using the HttpClient API from wcf.codeplex.com, you may encounter this error if respones are too large. Cannot write more bytes to the buffer than the configured maximum buffer size: 65536 In order to increase the size of the Response Buffer, just increase the MaxReseponseContentBufferSize as shown below. Increase it to something larger than the default: ......

I wanted to try to use T4 to read a web.config and generate all of the appSettings and connectionStrings as properties of a class. I elected in this template only to output appSettings and connectionStrings but you can see it would be easily adapted for app specific settings, bindings etc. This allows for quick access to config values as well as removing ......

I spent the better part of a day trying to figure out why all of the sudden, I was unable to properly debug, add quick watches or see the values of fields etc at all. I found it was because I had installed ASP.NET MVC3 along side AsyncCTP. I found instructions to resolve the issue here http://bartwullems.blogspot... ......

Recently, I was tasked with customizing a Build work flow to allow for configurable assignment of build bugs. This is not a difficult task, however locating the proper Activity in the workflow can be a bit of an annoyance. There are two things which need to be done in this case. Open your Build Process Template Add an Direction = In, Type =String. Enter ......

Copyright © Justin Hoffman | Powered by: GeeksWithBlogs.net