locked
The creator of this fault did not specify a Reason Error RRS feed

  • Question

  • Yesterday I was tasked with updating our AdCenter version from 5.1 to 6.0.  I have run into issues calling the AdCenter api ever since the upgrade.  Currently, I am getting this error when I run the very basic Hello Microsoft adCenter Sample in C# sample .  I am also getting this error when I download campaigns in my companies main product.

    System.ServiceModel.FaultException`1[HelloGetCampaigns.CampaignManagementService.ApiFaultDetail]: The creator of this fault did not specify a Reason. (Fault Detail is equal to HelloGetCampaigns.CampaignManagementService.ApiFaultDetail).

    In the sample, if I alter the username or password I get an authentication error when they are correct not matter what the customer account id and the customer id are I run into the issue above.  I believe my wcf config values are correct.  This is happening when I call an api in the PRODUCTION environment not the sandbox.

    I believe what is happening is there is an unhandled exception that is occurring in your system after I make a request and my request's authentication is valid.

    I also ran into this issue when I generated my adcenter web service proxy using wsdl.exe.  It seems no matter what I do this "The creator of this fault did not specify a Reason Error" is returned when I make an api call to the campaign management service.

    FYI
    My client was written in .net code (C#).  I generated my webservice proxy class using svcutil as well as wsdl.exe and ran into this issue both ways.  I check the xml that is being posted to adcenter and it looks fine.

    I also have been getting intermittent timeouts the whole day in your production environment.  Email me if you need anymore clarification.



    Thanks

    Thursday, May 28, 2009 12:02 AM

Answers

All replies

  • We have had some intermittent system issues today, but they should be resolved now. If you continue to get exceptions, I would suggest opening a support ticket, and supplying your full SOAP request and response as described here:

    http://adcentercommunity.com/blogs/api/archive/2008/03/08/debugging-web-service-calls.aspx

    and

    http://adcentercommunity.com/blogs/api/archive/2009/01/08/soap-capture-training-video.aspx

    Jeff Dillon, API Support
    Thursday, May 28, 2009 1:07 AM
  • I filed a support ticket:1103128772.  I just thought I would reply to this thread with it.  I xed out my username and  password adcenter credentials since this is a public forum.  Thanks

    ------------Support Ticket Email----------------------
    We recently upgraded out code to use v6 of the AdCenter API from v5.1.  And now we cannot make api calls.  The error that is getting thrown is

    ---------------Error --------------------
    System.ServiceModel.ServiceActivationException: The requested service, 'https://adcenterapi.microsof
    t.com/Api/Advertiser/v6/CampaignManagement/CampaignManagementService.svc' could not be activated. Se
    e the server's diagnostic trace logs for more information.

    Server stack trace:
       at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest
    request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException)
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForR
    eply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)

       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperation
    Runtime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,
    ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    ----------end of error------------------------------

    I am now getting this error when I make the request
    ---------------error----------------------------------------

    System.ServiceModel.FaultException`1[HelloGetCampaigns.CampaignManagementService.ApiFaultDetail]: Th
    e creator of this fault did not specify a Reason. (Fault Detail is equal to HelloGetCampaigns.Campai
    gnManagementService.ApiFaultDetail).
    Press any key to continue . . .
    -----------------end of error--------------------------------

    We are making the calls using WCF.  I believe this is a config issue on my end or a server issue on your end.  To repro the error in a consistent way, I recreated your HelloGetCampaigns application and then tried call GetAllCampaigns.  I get the same error.
    Using Fiddler I captured the request that is being posted to the CampaignManagement Service
    https://adcenterapi.microsoft.com/Api/Advertiser/v6/CampaignManagement/CampaignManagementService.svc

    -------------Request---------------------
    POST /Api/Advertiser/v6/CampaignManagement/CampaignManagementService.svc HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    SOAPAction: "GetCampaignsByAccountId"
    Host: adcenterapi.microsoft.com
    Content-Length: 800
    Expect: 100-continue
    Connection: Keep-Alive

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header><h:ApplicationToken i:nil="true" xmlns:h="https://adcenter.microsoft.com/v6" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
    <h:CustomerAccountId xmlns:h="https://adcenter.microsoft.com/v6">X0692045</h:CustomerAccountId>
    <h:CustomerId xmlns:h="https://adcenter.microsoft.com/v6">7456</h:CustomerId>
    <h:DeveloperToken xmlns:h="https://adcenter.microsoft.com/v6">XXXXXXXXX</h:DeveloperToken>
    <h:Password xmlns:h="https://adcenter.microsoft.com/v6">XXXXXXXXX</h:Password>
    <h:UserName xmlns:h="https://adcenter.microsoft.com/v6">XXXXXXXXX</h:UserName>
    </s:Header>
    <s:Body><GetCampaignsByAccountIdRequest xmlns="https://adcenter.microsoft.com/v6">
    <AccountId>7456</AccountId>
    </GetCampaignsByAccountIdRequest>
    </s:Body>
    </s:Envelope>
    --------------End of request------------
    I also am going to include my app config file just in case it is a configuration issue on my end.
    ------app.config-----------
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <system.serviceModel>
    <bindings>
       <basicHttpBinding>
        <binding name="BasicHttpBinding_ICampaignManagementService" closeTimeout="00:01:00"
         openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
         allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
         maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
         messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
         useDefaultWebProxy="true">
         <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
         <security mode="Transport">
          <transport clientCredentialType="None" proxyCredentialType="None"
           realm="" />
          <message clientCredentialType="UserName" algorithmSuite="Default" />
         </security>
        </binding>
        </basicHttpBinding>
      </bindings>
      <client>
       <endpoint address="https://adcenterapi.microsoft.com/Api/Advertiser/v6/CampaignManagement/CampaignManagementService.svc"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICampaignManagementService"
        contract="CampaignManagementService.ICampaignManagementService"
        name="BasicHttpBinding_ICampaignManagementService" />
      </client>
    </system.serviceModel>
    </configuration>
    -----end of app.config------


    Thursday, May 28, 2009 5:58 PM
  • I forgot to mention I did not include my app.config file in the support email like I did in this thread since I ran into the 5000 char limit.  I did this because it appears the v6 adcenter api uses SOAP 1.2 but after looking at my request it looks like I am sending SOAP 1.1.  If that is an issue.  How do I modify my config file to send my requests in the SOAP 1.2 format?
    Thursday, May 28, 2009 6:04 PM
  • My bad, it looks like the service wants the request in SOAP 1.1.  When I sent the request in SOAP 1.2 I got this error

    System.ServiceModel.ProtocolException: Content Type application/soap+xml; charset=utf-8 was not supp
    orted by service https://adcenterapi.microsoft.com/Api/Advertiser/v6/CampaignManagement/CampaignMana
    gementService.svc.  The client and service bindings may be mismatched. ---> System.Net.WebException:
     The remote server returned an error: (415) Cannot process the message because the content type 'app
    lication/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForR
    eply(TimeSpan timeout)
       --- End of inner exception stack trace ---

    Server stack trace:
       at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException
    webException, HttpWebRequest request, HttpAbortReason abortReason)
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForR
    eply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)

       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperation
    Runtime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,
    ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg
    )
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at HelloGetCampaigns.CampaignManagementService.ICampaignManagementService.GetCampaignsByAccountId
    (GetCampaignsByAccountIdRequest request)
       at HelloGetCampaigns.CampaignManagementService.CampaignManagementServiceClient.HelloGetCampaigns.
    CampaignManagementService.ICampaignManagementService.GetCampaignsByAccountId(GetCampaignsByAccountId
    Request request) in c:\svn\users\cfarah\home\projects\hellogetcampaigns\service references\campaignm
    anagementservice\reference.cs:line 12536
       at HelloGetCampaigns.CampaignManagementService.CampaignManagementServiceClient.GetCampaignsByAcco
    untId(String ApplicationToken, String CustomerAccountId, String CustomerId, String DeveloperToken, S
    tring Password, String UserName, Int64 AccountId, Campaign[]& Campaigns) in c:\svn\users\cfarah\home
    \projects\hellogetcampaigns\service references\campaignmanagementservice\reference.cs:line 12548
       at HelloGetCampaigns.Program.GetAllCampaigns(String username, String password, String appToken, S
    tring devToken, String customerAccountId, Int64 customerId) in C:\svn\users\cfarah\home\projects\Hel
    loGetCampaigns\Program.cs:line 39
    Press any key to continue . . .

    Thursday, May 28, 2009 6:13 PM
  • Well we figured out what the issue was.  Apparently you have to send the same value for

    customerAccountId and customerId and accountId in the api call.  I was populating the CustomerAccountID with the AccountNumber.

    Just for clarification
    AccountId is the same as the CustomerId
    AccountId is the same as the CustomerAccountId
    AccountId is the same as the AccountId

    in CampaignManagement calls.  Seems a little weird you would use the same value three times.

     

     

    Thursday, May 28, 2009 8:34 PM
  • This information is actually incorrect.

    AccountID is not the same as the CustomerID. A customer can have many accounts, so there would be a one to many relationship between a single CustomerID and multiple AccountIDs. The CustomerID is generally only needed on those calls that would span multiple accounts, as in certain targetting scenarios. We will be providing a clear explanation in the very near future.

     

    Jeff Dillon, Microsoft API Support


    Sunday, August 23, 2009 3:14 AM
  • <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
    <h:ApplicationToken i:nil="true" xmlns:h="https://sandboxapi.adcenter.microsoft.com/api/Advertiser/v6/CampaignManagement/CampaignManagementService.svc?wsdl" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
    <h:CustomerAccountId xmlns:h="https://sandboxapi.adcenter.microsoft.com/api/Advertiser/v6/CampaignManagement/CampaignManagementService.svc?wsdl">
    XXXXX</h:CustomerAccountId>
    <h:CustomerId i:nil="true" xmlns:h="https://sandboxapi.adcenter.microsoft.com/api/Advertiser/v6/CampaignManagement/CampaignManagementService.svc?wsdl" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
    <h:DeveloperToken xmlns:h="https://sandboxapi.adcenter.microsoft.com/api/Advertiser/v6/CampaignManagement/CampaignManagementService.svc?wsdl">XXXXX</h:DeveloperToken>
    <h:Password xmlns:h="https://sandboxapi.adcenter.microsoft.com/api/Advertiser/v6/CampaignManagement/CampaignManagementService.svc?wsdl">XXXXX</h:Password>
    <h:UserName xmlns:h="https://sandboxapi.adcenter.microsoft.com/api/Advertiser/v6/CampaignManagement/CampaignManagementService.svc?wsdl">XXXXX</h:UserName>
    </s:Header>
    <s:Body>
    <GetCampaignsByAccountIdRequest xmlns="https://sandboxapi.adcenter.microsoft.com/api/Advertiser/v6"><AccountId>XXXXX</AccountId></GetCampaignsByAccountIdRequest>
    </s:Body>
    </s:Envelope>


    Hi, i'm getting the same error. Am i doing some wrong with this SOAP Request? What situations would return this type of error? It be nice if the errors could be clearer or have some sort of description to it.
    Tuesday, September 29, 2009 5:20 PM