Solved

banner

Posted on 2001-06-08
13
601 Views
Last Modified: 2007-11-27
I have script in c:\inetpub\wwwroot\banner.asp like

<html>
<body>
<%
set adrotator=Server.CreateObject("MSWC.AdRotator")
adrotator.Border="2"
adrotator.Clickable=false
Response.Write(adrotator.GetAdvertisement("/ban.txt"))
%>


</body>
</html>

And the ban.txt file in c:\  like:

*
C:\pic\pic01.jpg
http://localhost/test.asp
Complete HTML 4.0 Reference
20
C:\pic\sample.jpg
http://localhost/test.asp
Web Tutorials from W3Schools
20

When i run the script in internet explorer 5.0 this error comes out:

Error Type:
MSWC.Adrotator (0x80004005)
ERROR Cannot load rotation schedule file
/banner.asp, line 7

My question is:
1. I don't know about the virtual path, could it be a virtual path problem?
2. I just simply choose the image as the testing banner, could it be the size of the image problem?
3. What is the allowed size of the image?? (width and height)
4. How to create a virtual path in IIS 5??

Thank you
0
Comment
Question by:anwar13
[X]
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
  • 6
  • 4
  • 3
13 Comments
 
LVL 20

Expert Comment

by:Silvers5
ID: 6166791
did you give the IUSR read permissions on that file??
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6166802
did you give the IUSR read permissions on that file??
0
 

Author Comment

by:anwar13
ID: 6166949
how to go give the IUSR read permission on that file??
0
Technology Partners: 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!

 
LVL 7

Expert Comment

by:weesiong
ID: 6167198
anwar13,

Make sure the path is no wrong if you store in you c drive:

Response.Write(adrotator.GetAdvertisement("c:\ban.txt"))

Regards,
Wee Siong
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6167223
right click the file in windows explorer.. select security tab -> permissions -> add .. select the webserver name from the listbaox, show users and add the iusr_webservername  
0
 

Author Comment

by:anwar13
ID: 6167691
weesiong: error type become like this when i change like what u said.

Error Type:
Server.MapPath(), ASP 0172 (0x80004005)
The Path parameter for the MapPath method must be a virtual path. A physical path was used.
/banner.asp, line 7

Silvers5:

Still cannot solve.

Could it be the image size problem???
0
 
LVL 20

Expert Comment

by:Silvers5
ID: 6167784
no.. it's the user rights.. also check if the txt is formatted as the ad rotator needs..
0
 
LVL 7

Accepted Solution

by:
weesiong earned 100 total points
ID: 6167964
anwar13,

Try put the ban.txt in same directory in your script, and change to this

<%
set adrotator=Server.CreateObject("MSWC.AdRotator")
adrotator.Border=2
adrotator.Clickable=false
Response.Write(adrotator.GetAdvertisement("ban.txt"))
%>

Regards,
Wee Siong
0
 

Author Comment

by:anwar13
ID: 6168035
when i change the location of the ban.txt file to same directory it can display and change the image everytime i click refresh button.

Why it can't automatically change the image??
0
 
LVL 7

Expert Comment

by:weesiong
ID: 6168076
anwar13,

>when i change the location of the ban.txt file to same directory it can display and change the image
everytime i click refresh button.
So now it can work, but only the problem must in same directory, right?

Regrads,
Wee Siong
0
 

Author Comment

by:anwar13
ID: 6168446
yes,
but why it can't rotate the picture, i mean automatically change the picture.
0
 

Author Comment

by:anwar13
ID: 6168460
yes,
but why it can't rotate the picture, i mean automatically change the picture.
0
 

Author Comment

by:anwar13
ID: 6168922
It's ok now, i know why already since it's not an animation image like the example.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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/…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

728 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