AdWords API passing Client ID, still getting results for MCC

2009-06-26 Thread crozzer

Hi,

I'm using awapi_dotnet_3.1.1.

I think this is a bug, but want to ask the forum before reporting it.

In the following code, I create a headers dictionary using the
web.config settings, then override the client ID, then create a user
and call getAccountInfo(), just like in Examples
\v13\AccountServiceNoConfigDemo.cs

I would expect it to return the account info for the overridden Client
ID, but instead it returns the account info for the client id in the
web.config settings (which happens to be my MCC account).

Any help much appreciated:

==
Code-Behind: crosby-dev.aspx.cs
==
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


using com.google.api.adwords.v13;
using com.google.api.adwords.lib;
using System.Text;
using com.google.api.adwords.lib.util;

public partial class admin_crosby_dev : System.Web.UI.Page
{

  protected void Page_Load(object sender, EventArgs e)
  {
Dictionary headers = new Dictionary
();
headers.Add("email", ApplicationConfiguration.email);
headers.Add("password", ApplicationConfiguration.password);
headers.Add("useragent", "AWAPI DotNetLib " +
DataUtilities.GetVersion() + ApplicationConfiguration.companyName);
headers.Add("developerToken",
ApplicationConfiguration.developerToken);
headers.Add("applicationToken",
ApplicationConfiguration.applicationToken);
headers.Add("clientEmail", ApplicationConfiguration.clientEmail);
headers.Add("clientCustomerId",
ApplicationConfiguration.clientCustomerId);


// The client ID I'm interested in:
headers["clientCustomerId"] = "938-333-7070";

AdWordsUser user = new AdWordsUser(headers);
AccountService service = (AccountService)user.GetService
(ApiServices.v13.AccountService);

// call to the service that results in getting AccountInfo for the
MCC, instead of the Client ID specified:
AccountInfo acctInfo = service.getAccountInfo();

// Now format for Web Output
StringBuilder result = new StringBuilder();

result.AppendFormat("- Account Info -Customer Id: {0}
Descriptive Name: {1}",
acctInfo.customerId, acctInfo.descriptiveName);

if (null != acctInfo.billingAddress)
{
  result.AppendFormat("Billing information Company Name: {0}
   Address Line 1: {1}" +
  "   Address Line 2: {2}   City: {3}
State: {4}   Postal Code: {5}" +
  "   Country Code: {6}",
acctInfo.billingAddress.companyName,
  acctInfo.billingAddress.addressLine1,
  acctInfo.billingAddress.addressLine2,
acctInfo.billingAddress.city,
  acctInfo.billingAddress.state,
acctInfo.billingAddress.postalCode,
  acctInfo.billingAddress.countryCode);
}

result.AppendFormat("Time Zone ID: {0}", acctInfo.timeZoneId);
Label1.Text = result.ToString();
  }
}

==
ASPX: crosby-dev.aspx
==
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="crosby-
dev.aspx.cs" Inherits="admin_crosby_dev" %>



http://www.w3.org/1999/xhtml";>













==
Results in Unexpected Output:
==

- Account Info -
Customer Id: 2900871247
Descriptive Name: JustAnswer
Time Zone ID: America/New_York

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Suggestion - please include max. field sizes in reference

2009-05-06 Thread crozzer

Hi,

This is a request to please include max. field sizes in the reference
documentation.
Example:
I'm creating a database to hold AdGroup names.
How big should the varchar field be?

(Answer: 255... I think).

... and so on for all the other fields...

