locked
AtomPub sample

    Question

  • Hello guys.

    Did anyone managed to get the create, delete or update code of the atompub sample to work?

    I've tested with my blog and  always get a 404 error. Already checked the blog settings (ATOM is enabled), firewalls, the URL, etc. I'm getting out of ideas...


    Luis Abreu

    Saturday, April 7, 2012 2:49 PM

All replies

  • Hi,

    I can get it work. Are you testing wordpress blog? What HTTP request/response do you send/get when you test this application? Could you use Fiddler to check and post here (mask your username/password)?

    http://blogs.msdn.com/b/fiddler/archive/2011/09/14/fiddler-and-windows-8-metro-style-applications-https-and-private-network-capabilities.aspx


    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Monday, April 9, 2012 9:31 AM
  • Hello Allen.

    Thanks for confirming that the sample is working.

    I'm trying to access my blog in the msmvps.com site. The URL is http://blogs.msmvps.com/luisabreu

    The http://blogs.msmvps.com/luisabreu/wp-app.php/posts returns 404. I've tried going through the root of the site, but I can't log in (which makes sense, since I should only be able to access my account)

    I've went into the dashboard and I can confirm that XML-RPC and Atom are both enabled (check next image).

    I've also tried to connect to the web site through live writer, but it uses the XML-RPC protocol instead of the AtomPub protocol to manage the site.

    I'm not really a wordpress expert, but I think I should be able to get into my blog by using the AtomPub protocol.

    Do you know if I need to check anything else in my dashboard to access my blog through AtomPub? Any clues on what's going on here? 

    thanks.


    Luis Abreu

    Monday, April 9, 2012 1:32 PM
  • Luis,

    If I type your URL into a browser I get a 404 also:

    http://blogs.msmvps.com/luisabreu/wp-app.php/posts

    I would not expect any different behavior from the atom pub.

    How to troubleshoot:

    Get to a page successfully using Internet Explorer and use fiddler to see what the traffic looks like (http://fiddler2.com).

    Armed with that information, then try to use the Metro classes.

    -Jeff


    Jeff Sanders (MSFT)

    Monday, April 9, 2012 6:59 PM
    Moderator
  • Hello Jeff.

    Yes, I've done that with windows live writer because I can successfully post to my blgo from it, but it uses the XML-RPC protocol to do that. I've noticed that the AtomPub services are only available at the root level. if you remove the subdir luisabreu, you'll notice that the service is there and requests username and password, but my credentials won't allow me to use it. 

    I'm just a simple wordpress user, so I'm not sure if this is the correct behavior. I expected to be able to access the URL you've written in your reply, but as you've said, it simply doesn't work out.


    Luis Abreu

    Tuesday, April 10, 2012 9:14 AM
  • Yup, the atom pub stuff is all HTML based not RPC.

    Turn off XML-RPC and you should be able to get it.


    Jeff Sanders (MSFT)

    Tuesday, April 10, 2012 1:44 PM
    Moderator
  • Hello again Jeff.

    Are you saying that I should disable the xml-rpc option in the writing settings (shown in the previous image) and that is all that it takes for me to make the AtomPub code work?

    thanks.


    Luis Abreu

    Wednesday, April 11, 2012 12:33 PM
  • I do not support WordPress, but that would be my best guess!

    Jeff Sanders (MSFT)

    Wednesday, April 11, 2012 12:34 PM
    Moderator
  • Yes, I know Jeff. 

    thanks for the help.

    I've only asked to be sure I understood what you were saying. Btw, it didn't work :)

    I'll try to find a wordpress forum somewhere...probably they might help me there.


    Luis Abreu

    Wednesday, April 11, 2012 8:48 PM
  • You can also use fiddler to narrow down the issue (http://fiddler2.com).  Access your blog using Internet Explorer and look at the HTTP traffic.  Then compare that traffic with your Metro app code.  You can note the differences and adjust your code appropriately (post back to this forum if you need help getting a specific part of the HTTP request to look correct).

    That is how I often approach these type of problems!

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, April 12, 2012 11:59 AM
    Moderator
  • Hey Luis,

    Contact this guy at wordpress.  If you can get him to help you can use OAuth with metro and XML-RPC:

    http://willnorris.com/2009/03/authentication-in-wordpress-28

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, April 12, 2012 5:17 PM
    Moderator
  • Hello Jeff.

    well, not sure on how using IE will help because I'm under the impression that in that case you're using web pages and not the AtomPub API from the client.


    Luis Abreu

    Sunday, April 15, 2012 9:28 PM
  • Hi Luis,

    Just to help you get through the auth stages and see what is happening during this part.

    See my followup post as well.

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, April 17, 2012 12:06 PM
    Moderator
  • Hello Jeff.

    But just by looking at the HTTP traffic in the browser, it's easy to conclude that it's not using the AtomPub api (at least, in the site that hosts my blog, it will use urls which are completely different from the ones that should be used for the atompub protocolo, so I'm not sure on how using the browser will help me). I'm starting to think that probably the site doesn't have atompub enabled (?), but I'm not sure on how to proceed in order to confirm this...

    I've already asked about this in the wordpress forums, but still haven't received any answer...


    Luis Abreu

    Wednesday, April 18, 2012 9:45 AM