VAST:无法从服务器请求广告。原因:错误#2048

时间:2014-07-28 06:13:20

标签: xml vast

我在使用传递XML文件的URL测试VAST时出错,但是如果我尝试传递XML代码而不是正常工作。

VAST测试网站:

https://developers.google.com/interactive-media-ads/docs/vastinspector

http://demo.jwplayer.com/ad-tester/

VAST代码内容

<?xml version="1.0" encoding="utf-8"?>
<VAST version="2.0">
    <Ad id="Adotube">
        <InLine>
            <AdSystem version="3.0">Webtech91</AdSystem>
            <AdTitle>My First Testing VAST</AdTitle>
            <Description>N/A Description</Description>
            <Impression>
                <![CDATA[http://example.com/p1.php?caller=impression]]>
            </Impression>
            <Creatives>
                <Creative sequence="1" id="oRYYzvQ">
                    <Linear>
                        <Duration>00:00:13</Duration>
                        <TrackingEvents>
                            <Tracking event="firstQuartile">
                                <![CDATA[http://stats.adotube.com/log_stats.php?urid=47700438a615ba109836d0afe562f2a7&action=Views25&b=0&billing_type=0&avpid_stats=oRYYzvQ&pid=&gid=&publisher_id=1797&capid=&wid=wid_2079189957_53d35a1e808224.02092038&geo=IN_09_Rajkot___&ad_id=test&cat_id=0&cam_id=7913&cb=53d35a1e906781.01456052&value=&test=NA_NA_NA_NA_NA_NA_NA_NA&bk=&adex_id=&HTTP_REFERER=http%3A%2F%2Fwww.longtailvideo.com&video_identifier=longtailvideo.com%2Ctest&urid=47700438a615ba109836d0afe562f2a7]]>
                            </Tracking>
                            <Tracking event="midpoint">
                                <![CDATA[http://stats.adotube.com/log_stats.php?urid=47700438a615ba109836d0afe562f2a7&action=Views50&b=0&billing_type=0&avpid_stats=oRYYzvQ&pid=&gid=&publisher_id=1797&capid=&wid=wid_2079189957_53d35a1e808224.02092038&geo=IN_09_Rajkot___&ad_id=test&cat_id=0&cam_id=7913&cb=53d35a1e906781.01456052&value=&test=NA_NA_NA_NA_NA_NA_NA_NA&bk=&adex_id=&HTTP_REFERER=http%3A%2F%2Fwww.longtailvideo.com&video_identifier=longtailvideo.com%2Ctest&urid=47700438a615ba109836d0afe562f2a7]]>
                            </Tracking>
                            <Tracking event="thirdQuartile">
                                <![CDATA[http://stats.adotube.com/log_stats.php?urid=47700438a615ba109836d0afe562f2a7&action=Views75&b=0&billing_type=0&avpid_stats=oRYYzvQ&pid=&gid=&publisher_id=1797&capid=&wid=wid_2079189957_53d35a1e808224.02092038&geo=IN_09_Rajkot___&ad_id=test&cat_id=0&cam_id=7913&cb=53d35a1e906781.01456052&value=&test=NA_NA_NA_NA_NA_NA_NA_NA&bk=&adex_id=&HTTP_REFERER=http%3A%2F%2Fwww.longtailvideo.com&video_identifier=longtailvideo.com%2Ctest&urid=47700438a615ba109836d0afe562f2a7]]>
                            </Tracking>
                            <Tracking event="complete">
                                <![CDATA[http://stats.adotube.com/log_stats.php?urid=47700438a615ba109836d0afe562f2a7&action=Views100&b=0&billing_type=0&avpid_stats=oRYYzvQ&pid=&gid=&publisher_id=1797&capid=&wid=wid_2079189957_53d35a1e808224.02092038&geo=IN_09_Rajkot___&ad_id=test&cat_id=0&cam_id=7913&cb=53d35a1e906781.01456052&value=&test=NA_NA_NA_NA_NA_NA_NA_NA&bk=&adex_id=&HTTP_REFERER=http%3A%2F%2Fwww.longtailvideo.com&video_identifier=longtailvideo.com%2Ctest&urid=47700438a615ba109836d0afe562f2a7]]>
                            </Tracking>
                        </TrackingEvents>
                        <VideoClicks>
                            <ClickThrough>
                            </ClickThrough>
                        </VideoClicks>
                        <MediaFiles>
                            <MediaFile delivery="progressive" bitrate="600" width="640" height="360" type="video/mp4">
                                <![CDATA[http://creative.js.adotube.com/creatives/dev_test/pre1_video1_html5.mp4]]>
                            </MediaFile>
                            <MediaFile delivery="progressive" bitrate="600" width="640" height="360" type="video/x-flv">
                                <![CDATA[http://creative.js.adotube.com/creatives/dev_test/pre1_video1_html5.flv]]>
                            </MediaFile>
                            <MediaFile delivery="progressive" bitrate="600" width="640" height="360" type="video/webm">
                                <![CDATA[http://creative.js.adotube.com/creatives/dev_test/pre1_video1_html5.webm]]>
                            </MediaFile>
                        </MediaFiles>
                    </Linear>
                </Creative>
            </Creatives>
        </InLine>
    </Ad>
</VAST>

我发现某个地方可能是跨浏览器问题所以我放下了以下代码但仍无法正常工作:

<?xml version="1.0" encoding="utf-8"?>
<cross-domain-policy><allow-access-from domain="*"/></cross-domain-policy>
<VAST version="2.0">

网址示例:

http://www.examplesite.com/p1.xml

1 个答案:

答案 0 :(得分:1)

你是对的。这是跨域问题。以下字符串: <cross-domain-policy><allow-access-from domain="*"/></cross-domain-policy>应位于crossdomain.xml文件中,该文件应存在于放置VAST的服务器根目录中。它是flash安全策略所必需的。

因此,您应该将crossdomain.xml放在服务器的根目录中,或者使用上面的字符串更新它。