Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tommy Messbauer 16 posts 36 karma points
    Dec 08, 2009 @ 22:14
    Tommy Messbauer
    0

    Has anyone created a WPF application that accesses Umbraco Data API?

    I am very close to complete here,  but the umbraco....Application is not getting initialized adn the SqlHelper is throwing an initialization exception.  I am new to Umbraco.  Usually, this type of stuff would be in a global.asax.  I am going to keep searching, but any assistance is greatly appreciated.

    GlobalSettings.DbDSN is set correctly when I debug which makes me think that the static Application objects are not getting instantiated.

    Thanks!

    -T

  • Tommy Messbauer 16 posts 36 karma points
    Dec 08, 2009 @ 22:19
    Tommy Messbauer
    0

    <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-style-unhide:no; mso-ansi-font-size:11.0pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->

    Ideally, it would be nice if I could set the SqlHelper manually instead of relying on the application context to be completely spun up.  I am not sure if this is possible.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Dec 08, 2009 @ 22:33
    Aaron Powell
    0

    Copy & pasting from Office isn't a great idea when posting here ;)

    But you *can* do it, I've got a small demo up on my blog here - http://www.aaron-powell.com/blog/may-2009/using-umbraco-in-a-wpf-application.aspx which used LINQ to Umbraco to work with the Umbraco cache.

    It only supported reading data, not writing to it, you'd either have to use the Umbraco web services (or custom web services), or write your own UmbracoDataProvider, which I covered in this LINQ to Umbraco session - http://www.aaron-powell.com/blog/october-2009/a-developers-guide-to-linq-to-umbraco---session-3---delving-into-the-umbracodatacontext.aspx (not in great depth, maybe in the future I will).

    Ping me if you want more information on that (may get my ass into gear to document it better :P) and/ or if you want the WPF add source.

  • Tommy Messbauer 16 posts 36 karma points
    Dec 09, 2009 @ 02:16
    Tommy Messbauer
    0

    Yeah..  I noticed that Office is no bueno tacos, but I could not edit my post.. 

    anyhow, I found the web services right after I wrote this post and they are doing what I need.  The fuinny thing is that the only thing that it looks like you need from the umbraco web context if the SQLHelper.  It is instaniated as a singleton with the Application and if I could just instantiate the API myself, then that would be much easier. 

    I downloaded the source from codeplex in case I need to create a custom umbraco build that does not rely on HttpContext to spin up the Application.  As long as the web services continue to do what I need, then this should not be an issue.

    For the record, this is for a custom ETL tool that does screen scraping.  The site that I am migrating has a splintered and ugly architecture that there is no way to ETL except manual or URL scraping.  I plan to open source and blog about the tool when I get it all done.

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Dec 09, 2009 @ 04:18
    Aaron Powell
    0

    I'll have a look when I've got some time to see if there's a better way in which to deal with the construction of the SqlHelper, but I can't promise getting anything sorted before 4.1 reaches its next build.

Please Sign in or register to post replies

Write your reply to:

Draft