• Home
  • Posts RSS
  • Comments RSS
  • Edit
Blue Orange Green Pink Purple

Matt Linder

My Photo Much like Hector Salamanca, I believe family is everything. I run and cycle sometimes, too. I spend the majority of my week days implementing a solution, or solving problems at a computer, aided by a trusty bag of almond m&ms.

Google Accounts Multiple Sign-In

Google accounts now offers multiple sign-in. The feature may have to be enabled if you have not done so already for each account you plan to use...

Read More

Jsonp and MVC

JSON is a powerful way to transmit or expose sets of data to jQuery or javascript. There are several api's such as twitter, flicker, and yahoo that allow this functionality. Unfortunately, it can be used for bad intentions. To curtail such experiences, a "defense system" for foreign requests was created. This defense places restrictions on requests that occur on cross-domain http requests via javascript for returning data in the JSON format.

For visualization:


To bypass this issue and reduce the opportunity for accidental exposure of vulnerabilites, you have to change the response type of requests for this scenario. In jQuery 1.2, JSONP support was introduced. Jsonp, or JSON with Padding, is a a way to wrap json responses in callback manner, and remove client side get requests allowing only posts.


example source
Using MVC, you can easily expose JSON responses with your Controller. A simple way is to return a JsonResult. To add JSONP functionality, however, you will have to create a custom class, or extend the existing JsonResult.

Changing something like this:
{"Id" : 4, "Name" : "Matt Linder"}
to this:
callback({"Id" : 4, "Name" : "Matt Linder"});

I have implemented a default callback on the originating server, with the option to specify a custom consumer script for the callback, which seems to work well.
Read More 1 Comment | Posted by Matt Linder edit post

1 Comment

  1. daqiadaumy on January 2, 2023 at 9:49 AM

    Vitex Extrusions is a US-based manufacturer of aluminum extrusions that gives customized extruded aluminum Teapots with Infusers manufacturing, fabrication, CNC machining, meeting, and supply chain options. It’s not at all times essential to outsource manufacturing to a single manufacturing facility. It could also be} higher on your project should you work with a network of outlets focusing on totally different elements of the process, similar to metallic chopping or powder coating. In July of 2018, 3rd Dimension Industrial 3D Printing partnered with Generation Growth Capital , a business investment fund centered on small-to-mid-sized manufacturing, service, and distribution businesses. The company’s portfolio includes high-end five-axis machine shops and different businesses that Markley says can assist with strategy, networking and establishing a platform to serve a broad array of consumers. GGC helps deal with the accounting and legal capabilities of 3rd Dimension, and, because of the other manufacturing businesses in GGC’s portfolio, essentially serves as a risk mitigator for 3rd Dimension’s clients.

     


Post a Comment

Newer Post Older Post Home

Matt Linder

  • About

      Former scoutmaster, soccer coach, long distance runner turned donut connoisseur and father of five with a passion for learning technology and solving technical problems!

      View Matt Linder's profile on LinkedIn
    • About Me

      My photo
      Matt Linder
      South Carolina native, lover of peanut butter and donuts, and web developer.
      View my complete profile

      Professional Matt Linder

      Matt Linder's public blog.

      Blog Archive

      • ►  2015 (1)
        • ►  August (1)
      • ►  2013 (1)
        • ►  October (1)
      • ▼  2012 (11)
        • ►  October (1)
        • ▼  July (2)
          • Windows 7 64 bit WHS backup "Cannot mount the backup"
          • Jsonp and MVC
        • ►  June (1)
        • ►  April (2)
        • ►  March (5)

      Achievements Unlocked

      fitness apps fitness apps fitness apps fitness apps
    • Search






      • Home
      • Posts RSS
      • Comments RSS
      • Edit

      © Copyright Professional Matt Linder. All rights reserved.

      Designed by FTL Wordpress Themes | Bloggerized by FalconHive.com | Blogger Templates
      brought to you by Smashing Magazine

      Back to Top