Problem in  AdRotator, No error msg, but nothing comes up, empty....

Posted on 2003-03-14
Medium Priority
Last Modified: 2008-02-01
I am a begginer and learning ASP from an e-book. I am basicly copying and pasting code. I am trying to put Ad Rotator but nothing happens. Code is right, everything is in order, code syntax, files, file names, directories... I dont have any error message at least.

In index.asp, I have ContentRotator, PageCounter and AdRotator... Other two is working well but Adrotator turns out nothing. empty. None.

I tried other examples from the net, same thing, nothing happens.

Here is the code:

Dim adrotSample
Dim strAdRotSchedFile
Dim strAdString
Set adrotSample = Server.CreateObject("MSWC.AdRotator")
adrotSample.Border = 0
adrotSample.TargetFrame = "_blank"
strAdRotSchedFile = "/outpost/ads/AdRotatorSched.txt"
strAdString = adrotSample.GetAdvertisement(strAdRotSchedFile)
<%= strAdString%>

     <% set pageCount = Server.CreateObject("MSWC.PageCounter") %>
   This page has been accessed <%= pageCount.pageHit %> times.


And here is my /outpost/ads/AdRotatorSched.txt file:

REDIRECT /outpost/ads/goToSponsor.asp
Visit Shoe Town, your one stop shop for your footwear
Click here to see the best running shoe company around!
The Walking Shoes company provides for your every need.

And here is the HTML Code when I view index.asp in browser:

<TITLE>Primary Outpost</TITLE>

<BODY bgcolor="#32C800">
<IMG SRC="images/logo.gif" ALT="Primary Outpost Logo" HEIGHT="67" WIDTH="496">
"The Salami That Ate Cleveland" is breaking box office records
everywhere.  Tickets have been sold out for days for the new
sf thriller comedy.  Be sure to see it if you love farce and
<A href="news/news.asp">
<IMG SRC="images/news.gif" BORDER=0 ALIGN="middle" ALT="News" HEIGHT="39" WIDTH="39">
News</A> -- find out the latest happenings
  <A href="news/archives.asp"> <IMG SRC="images/archives.gif" BORDER=0 ALIGN="middle" ALT="Archived News" HEIGHT="39"
001 WIDTH="39"> Archived News</A> -- better late than never <BR>
  <A href="bazaar/bazaar.asp"> <IMG SRC="images/bazaar.gif" BORDER=0 ALIGN="middle" ALT="The Bazaar" HEIGHT="39"
002 WIDTH="39"> The Bazaar</A> -- shop <BR>
  <A href="auction/auctions.asp"> <IMG SRC="images/auction.gif" BORDER=0 ALIGN="middle" ALT="Auctions" HEIGHT="39"
003 WIDTH="39"> Auctions</A> -- got it? sell it. want it? buy it. <BR>
<A href="mySpace/mySpace.asp">
<IMG SRC="images/myspace.gif" BORDER=0 ALIGN="middle" ALT="mySpace" HEIGHT="39"
mySpace</A> -- carve out your niche
<A href="register.asp">
<IMG SRC="images/register.gif" BORDER=0 ALIGN="middle" ALT="Register"
HEIGHT="39" WIDTH="39">
Register</A> -- jump on board


   This page has been accessed 24 times.



No evidence of adrotator readed and translated into the page. But if I write one of the statements or objects wrong, it gives an error so it reads the adrotator but don't put into the page...

My machine is P4 2.0 Ghz
Windows XP Pro with IIS 5.1 installed
256 MB memory


Any ideas?

you can mail me at burak@toruko.com
thanks in advance.

Question by:Buraque
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2

Expert Comment

ID: 8136336
I tried your code the ad does rotate to a different one once in a while. Like the 25 times I refreshed the page the ad changed some 5-6 times.
LVL 19

Expert Comment

ID: 8136421
I think you've got TOO MUCH code.
All I use is this...
Set objAdRot = Server.CreateObject("MSWC.AdRotator")
strHTML = objAdRot.GetAdvertisement("adrot.txt")

It works fine. Try commenting out these lines
adrotSample.Border = 0
adrotSample.TargetFrame = "_blank"

See if that works. Also, remember that you've only got THREE ads, and one of them is coming up *90%* of the time. So it's hardly ever going to change. You might want to change that to 33/33/33 and see what happens.

Author Comment

ID: 8140661
Thanks for comments

webwoman: But it is not working for me at all. I actually don't care if one ad comes like 99% of the time. This is only a test program. But nothings coming up at all :(

Farzinm: If same code is working for you but not for me, that is strange.

I guess I have to make something in my IIS properties. I activated adrot.dll(it is not necessary actually because I have IIS 5.1 installed)just in case but nothing changed. I am stucked with this right now...
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 19

Expert Comment

ID: 8142889
Where are your graphics? They MUST be in EXACTLY the place you specify, and with EXACTLY the same name.

And I wouldn't use the full URL, and most certainly NOT http://localhost -- if they're going to be on your site, use the standard link for them, NOT something that refernces localhost.

Author Comment

ID: 8145157
webwoman: thx for your comment. I have tried thousands of versions of writing URL's. And yes images are in exactly same place with the url.

The problem is, as you see in the HTML source of page, AdRotator object is not translated into the page at all. PageCounter object is translated and printed as "This page have been accessed 24 times"

I don't know, maybe my ADROT.DLL file is corrupted or something.
LVL 19

Expert Comment

ID: 8146493
Or not installed. If it's not working AT ALL, it might not be there.

How are you viewing this? Off your computer? Do you have IIS or PWS? PWS does NOT have the ad rotator component, it will NEVER work on that.

Author Comment

ID: 8148113
It is installed. I have checked with regedit. Actually when you re-start IIS, it uninstalls adrot.dll. And when it is not installed, you got an error message if you try to use it.

I am viewing offline with IIS 5.1. I have no problem with any other objects and components. They are working fine but just this.

I searched other ASP forums, some other people have exactly same problem too. But they also couldn't find any answer :(
LVL 19

Expert Comment

ID: 8151123
What do you mean 'viewing offline'? You can't view ANY server components if you're not going through the http:// protocol.

If you're using FILE/OPEN it WILL NOT work.

Author Comment

ID: 8151997
OMG we're off the track now :)

I am using IIS and what I meant with offline is I am viewing in my local pc, not over internet.
I know it will not work if you double click or try to open... I am NOT THAT new :)))

It maybe my English, I am not native speaker...


Expert Comment

ID: 8152559
How about showing us your entire code or trying just the adrotator part of the code in a test file?
LVL 19

Accepted Solution

webwoman earned 600 total points
ID: 8153536
Just wanted to make sure... we've all been bitten in the assumption before. ;-)

What you posted is the entire code? Everything in the same folder?

Also, you don't need to start/load ad rotator -- it's started/loaded by default with IIS. Have you tried rebooting the server?

Author Comment

ID: 8193056
I found the problem. I have Norton Personal Firewall running and "Blocking Banner Ads" option was "ON"

I turned it off and *BAM* it worked...

I will give the points to webwoman, not only because its a *HOT* name :D, but because she tried to help me the most...

Thanks everyone..

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question