Hello List,
I hope you can assist me with a problem I created. I have a problem, I think, due to having an ADCenter.dll assembly out of synch with what is found in the system registry. This is based on the help text for the ActiveX component error, my application is throwing. I had to recreate this .dll and .tlb in order to modify the password hardcoded in the below routine.
Private Sub SetAuthCredentials(ByRef pAPI As AdCenterAPI)
We integrate the XML response from the web service into a Excel spreadsheet, and I believe that this the problem. The VB project contains a reference to the ADCenter, and is included into our Excel macros. The error is found within the following code block
Public Sub MSNRequestReport(ByVal AccountID As Long, _
Optional ByVal ReportType As String, _
Optional ByVal accountName As String)
Dim Request As ADcenter.ReportRequest
Dim API As API
Set API = New API
Dim RequestID As String
Dim sheetname As String
Select Case ReportType
Case "Account Performance Report"
sheetname = "MSN - " & "Account Report"
Set Request = New AccountPerformanceReportRequest
Case "Keyword Performance Request"
sheetname = "MSN - " & "Keyword Report"
Set Request = New KeywordPerformanceReportRequest
Request.AccountID = AccountID
Case "Campaign Performance Report"
sheetname = "MSN - " & "Campaign Report"
Set Request = New CampaignPerformanceReportRequest
Request.AccountID = AccountID
Case "Ad Performance Request"
sheetname = "MSN - " & "Ad Report"
Set Request = New AdPerformanceReportRequest
Request.AccountID = AccountID
Case "Order Performance Request"
sheetname = "MSN - " & "Order Report"
Set Request = New OrderPerformanceReportRequest
Request.AccountID = AccountID
Case "Budget Summary"
sheetname = "MSN - " & "Budget Summary"
Set Request = New BudgetSummaryReportRequest
Case Else
sheetname = "MSN - " & "Keyword Report"
Set Request = New KeywordPerformanceReportRequest
Request.AccountID = AccountID
End Select
If accountName <> "" Then sheetname = Replace(Replace(Replace(Replace(accountName, "-", ""), "/", ""), "\", ""), "DO NOT USE", "")
Request.Format = 0
Request.ReportLanguage = 0
Request.Zipped = False
Request.ReportDateRange = 15
RequestID = API.RequestBIReport(Request)
Dim reportstatus As APIReportStatusType
Dim complete As Boolean
complete = False
Do While Not complete
Set reportstatus = API.GetAPIReportStatus(RequestID)
If reportstatus.reportstatus = 3 Then
complete = True
End If
Loop
The application is throwing an "ActiveX component can't create object error", and I believe this is due to the recompilation.
Is there a way I can update the registry entries for the complete suite of ADcenter.com.msn.adcenterapi.* like KeywordPerformanceReportRequest to reflect this new assembly Alternatively, when using the Visual Studio 2003 to build, can I request that the application retain these settings, so that when I deploy the .dll and .tlb they do not cause this 429 error
It's my first Visual Studio project, so any help and tips are most appreciated.
Thanks in advance,
David

MS VB Run Time Error 429
WL_07
Hello David,
I always appreciate a VB post, since VB & VB.Net were my favorite languages for quite some time
As you know, at adCenter we use a DotNet Webservice for our APIs. I noticed you mentioned that you are using Visual Studio 2003 as your development environment, Visual Studio does a good job of generating strong-typed assemblies for any SOAP-enabled web service (like adCenter), by using the WSDL file for the webservice. From time to time, we may update our web service code, which in turn will generate a new WSDL. In order to ensure that you are working with the latest version of our webservice APIs, please do the following:
Once you have completed these steps, be sure to re-compile your project. After recompiling (if it is successful) you may need to check your code to make sure that nothing is outdated (you should see errors or warnings in this case).
Having said that, don't worry about code-breaking updates,
we do everything we can to help ensure that our updates do not invalidate your working code and we warn whenever possible, weeks in advance before any code-changes are required; however, it is your responsibility to ensure that your code is referencing an up-to-date version of our web service.
Should you still experience any issues after trying what I suggest above, please reply with the web service URL you are using for your adCenter Web Reference, you could also do this during runtime with code like:
MessageBox.Show(API.Url.ToString)
I hope this helps.
Please feel free to contact me should you have any further questions or comments; or if I can be of assistance in any other way.
Best Regards,
Jason - MSFT
erzfezsf
Appreciate it much. Can you help me get the latest copy of the AdCenter API SDK
Thanks for all your detailed instructions and assistance,
David
Thurein
I hope to implement in the a.m.
David
riemerg
Hello David,
You are correct in the assumption that you are using an outdated URL for the AdCenter WSDLs.
First, please allow me to explain that the old-style WSDL (most likely the version you coded against, which is now unsupported) combined all available API functions into one web-service. Now, in our continuing effort to improve our API according to customer feedback, we have split the available API functions into logical categories of webservices.
I noticed in your first post (above) that you were calling a Report Request. The new WSDL for reporting is:
https://adcenterapi.microsoft.com/v2/Reporting/Reporting.asmx wsdl
likewise, for Campaign Management, the WSDL is:
https://adcenterapi.microsoft.com/v2/CampaignManagement/CampaignManagement.asmx wsdl
In order to proceed using these new WSDLs, you will need to:
This may seem like a lot at first, but you shouldn't have to change much code. I would also reccomend that you obtain the latest copy of our API SDK and review pertinent changes to our API Reporting.
Furthermore, I would encourage you to take a look at our adCenter Developer Blog, which is full of usefull code samples and scenarios: http://adcenterdev.spaces.live.com/
Once again, I hope this helps you in your coding efforts.
We appreciate your time and effort in using the adCenter API, and thank you for sharing your efforts on the forum!
Best Regards,
JasonDT- MSFT
jomunoz
David,
You can access the current adCenter API content via http://connect.microsoft.com using your Windows Live ID, assuming you have already accepted the Microsoft Connect invitation for adCenter API that was sent 8/28/2006. If you did not receive the Microsoft Connect invitation e-mail for adCenter API, please contact your MSN support representative and asked to be signed up for Microsoft Connect.
Thank you,
Walter Poupore - MSFT
sendtomaz
I updated the Web References as you suggest and re-compiled. I still have the error code returned.
From my Visual Studio 2003 project> Solution Explorer> Web References.
' Runtime Version: 1.1.4322.2032
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </autogenerated>
'------------------------------------------------------------------------------
Option Strict Off
Option Explicit On
Imports System
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Xml.Serialization
'
'This source code was auto-generated by Microsoft.VSDesigner, Version 1.1.4322.2032.
'
Namespace com.msn.adcenterapi
'<remarks/>
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Web.Services.WebServiceBindingAttribute(Name:="AdCenterAPISoap", [Namespace]:="http://adcenter.msn.com/syncapis")> _
Public Class AdCenterAPI
Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
Public ApiUserAuthHeaderValue As ApiUserAuthHeader
'<remarks/>
Public Sub New()
MyBase.New
Me.Url = "https://adcenterapi.msn.com/adcenterapi.asmx"
End Sub
And from the adcenterapi.wsdl also under the VS projects Web References.
<wsdl:service name="AdCenterAPI">
<wsdl:port name="AdCenterAPISoap" binding="tns:AdCenterAPISoap">
<soap:address location="https://adcenterapi.msn.com/adcenterapi.asmx" />
</wsdl:port>
<wsdl:port name="AdCenterAPISoap12" binding="tns:AdCenterAPISoap12">
<soap12:address location="https://adcenterapi.msn.com/adcenterapi.asmx" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" />
</wsdl:port>
</wsdl:service>
Is this the correct URL https://adcenterapi.msn.com/adcenterapi.asmx.
I've seen the following blogs from http://adcenterdev.spaces.live.com:
<snip>
Microsoft adCenter WSDL Update August 15, 2006
The above article suggests that I am using an unsupported version of the Web Service. Can you provide me with the correct UR, I've tried the following: https://adcenterapi.microsoft.com/v2/adcenterapi.asmx without luck.
Thank you,
David