Hi all,

This is vamsi from Hyderabad. From the past 2 days I am very difficult to solve this eror. We are working for a product project in which it have to include a patch version in end. this patch version should get dynamically depends upon assembly version. So I created "BottomNav.Inc" file . It works fine with aspx pages. But not working with .asp pages.

can you suggest me how to add this. please find the code I have written for both asp and "BottomNav.Inc" below

"for asp page "
	<!-- #include file="bottomnav.inc"-->


  Dim objFSO
  Dim objFSO1
  Dim WSHShell 
  Dim MyArray
  Dim subArr
  Dim Mesg
  Dim strFileName
  Dim FileNameInThisDir 
  Dim ScriptFullName
  Dim strRootFolder 
  strRootFolder = "\atpar\web" & "\.asp"
  Dim Msg
  Dim Dir
  objFSO = CreateObject("Scripting.FileSystemObject")
  objFSO1 = CreateObject("Scripting.FileSystemObject")
   strFileName = "AtPar_BusinessRules.dll"
   FileNameInThisDir =  server.MapPath("/atpar/bin/") &  "\AtPar_BusinessRules.dll"
  Dir=server.MapPath("\atpar\web" ) & "\*.asp"
'Dir=server.MapPath("\atpar\web" ) 
Msg=objFSO.GetExtensionName (Dir)
  Mesg = objFSO1.GetFileVersion(FileNameInThisDir)
   MyArray = Split(Mesg, ".", -1, 1)
   Mesg = MyArray(0) & "." & MyArray(1) & "." & MyArray(2) & ".B4-SP1." & MyArray(3)
   objFSO1 = nothing
   MyArray = nothing
&nbsp;</TD><TD width=3% nowrap>&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    <TD align=left background=images/bottombg.jpg height=48 nowrap>
<table cellSpacing=0 cellPadding=0 border=0 width=100%>
<td width=217 nowrap><IMG src="images/bottom.jpg" width=217></td>
<td valign=bottom align=center nowrap><SPAN class="PageFooter"><b>Copyright © 2001 - 2008 AtPar, Inc.</b><b></span></td>
<td valign=bottom align=right nowrap><SPAN class="PageFooter"><b><%= Mesg %></b></span></td>

What I can understand that it might be a problem with File System object, that it can not read the fiels or ASP engine can not access the files in that directory. Check to see it IISUR has the permissions to access this directory.

Also Dir=server.MapPath("\atpar\web" ) & "\*.asp" here try to use "/" instead of "\".

This article has been dead for over six months. Start a new discussion instead.