banner

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
anwar13Asked:
Who is Participating?
 
weesiongConnect With a Mentor Commented:
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
 
Michel SakrCommented:
did you give the IUSR read permissions on that file??
0
 
Michel SakrCommented:
did you give the IUSR read permissions on that file??
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
anwar13Author Commented:
how to go give the IUSR read permission on that file??
0
 
weesiongCommented:
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
 
Michel SakrCommented:
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
 
anwar13Author Commented:
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
 
Michel SakrCommented:
no.. it's the user rights.. also check if the txt is formatted as the ad rotator needs..
0
 
anwar13Author Commented:
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
 
weesiongCommented:
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
 
anwar13Author Commented:
yes,
but why it can't rotate the picture, i mean automatically change the picture.
0
 
anwar13Author Commented:
yes,
but why it can't rotate the picture, i mean automatically change the picture.
0
 
anwar13Author Commented:
It's ok now, i know why already since it's not an animation image like the example.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.