Thanks,
`Crosby


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Question about - getKeywordVariations

2009-05-05 Thread crozzer

Does it return the same results if I give it 10 seedkeywords in one
request VERSUS 10 separate requests with one keyword each?

for example, would it return the same results for this list of words
java
coding
programming

versus requesting each of those words individually and pooling the
results into a long list?

Put another way, does the tool take into consideration the members of
the seedKeywords[] passed in, and look for semantic matches close to
all of them as a group, or does it deal with them each individually?

thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API report downloads started failing - any ideas?

2009-03-30 Thread crozzer

Hi,
I've got a daily job that downloads all of the reports in my MCC.
the core of which is the ReportService.DownloadFile. (of course).

This has been running daily for months, but this weekend it started
generating errors:
Unexpected EOF or 0 bytes downloaded.
OR
Thread was being aborted

So I wrapped that in a try/catch and re-try 5 times.  Now it sometimes
succeeds, and sometimes fails on various reports (it is not just one
report in particular).

So, my question is...
- Did anything change to the relevant API code?
- Any brilliant ideas for what I might do client-side to manage these
errors (other than simply attempting more re-tries...)

Thanks,
~Crosby
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: getCampaignNegativeCriteria returns Criteria with ID = 0

2009-02-03 Thread crozzer

Apologies.

This is answered in:

http://groups.google.com/group/adwords-api/browse_thread/thread/cd2e7ad88f7f5f54/d2484134d7dd6a48?lnk=gst&q=getCampaignNegativeCriteria#d2484134d7dd6a48
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: point of clarification about "globally unique"

2009-01-14 Thread crozzer

thanks jeff,
for the record it turns out my code had been timing out and trying
again without rolling back the timedout insert.
So, when it tried again, it was seeing the partial results of the
previous attempt.
Fixed on my side.
thanks again.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: point of clarification about "globally unique"

2009-01-14 Thread crozzer

from page: 
http://code.google.com/apis/adwords/docs/developer/adwords_api_services.html

I'm asking b/c I'm running into primary key constraints while entering
(keyword) criterion into my DB.  I have set a compound primary key on
Criterion_ID + AdGroup_ID, which should work unless AdGroup_ID is only
unique within an account, as opposed to "globally" across all accounts.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API point of clarification about "globally unique"

2009-01-14 Thread crozzer

We have many accounts under an MCC.  Can someone clarify the following
statement?  Does that mean globally unique _within an account_, or
does that mean globally unique _across all accounts in google_?

"Campaign, AdGroup, Criterion, and Ad objects all have IDs that are
set by the AdWords API web services. Criterion and Ad IDs are unique
only within their ad group, while AdGroup and Campaign IDs are
globally unique."


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: "keep alive" equivalent?

2008-12-22 Thread crozzer

Here is the actual error message.
I'm interpreting this to mean that Google is cutting me off mid-
request/response.
I'm going to wrap it in a retry and see how that goes.
But, if you have any suggestions for how to prevent this in the first
place, please let me know.
Thanks~
=
Server Error in '/' Application.
The underlying connection was closed: A connection that was expected
to be kept alive was closed by the server.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The underlying connection
was closed: A connection that was expected to be kept alive was closed
by the server.

Source Error:

Line 137:[return: System.Xml.Serialization.XmlElementAttribute
("getAllCriteriaReturn")]
Line 138:public Criterion[] getAllCriteria(long adGroupId) {
Line 139:object[] results = this.Invoke("getAllCriteria",
new object[] {
Line 140:adGroupId});
Line 141:return ((Criterion[])(results[0]));


Source File: C:\inetpub\ppc-tools\lib\awapi_dotnet_lib_2.1.0\src
\v13\CriterionService.csLine: 139

Stack Trace:

[WebException: The underlying connection was closed: A connection that
was expected to be kept alive was closed by the server.]
   System.Web.Services.Protocols.WebClientProtocol.GetWebResponse
(WebRequest request) +263
   System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse
(WebRequest request) +4
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +172
   com.google.api.adwords.v13.CriterionService.getAllCriteria(Int64
adGroupId) in C:\inetpub\ppc-tools\lib\awapi_dotnet_lib_2.1.0\src
\v13\CriterionService.cs:139
   ja.api.google.adwords.MasterClient.getAllDB(Int64[] accounts) in c:
\inetpub\ppc-tools\App_Code\ja_google_api_adwords\MasterClient.cs:522
   GetActiveKeywords.Page_Load(Object sender, EventArgs e) in c:
\inetpub\ppc-tools\GetActiveKeywords.aspx.cs:40
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,
Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object
sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+627


Version Information: Microsoft .NET Framework Version:2.0.50727.3053;
ASP.NET Version:2.0.50727.3053
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report exceeds 250MB limit - what now?

2008-12-22 Thread crozzer

Hey, thanks Zweitze, not sure how I missed that.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report exceeds 250MB limit - what now?

2008-12-19 Thread crozzer

Hi Jeff,
A solid suggestion.  We'll incorporate that eventually.
Unfortunately something as simple as gzipFile.Uncompress() is only a
dream in .NET...
Thanks,
~Crosby
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API "keep alive" equivalent?

2008-12-19 Thread crozzer

I've got a long-running job (a few hours) that iterates through all of
our 2.8 million criterion across 5 accounts in order to download
them.  I intermittently run across an error like "the connections was
expected to be kept open but was closed by the server..." (I can get
the exact error next time it happens, if necessary).

I'm hoping someone might suggest a good "keep alive" type request I
could insert into my code to execute on occasion with the intent of
keeping the connection alive.

Also, if I try/catch an exception, could you suggest code for re-
establishing a connection, rather just bailing out completely?

We are on .NET 3.5 and sdwords api v13

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to 
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report exceeds 250MB limit - what now?

2008-12-10 Thread crozzer

Indeed, I'm able to download the report as a gzip.
For the record, it was 50MB compressed (and downloaded), 3 GB
uncompressed.
So, indeed, it looks as if the 250MB limit applies to the download
size, NOT the uncompressed size.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Looking to hire - API, .NET, SQL consultant

2008-12-10 Thread crozzer

Thanks for clarifying, Ed!

Additional Requirement: Able to charm your way out of a paper bag.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Looking to hire - API, .NET, SQL consultant

2008-12-09 Thread crozzer

(Please accept my apologies if this post is not welcome in this
group.  I hope it is)

JustAnswer.com is looking to hire a part-time consultant to assist
with in-house development work with the Google AdWords API.  You will
be developing in-house tools to support our PPC Management operation.
We are a Microsoft shop, running on .NET 3.5, Windows Server 2008, and
Windows SQL 2008.

Immediate Tasks (example deliverables)
- Download our entire account structure and store it in a local
database.  Should update nightly, reliably.  You will need to design
and create an appropriate database to support this.  End result - we
should be able to query our campaign structure locally.
- Download performance reports and store them in the local datbase.
Should download nightly, reliably.  You will need to design and create
an appropriate database to support this.  End result - we should be
able to query our performance data locally to produce a "bulk sheet".
- Automate our ability to query the above performance data, stuff it
into excel (where we apply proprietary bidding formulas), and then
export a bulk sheet.
- Upload properly-formatted bulksheets to our Google Accounts.  Should
run on-demand and handle common error-cases gracefully.

Future tasks will build off of these basics.

If interested, please contact:
Crosby Grant
415-929-9921 *5620
[EMAIL PROTECTED] (subject: API Consulting)

Kindly include a resume of related work, a brief description of your
experience with the AdWords API, specifically the .NET library, as
well as your experience with .NET web dev, and T-SQL.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report exceeds 250MB limit - what now?

2008-11-14 Thread crozzer

I assumed you would be able to access my MCC and CID?

I'm re-running the reports now, and will attempt to download them via
browser and post the results later today.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Structure Report exceeds 250MB limit - what now?

2008-11-14 Thread crozzer

My Structure Reports are getting truncated at the 250MB limit.
Is it possible to get an exception on the limit, even if for structure
reports only?

My only alternative would be to iterate through all accounts,
campaigns, adgroups, and criterion, which is A LOT of API units and
extra traffic...

Any other ideas?

MCC: 290-087-1247
CID: 938-333-7070 (example)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report triggers invalid date error in GetAllJobs

2008-11-14 Thread crozzer

original question resolved/reported.
see:
http://code.google.com/p/google-api-adwords-dotnet/issues/detail?id=13
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report triggers invalid date error in GetAllJobs

2008-11-13 Thread crozzer

The same errors that started this thread are now happening in my
client accounts.
Meaning, I can't use the API to download a client account b/c the
serializer chokes on the startdate (and, presumably, enddate).
Any suggested work-arounds much appreciated.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API enabling trace extension causes new errors (.NET 3.5)

2008-11-13 Thread crozzer

I've got some otherwise-working code that when I enable logging by
adding trace extensions in my web.config, I get unexpected run-time
errors.

"Object reference not set to an instance of an object."

I'm guessing this is user-error - maybe I have the settings in the
wrong place, or set to the wrong values?

...

...
  
  
  
  
  
  
...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report triggers invalid date error in GetAllJobs

2008-11-13 Thread crozzer

and, um, noobie (me) found the rest of the soap extensions i needed to
enable in my web.config.
so, got that part figured out anyways.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report triggers invalid date error in GetAllJobs

2008-11-13 Thread crozzer


Thanks for the tip, sounds like you know what you are doing.
I'm just not sure how to apply that to my project, and hoped you might
be able to help.
I'm running .NET 3.5, VS 2008, on Vista, using AWAPI v13 (2.1.0)

i don't know about reference.cs?

thanks

On Nov 10, 4:04 am, IgorAG <[EMAIL PROTECTED]> wrote:
> You schould make endDay and startDay (both field and property)
> nullable in your Web reference Reference.cs file.
> It works.
>
>         public System.DateTime ? startDay {
>             get {
>                 return this.startDayField;
>             }
>             set {
>                 this.startDayField = value;
>             }
>         }
>         private System.DateTime ? startDayField;
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report triggers invalid date error in GetAllJobs

2008-11-13 Thread crozzer

I'm having difficulty turning on my trace logs.
I have read the README, which directs me to add the following, which I
placed in my web.config (not app.config).




I'm running .NET 3.5 , VS 2008, on Vista


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: .NET specific - public AdWordsUser(Hashtable headers) fails?

2008-11-13 Thread crozzer

Done:
http://code.google.com/p/google-api-adwords-dotnet/issues/detail?id=12

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: .NET specific - public AdWordsUser(Hashtable headers) fails?

2008-11-13 Thread crozzer

Umm, okay, I'm hoping someone tells me I was using this wrong.
In the meantime, I've updated my local copy of AdWordsUser.cs as
follows

159: foreach (DictionaryEntry entry in headers)
this.headers.Add(entry.Key, entry.Value);

Which is intended to copy the values from the "headers" parameter into
this.headers.
Which, I think, was the point of this function in the first place.


 Which if I'm right would suggest that the default constructor
should be modified to the following PSEUDO-CODE:
  AdWordsUser()
  {
Get headers from config
Call AdWordsUser(headers)
  }

Again, if I am mis-using this library, please let me know.  Otherwise,
please comment on my suggestion.
Thoughts?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: .NET specific - public AdWordsUser(Hashtable headers) fails?

2008-11-13 Thread crozzer

so, more pointedley, shouldn't line 159 of AdWordsUser.cs be something
like:
this.headers = headers;

(I know, that's not the proper code, but you get the idea).



On Nov 13, 12:35 pm, crozzer <[EMAIL PROTECTED]> wrote:
> This is one of those where I know I must be wrong...  Please help me.
> I'm trying to use this in an application where I have an MCC login,
> and multiple client accounts.
>
> So, when I want to create an instance for a particular child Account
> ID
> ...
>       headers = null;
>       // Successfully gets headers from configuration file for MCC
> login.
>       headers = (Hashtable)
> System.Configuration.ConfigurationSettings.GetConfig
> ("adwordsHeaders");
>       headers["clientCustomerId"] = "XXX-XXX-;  // (obfuscated) -
> set the clientCustomerID to a valid CustomerID
>       _user = new AdWordsUser(headers);
> ...
>
> That results in a _user whose headers are all NULL except for
> clientCustomerID.
> I would expect AdWordsUser(headers) to actually use the values in the
> headers array and set them for _user.
>
> So my question is - do I have to do this myself, or am I doing
> something else wrong.
>
> Looking into the supplied API /lib/AdWordsUser.cs file, it appears
> that the constructor fails to actually set any local headers values
> from the supplied headers parameter (ironically, unless they are of
> the wrong type, in which case it fixes that and sets the local headers
> value).
>
> Is this a bug in the library (I know, unlikely), or user error (much
> more likely).
> Much appreciate any help.
> Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Limits on Reporting Across Accounts with MCC

2008-11-13 Thread crozzer

Another suggestion would be to iterate through each of your accounts,
scheduling a report for each, then go back and get them each
individually.
With the API at least, that's pretty straightforward (though
admittedly pretty painful if you are going to use the web interface to
get the reports).
Big advantage is now you have 15 reports per account, and each of them
can reach max size for each account.

I'm having to do this for structure reports, as an example, mostly
because they are not supported at the MCC level.

Hope that helps,
~Crosby
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API .NET specific - public AdWordsUser(Hashtable headers) fails?

2008-11-13 Thread crozzer

This is one of those where I know I must be wrong...  Please help me.
I'm trying to use this in an application where I have an MCC login,
and multiple client accounts.

So, when I want to create an instance for a particular child Account
ID
...
  headers = null;
  // Successfully gets headers from configuration file for MCC
login.
  headers = (Hashtable)
System.Configuration.ConfigurationSettings.GetConfig
("adwordsHeaders");
  headers["clientCustomerId"] = "XXX-XXX-;  // (obfuscated) -
set the clientCustomerID to a valid CustomerID
  _user = new AdWordsUser(headers);
...

That results in a _user whose headers are all NULL except for
clientCustomerID.
I would expect AdWordsUser(headers) to actually use the values in the
headers array and set them for _user.

So my question is - do I have to do this myself, or am I doing
something else wrong.

Looking into the supplied API /lib/AdWordsUser.cs file, it appears
that the constructor fails to actually set any local headers values
from the supplied headers parameter (ironically, unless they are of
the wrong type, in which case it fixes that and sets the local headers
value).

Is this a bug in the library (I know, unlikely), or user error (much
more likely).
Much appreciate any help.
Thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report triggers invalid date error in GetAllJobs

2008-11-07 Thread crozzer

Thanks for the  speedy response.
Being honest,  I'm new to SOAP, etc., so it's gonna take me a few
minutes to find out how to setup the SOAP trace.

And, yes, I can manually delete the report.  My concern would be that
the same thing is going to happen when I get valid structure reports
in the client accounts.  Will those also bust GetAllJobs?

As for your other questions, I just logged in as MCC and scheduled a
structure report.  Since it validated, I ran it (Hoping for
undocumented functionality to get me a structure report for my entire
MCC account structure, but I got an empty report instead.  That might
be worth updating in the future.  Meaning - don't validate a structure
report at the MCC level.

As a feature request, It would be terrific if we could get MCC level
structure reports.  As it is, I have to iterate through each client,
validate and schedule, then go back some time later and collect them.
All my other (performance) reports run at the MCC level, this one
should too.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Structure Report triggers invalid date error in GetAllJobs

2008-11-07 Thread crozzer

OK, not sure how to generate XML / SOAP trace info with .NET.

I found this page, but nothing about .NET.
http://www.google.com/support/adwordsapi/bin/answer.py?answer=15137

If you could point me in the right direction, that would be great.
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Structure Report triggers invalid date error in GetAllJobs

2008-11-07 Thread crozzer

Hi,
I'm running into an error where a previously scheduled and completed
structure report is sitting and waiting in my account (happens to be
an MCC account).  As long as that report is there, when I run
GetAllJobs, i get the following error: (running .NET 3.5)


 String was not recognized as a valid DateTime.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.FormatException: String was not recognized
as a valid DateTime.

Source Error:

Line 98: [return:
System.Xml.Serialization.XmlElementAttribute("getAllJobsReturn")]
Line 99: public ReportJob[] getAllJobs() {
Line 100:object[] results = this.Invoke("getAllJobs", new
object[0]);
Line 101:return ((ReportJob[])(results[0]));
Line 102:}


Source File: C:\inetpub\ppc-tools\lib\src\v12\ReportService.cs
Line: 100

Stack Trace:

[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.ParseExactMultiple(String s, String[] formats,
DateTimeFormatInfo dtfi, DateTimeStyles style) +2302870
   System.DateTime.ParseExact(String s, String[] formats,
IFormatProvider provider, DateTimeStyles style) +46
   System.Xml.XmlConvert.ToDateTime(String s, String[] formats) +26
   System.Xml.Serialization.XmlCustomFormatter.ToDateTime(String
value, String[] formats) +8
   System.Xml.Serialization.XmlCustomFormatter.ToDate(String value)
+36
   System.Xml.Serialization.XmlSerializationReader.ToDate(String
value) +30
 
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderReportService.Read20_DefinedReportJob(Boolean
isNullable, Boolean checkType) +1068
 
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderReportService.Read21_ReportJob(Boolean
isNullable, Boolean checkType) +130
 
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderReportService.Read30_getAllJobsResponse()
+300
 
Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer17.Deserialize(XmlSerializationReader
reader) +40
   System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle, XmlDeserializationEvents events) +161

[InvalidOperationException: There is an error in XML document (511,
34).]
   System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle, XmlDeserializationEvents events) +637
   System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle) +32
 
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall) +1671
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +204
   com.google.api.adwords.v12.ReportService.getAllJobs() in C:\inetpub
\ppc-tools\lib\src\v12\ReportService.cs:100
   ja.api.google.adwords.ReportClient.saveAllReports() in c:\inetpub
\ppc-tools\App_Code\ja_google_api_adwords\ReportClient.cs:266
   GetReports.Page_Load(Object sender, EventArgs e) in c:\inetpub\ppc-
tools\GetReports.aspx.cs:28
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,
Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object
sender, EventArgs e) +33
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1436


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Re: Best method for downloading full account?

2008-10-29 Thread crozzer

imma noob.  Just found Account Structure Reports.  Thanks.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---



AdWords API Best method for downloading full account?

2008-10-29 Thread crozzer

Hi,

We've got 5 Accounts under an MCC, and about 4Million active keywords
and placements.  We're just getting started with the API, and one of
my first tasks is to begin to maintain a "snapshot" of the current
state of everything.

I have to imagine others have had this requirement.

So, what's the best way to go about it?

Here is what I've tried:
First, since there is no mechanism to see what is changed since
yesterday, i have to dump and start over.

What I do is I nest a bunch of for loops, pulling the info and writing
to the DB as I go.  So, for all accounts (write account info), for all
campaigns (write campaign info), for all AdGroups (write AdGroup
info), for all Criterion (write criterion info).

This runs for about 3 hours...

But I can download a Keyword Report, with most of this information, in
about 5 minutes!

There must be a better way - please share?
Thanks,
~Crosby
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~--~~~~--~~--~--~---