Click here to Skip to main content
16,013,730 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i am using this code and every time i am getting error in c#

GDataRequestException, Execution of authentication request returned unexpected result: 404

For adding site

Google.GData.Client.RequestSettings settings = new Google.GData.Client.RequestSettings("ProjektName", "E-MAIL", "PWD");
Google.WebmasterTools.WebmasterToolsRequest f = new Google.WebmasterTools.WebmasterToolsRequest(settings);

Google.WebmasterTools.Sites site = new Google.WebmasterTools.Sites();
site.AtomEntry = new Google.GData.Client.AtomEntry();
site.AtomEntry.Content.Src = "http://www.example.com/";
site.AtomEntry.Content.Type = "text/plain";
Google.WebmasterTools.Sites newSite = f.AddSite(site);



For adding sitemap

Google.WebmasterTools.Sitemap sitemap = new Google.WebmasterTools.Sitemap();
sitemap.Id = "http://www.example.com/sitemap.xml";
sitemap.Categories.Add(new Google.GData.Client.AtomCategory("http://schemas.google.com/webmasters/tools/2007#site-info", new Google.GData.Client.AtomUri("http://schemas.google.com/g/2005#kind")));
sitemap.SitemapType = "WEB";
Google.WebmasterTools.Sitemap newSitemap = f.AddSitemap("http%3A%2F%2Fwww%2Eexample%2Ecom%2F", sitemap);


can anybody please help me
Posted
Comments
[no name] 2-Jul-15 14:21pm    
Why are you not asking google?
Member 11311262 3-Jul-15 14:21pm    
i have asked to google but not getting any answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900