Search Results

Search found 6941 results on 278 pages for 'drupal views'.

Page 121/278 | < Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >

  • ASP.NET MVC 3 Hosting :: Error Handling and CustomErrors in ASP.NET MVC 3 Framework

    - by C. Miller
    So, what else is new in MVC 3? MVC 3 now has a GlobalFilterCollection that is automatically populated with a HandleErrorAttribute. This default FilterAttribute brings with it a new way of handling errors in your web applications. In short, you can now handle errors inside of the MVC pipeline. What does that mean? This gives you direct programmatic control over handling your 500 errors in the same way that ASP.NET and CustomErrors give you configurable control of handling your HTTP error codes. How does that work out? Think of it as a routing table specifically for your Exceptions, it's pretty sweet! Global Filters The new Global.asax file now has a RegisterGlobalFilters method that is used to add filters to the new GlobalFilterCollection, statically located at System.Web.Mvc.GlobalFilter.Filters. By default this method adds one filter, the HandleErrorAttribute. public class MvcApplication : System.Web.HttpApplication {     public static void RegisterGlobalFilters(GlobalFilterCollection filters)     {         filters.Add(new HandleErrorAttribute());     } HandleErrorAttributes The HandleErrorAttribute is pretty simple in concept: MVC has already adjusted us to using Filter attributes for our AcceptVerbs and RequiresAuthorization, now we are going to use them for (as the name implies) error handling, and we are going to do so on a (also as the name implies) global scale. The HandleErrorAttribute has properties for ExceptionType, View, and Master. The ExceptionType allows you to specify what exception that attribute should handle. The View allows you to specify which error view (page) you want it to redirect to. Last but not least, the Master allows you to control which master page (or as Razor refers to them, Layout) you want to render with, even if that means overriding the default layout specified in the view itself. public class MvcApplication : System.Web.HttpApplication {     public static void RegisterGlobalFilters(GlobalFilterCollection filters)     {         filters.Add(new HandleErrorAttribute         {             ExceptionType = typeof(DbException),             // DbError.cshtml is a view in the Shared folder.             View = "DbError",             Order = 2         });         filters.Add(new HandleErrorAttribute());     }Error Views All of your views still work like they did in the previous version of MVC (except of course that they can now use the Razor engine). However, a view that is used to render an error can not have a specified model! This is because they already have a model, and that is System.Web.Mvc.HandleErrorInfo @model System.Web.Mvc.HandleErrorInfo           @{     ViewBag.Title = "DbError"; } <h2>A Database Error Has Occurred</h2> @if (Model != null) {     <p>@Model.Exception.GetType().Name<br />     thrown in @Model.ControllerName @Model.ActionName</p> }Errors Outside of the MVC Pipeline The HandleErrorAttribute will only handle errors that happen inside of the MVC pipeline, better known as 500 errors. Errors outside of the MVC pipeline are still handled the way they have always been with ASP.NET. You turn on custom errors, specify error codes and paths to error pages, etc. It is important to remember that these will happen for anything and everything outside of what the HandleErrorAttribute handles. Also, these will happen whenever an error is not handled with the HandleErrorAttribute from inside of the pipeline. <system.web>  <customErrors mode="On" defaultRedirect="~/error">     <error statusCode="404" redirect="~/error/notfound"></error>  </customErrors>Sample Controllers public class ExampleController : Controller {     public ActionResult Exception()     {         throw new ArgumentNullException();     }     public ActionResult Db()     {         // Inherits from DbException         throw new MyDbException();     } } public class ErrorController : Controller {     public ActionResult Index()     {         return View();     }     public ActionResult NotFound()     {         return View();     } } Putting It All Together If we have all the code above included in our MVC 3 project, here is how the following scenario's will play out: 1.       A controller action throws an Exception. You will remain on the current page and the global HandleErrorAttributes will render the Error view. 2.       A controller action throws any type of DbException. You will remain on the current page and the global HandleErrorAttributes will render the DbError view. 3.       Go to a non-existent page. You will be redirect to the Error controller's NotFound action by the CustomErrors configuration for HTTP StatusCode 404. But don't take my word for it, download the sample project and try it yourself. Three Important Lessons Learned For the most part this is all pretty straight forward, but there are a few gotcha's that you should remember to watch out for: 1) Error views have models, but they must be of type HandleErrorInfo. It is confusing at first to think that you can't control the M in an MVC page, but it's for a good reason. Errors can come from any action in any controller, and no redirect is taking place, so the view engine is just going to render an error view with the only data it has: The HandleError Info model. Do not try to set the model on your error page or pass in a different object through a controller action, it will just blow up and cause a second exception after your first exception! 2) When the HandleErrorAttribute renders a page, it does not pass through a controller or an action. The standard web.config CustomErrors literally redirect a failed request to a new page. The HandleErrorAttribute is just rendering a view, so it is not going to pass through a controller action. But that's ok! Remember, a controller's job is to get the model for a view, but an error already has a model ready to give to the view, thus there is no need to pass through a controller. That being said, the normal ASP.NET custom errors still need to route through controllers. So if you want to share an error page between the HandleErrorAttribute and your web.config redirects, you will need to create a controller action and route for it. But then when you render that error view from your action, you can only use the HandlerErrorInfo model or ViewData dictionary to populate your page. 3) The HandleErrorAttribute obeys if CustomErrors are on or off, but does not use their redirects. If you turn CustomErrors off in your web.config, the HandleErrorAttributes will stop handling errors. However, that is the only configuration these two mechanisms share. The HandleErrorAttribute will not use your defaultRedirect property, or any other errors registered with customer errors. In Summary The HandleErrorAttribute is for displaying 500 errors that were caused by exceptions inside of the MVC pipeline. The custom errors are for redirecting from error pages caused by other HTTP codes.

    Read the article

  • Introduction to Shop Drawing Structures

    A shop drawing is a three dimensional drawing and it consisting of three detailed views like plans, elevations and sections. The shop drawing normally shows more detail than the construction document... [Author: Prahlad Parmar - Computers and Internet - April 06, 2010]

    Read the article

  • Outstanding SQL Saturday

    - by merrillaldrich
    I had the privilege to attend the SQL Saturday held in Redmond today, and it was really outstanding. Among the many sessions, I especially enjoyed and took a lot of useful information away from Greg Larsen’s Dynamic Management Views session, Kalen Delaney’s Compression Session – I am planning to implement 2008 Enterprise compression on my company’s data warehouse later this year – and Remus Rusanu’s session on Service Broker to process NAP data. I want to send out heartfelt thanks to the generous...(read more)

    Read the article

  • Google I/O 2012 - Putting Together the Pieces: Building Apps with Google Apps Script

    Google I/O 2012 - Putting Together the Pieces: Building Apps with Google Apps Script Saurabh Gupta Learn what's new with Google Apps Script. This session will explore the simplicity of Google Apps Script to build an app that integrates across many Google services. Many of the Google Apps Script services will be covered, demonstrating how Google Apps Script is both a powerful application platform. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 84 9 ratings Time: 40:59 More in Science & Technology

    Read the article

  • GDL Presents: Make Web Magic | Part III

    GDL Presents: Make Web Magic | Part III Make Web Magic: The Minds Behind the Most Popular Chrome Experiments Using the latest open web technologies, the developers creating some of the most inspired Chrome Experiments showcase their latest web experiments and discuss how they are making the web faster, more fun, and open in this 3-episode hangout. Host: Paul Irish, Developer Advocate, Chrome Guest: Hakim El Hattab From: GoogleDevelopers Views: 133 16 ratings Time: 30:35 More in Science & Technology

    Read the article

  • Google I/O 2010: Google TV Keynote, Day 2 - CEO Partner Panel

    Google I/O 2010: Google TV Keynote, Day 2 - CEO Partner Panel Google I/O 2010: Google TV Keynote, Day 2 - CEO Partner Panel Due to licensing and permissions issues, we are unable to show the full Google TV demonstration from the Day 2 keynote at Google I/O. Until we are able to get these permissions, please check out these clips. For Google I/O session videos, presentations, developer interviews and more, go to: code.google.com/io From: GoogleDevelopers Views: 7 0 ratings Time: 22:43 More in Science & Technology

    Read the article

  • Google I/O 2010 - Sell your app on the Google Apps Marketplace

    Google I/O 2010 - Sell your app on the Google Apps Marketplace Google I/O 2010 - Reach new customers fast: Learn how to sell your cloud app on the Google Apps Marketplace Enterprise 201 Scott McMullan, Jay Simmons (Atlassian), Chuck Dietrich (Sliderocket), Amit Kulkarni (Manymoon) In this introductory session we'll provide an overview of the Google Apps Marketplace and learn product and marketing best practices directly from 3 Marketplace ISVs. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 12 0 ratings Time: 56:42 More in Science & Technology

    Read the article

  • Outstanding SQL Saturday

    - by merrillaldrich
    I had the privilege to attend the SQL Saturday held in Redmond today, and it was really outstanding. Among the many sessions, I especially enjoyed and took a lot of useful information away from Greg Larsen’s Dynamic Management Views session, Kalen Delaney’s Compression Session – I am planning to implement 2008 Enterprise compression on my company’s data warehouse later this year – Remus Rusanu’s session on Service Broker to process NAP data, and Matt Masson’s presentation on high performance SSIS...(read more)

    Read the article

  • Google I/O 2010 - Moving beyond markers: Advanced Maps API customization

    Google I/O 2010 - Moving beyond markers: Advanced Maps API customization Google I/O 2010 - Moving beyond markers: Advanced Maps API customization Geo 301 Jez Fletcher, David Day With such a large number of Google Maps API sites online, it can be hard to make your site stand out from the crowd. This session covers ways in which you can enhance your Maps API application to truly differentiate it, including customizing your overlays, controls, and map. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 16 0 ratings Time: 36:38 More in Science & Technology

    Read the article

  • Google I/O 2010: Google TV Keynote - Under The Hood

    Google I/O 2010: Google TV Keynote - Under The Hood Due to licensing and permissions issues, we are unable to show the full Google TV demonstration from the Day 2 keynote at Google I/O. Until we are able to get these permissions, please check out these clips. For Google I/O session videos, presentations, developer interviews and more, go to: code.google.com/io From: GoogleDevelopers Views: 3 0 ratings Time: 02:02 More in Science & Technology

    Read the article

  • Extended ListView Control for Visual WebGui

    - by Webgui
    Visual WebGui's extended ListView control is in many cases the best option to implement the most complex data entry and views. The following webcast explains the different between the extended controls and the standard "flat list" ListView control and of course what can be done with it.

    Read the article

  • Google I/O 2010 - Chrome Extensions - how to

    Google I/O 2010 - Chrome Extensions - how to Google I/O 2010 - Chrome Extensions - how to Chrome 101 Brian Kennish Google Chrome shipped an extensions API in version 4.0. Since last year, new capabilites have been added to the extensions framework, and many people have already written powerful extensions with minimal effort. Find out how to write an extension, and what's coming next in Chrome Extensions. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 4 0 ratings Time: 59:35 More in Science & Technology

    Read the article

  • Google Chrome Extensions: Launch Event (part 3)

    Google Chrome Extensions: Launch Event (part 3) Video Footage from the Google Chrome Extensions launch event on 12/09/09. Erik Kay and Aaron Boodman, technical leads for the Google Chrome Extensions team demonstrate how to build, debug and share a Google Chrome extension. From: GoogleDevelopers Views: 2975 13 ratings Time: 08:28 More in Science & Technology

    Read the article

  • Google I/O 2010 - WebM Open Video Playback in HTML5

    Google I/O 2010 - WebM Open Video Playback in HTML5 Google I/O 2010 - WebM Open Video Playback in HTML5 Chrome 101 Kevin Carle, Jim Bankoski, David Mendels (Brightcove), Bob Mason (Brightcove) The new open VP8 codec and WebM file format present exciting opportunities for innovation in HTML5 video. In this session, you'll see WebM playback in action while YouTube and Brightcove engineers show you how to support the format in your own HTML5 site. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 4 0 ratings Time: 40:02 More in Science & Technology

    Read the article

  • Google.org Crisis Response and the Google Maps APIs

    Google.org Crisis Response and the Google Maps APIs This week, Pete Giencke and Ka-Ping Yee of the Google Crisis Response Team join Paul Saxman to talk about the technologies and data they use for their mapping efforts, such as the Crisis Map and Google Public Alerts. Join us to learn how to use the Google Maps APIs to track hurricanes, monitor floods, and help affected users locate critical information such as shelters and evacuation routes in the aftermath of a disaster. From: GoogleDevelopers Views: 0 0 ratings Time: 00:00 More in Science & Technology

    Read the article

  • Google I/O 2010 - Google Analytics APIs: End to end

    Google I/O 2010 - Google Analytics APIs: End to end Google I/O 2010 - Google Analytics APIs: End to end Google APIs 201 Nick Mihailovski Google Analytics measures performance of your website. Learn advanced techniques on how to use our tracking, processing and data export APIs as we walk you through an example of creating a most visited pages web element for your website. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 6 0 ratings Time: 55:42 More in Science & Technology

    Read the article

  • How often to authenticate iOS app in web service

    - by jeraldov
    I am trying to build an iOS app that connects to a PHP+MySQL web service. My question is how often should I check for user's authentication to get data from the web service. My app requires a login at start up, but I am wondering if how often should I check if he can still validly get data from the web service. Should I check for his username and password each time the user views a table view that get its data from the web service?

    Read the article

  • GDL Presents: Women Techmakers with Pixability

    GDL Presents: Women Techmakers with Pixability Gretchen Howard and Amanda Surya speak candidly with Pixability Founder & CEO Bettina Hein about her experiences building successful technology businesses and activating the female tech community. Hosts: Gretchen Howard - Director of Global Social Solutions | Amanda Surya - Manager, Developer Relations Guest: Bettina Hein - Founder and CEO, Pixability From: GoogleDevelopers Views: 0 0 ratings Time: 30:00 More in Science & Technology

    Read the article

  • App Engine Hangout - chat with an App Engine Software Engineer in Test

    App Engine Hangout - chat with an App Engine Software Engineer in Test We'll be chatting with Robert Schuppenies, who is an App Engine Software Engineer in Test. He'll describe a bit about what he does, and talk about/demo some App Engine test frameworks, like the testbed module, code.google.com and code.google.com From: GoogleDevelopers Views: 0 0 ratings Time: 00:00 More in Science & Technology

    Read the article

  • Building a Charts Dashboard with Google Apps Script

    Building a Charts Dashboard with Google Apps Script In this Google Developers Live show, join Kalyan Reddy as he talks about how to build a Charts dashboard in Google Apps Script. We'll be talking about the Charts Service and how to wire this up to data that's dynamically coming in from Google Spreadsheets and other sources. From: GoogleDevelopers Views: 97 7 ratings Time: 44:17 More in Science & Technology

    Read the article

  • Chrome Apps Office Hours: Building Apps with Web Intents

    Chrome Apps Office Hours: Building Apps with Web Intents Ask and vote for questions at: goo.gl Web Intents are the core mechanism for building interconnected apps on the Chrome platform. Join Paul Kinlan and Paul Lewis next week as we show you how to build client apps that send data to other web apps, and a service app that will receive input from any intent invocation. From: GoogleDevelopers Views: 0 0 ratings Time: 00:00 More in Science & Technology

    Read the article

  • La gran final del Developer Bus en Colombia, la innovación desde las tecnologías Google (spanish)

    La gran final del Developer Bus en Colombia, la innovación desde las tecnologías Google (spanish) Toda la innovación del Developer Bus en Colombia con la presentación de los proyectos, la devolución del jurado y el gran ganador de la edición de Bogotá.#DevBusLatAm #DevBusBogota +Desarrolla... From: GoogleDevelopers Views: 0 0 ratings Time: 00:00 More in Science & Technology

    Read the article

  • Google I/O 2010 - Advanced Android audio techniques

    Google I/O 2010 - Advanced Android audio techniques Google I/O 2010 - Advanced Android audio techniques Android 301 Dave Sparks In this session, we will explore advanced techniques that you can employ in your apps when working with media. This includes using Android's low-level audio APIs, selecting the appropriate format for your media files, and what's now possible using new media framework APIs introduced in Android 2.2. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 3 0 ratings Time: 57:16 More in Science & Technology

    Read the article

  • Google Python Class Day 1 Part 2

    Google Python Class Day 1 Part 2 Google Python Class Day 1 Part 2: Lists, Sorting, and Tuples. By Nick Parlante. Support materials and exercises: code.google.com From: GoogleDevelopers Views: 13 0 ratings Time: 35:12 More in Science & Technology

    Read the article

< Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >