-
Mar 19th, 2007, 12:01 PM
#1
Thread Starter
Fanatic Member
adrotator problem
Hello, all,
I'm geting the error
The AdRotator adRotator1 could not find the AdvertisementFile or the file is invalid.
I've looked around the net and on this forum and it looks like what I have is correct. But for some reason, I'm still geting this error.
I'm including a very basic example that doesn't even work. What am I doing wrong? I'm using ASP.NET 2.0
Thanks,
Strick
Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:AdRotator ID="AdRotator1" AdvertisementFile="/App_Data/FrontPagePics.xml" runat="server" />
</div>
</form>
</body>
</html>
Here is my xml file code:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<Advertisments>
<Ad>
<ImageURL>images/banner1.jpg</ImageURL>
<NavigateURL>http://www.microsoft.com</NavigateURL>
<AlternateText>Microsoft Site</AlternateText>
<Keyword>Computers</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisments>
-
Mar 21st, 2007, 03:27 PM
#2
Re: adrotator problem
You've capitalized URL. Remember that XML is case sensitive. Use ImageUrl, NavigateUrl, etc.
-
Mar 21st, 2007, 06:22 PM
#3
Thread Starter
Fanatic Member
Re: adrotator problem
Hello,
Unfortunately that didn't work either. I made it small letters and still it didn't work. Very frustrating since most sites on the net and even this forum show how to do it exactly as I have done it. Anything else you think it could be?
Code:
<?xml version="1.0" encoding="utf-8" ?>
<Advertisments>
<Ad>
<ImageUrl>images/banner1.jpg</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>Microsoft Site</AlternateText>
<Keyword>Computers</Keyword>
<Impressions>50</Impressions>
</Ad>
</Advertisments>
-
Mar 21st, 2007, 07:16 PM
#4
Hyperactive Member
Re: adrotator problem
I've just been setting up a few ad rotators on a site I'm working on.
Have you tried
Code:
AdvertisementFile="~/App_Data/FrontPagePics.xml"
I think the "~" points to the root.
Good luck
-
Mar 21st, 2007, 09:04 PM
#5
Thread Starter
Fanatic Member
Re: adrotator problem
This is weird as hell, but I got so frustrated that I just deleted my adrotators and xml files and recreated them identically and now they work....
Strick
-
Mar 23rd, 2007, 12:37 PM
#6
Re: adrotator problem
That's the ASP.NET troubleshooting equivalent of Windows: "Please reinstall the application and it should work."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|