Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: HELP PLEASE


Message #1 by "Nick" <nick@g...> on Tue, 10 Sep 2002 14:24:43 +0700
I have a weird problem. I have a file called "Weird.aspx". It uses asp:repeater. It worked when I put it
in "c:\webroot\admin\Weird.aspx". But when I put that file in "c:\webroot\Weird.aspx" it wont work, it's error said
"System.Web.HttpException: Cannot use a leading .. to exit above the top directory." 
The error is in Bind() line. Can someone tell me what wrong? Thank you very much. 
Here is the syntax: 
<script language="vb" runat="server"> 
'BLA BLA BLA (CONNECTION, ETC) 
Dim myAdapter As New SqlDataAdapter("SpVGallery", myConnection) 
Dim ds As New DataSet() 
myAdapter.Fill(ds, 1('###START RECORD), 10('##PAGE SIZE), "GalleryFoto") 
MyRepeater.DataSource = ds.Tables("GalleryFoto").DefaultView 
'##### ERROR IN THIS LINE, BUT IT WORKED IF I PUT IN FOLDER, NOT 
'##### NOT IN ROOT FOLDER 
MyRepeater.DataBind() 
'##### 
</script> 
<form runat="server"> 
<asp:repeater> 
'BLA BLA BLA (ITEM TEMPLATE, ETC) 
</asp:repeater> 
</form> 

Message #2 by Imar Spaanjaars <Imar@S...> on Tue, 10 Sep 2002 18:28:32 +0200
Could the error be caused by the part you replaced with 'BLA BLA BLA 
(CONNECTION, ETC) "??

It may be so that the connection string tries to open a database based on a 
relative path.....

The problem may also be related to a custom 404 handler. Check your config 
file for that and check out:
http://lists.evolt.org/archive/Week-of-Mon-20020318/107541.html

HtH


Imar


At 02:24 PM 9/10/2002 +0700, you wrote:
>I have a weird problem. I have a file called "Weird.aspx". It uses 
>asp:repeater. It worked when I put it in "c:\webroot\admin\Weird.aspx". 
>But when I put that file in "c:\webroot\Weird.aspx" it wont work, it's 
>error said "System.Web.HttpException: Cannot use a leading .. to exit 
>above the top directory."
>The error is in Bind() line. Can someone tell me what wrong? Thank you 
>very much.
>Here is the syntax:
><script language="vb" runat="server">
>'BLA BLA BLA (CONNECTION, ETC)
>Dim myAdapter As New SqlDataAdapter("SpVGallery", myConnection)
>Dim ds As New DataSet()
>myAdapter.Fill(ds, 1('###START RECORD), 10('##PAGE SIZE), "GalleryFoto")
>MyRepeater.DataSource = ds.Tables("GalleryFoto").DefaultView
>'##### ERROR IN THIS LINE, BUT IT WORKED IF I PUT IN FOLDER, NOT
>'##### NOT IN ROOT FOLDER
>MyRepeater.DataBind()
>'#####
></script>
><form runat="server">
><asp:repeater>
>'BLA BLA BLA (ITEM TEMPLATE, ETC)
></asp:repeater>
></form>


Message #3 by "Datatal AB - Gauffin, Jonas" <Jonas@d...> on Wed, 11 Sep 2002 10:09:40 +0200
do you have something in your itemtemplate that points to a directory 
that exits the top directory?
(check for .. in your itemtemplate)

> -----Original Message-----
> From: Nick [mailto:nick@g...]
> Sent: den 10 september 2002 09:25
> To: aspx_beginners
> Subject: [aspx_beginners] HELP PLEASE
>
>
> I have a weird problem. I have a file called "Weird.aspx". It
> uses asp:repeater. It worked when I put it in
> "c:\webroot\admin\Weird.aspx". But when I put that file in
> "c:\webroot\Weird.aspx" it wont work, it's error said
> "System.Web.HttpException: Cannot use a leading .. to exit
> above the top directory."
> The error is in Bind() line. Can someone tell me what wrong?
> Thank you very much.
> Here is the syntax:
> <script language=3D"vb" runat=3D"server">
> 'BLA BLA BLA (CONNECTION, ETC)
> Dim myAdapter As New SqlDataAdapter("SpVGallery", myConnection)
> Dim ds As New DataSet()
> myAdapter.Fill(ds, 1('###START RECORD), 10('##PAGE SIZE),
> "GalleryFoto")
> MyRepeater.DataSource =3D ds.Tables("GalleryFoto").DefaultView
> '##### ERROR IN THIS LINE, BUT IT WORKED IF I PUT IN FOLDER, NOT
> '##### NOT IN ROOT FOLDER
> MyRepeater.DataBind()
> '#####
> </script>
> <form runat=3D"server">
> <asp:repeater>
> 'BLA BLA BLA (ITEM TEMPLATE, ETC)
> </asp:repeater>
> </form>
>
>
> ---
> Beginning ASP.NET Databases using VB.NET
> http://www.wrox.com/ACON11.asp?ISBN=3D1861006195
>
> Beginning ASP.NET Databases using C#
> http://www.wrox.com/ACON11.asp?ISBN=3D1861007418
>
> These books look at how we can create data-centric ASP.NET
> applications. Requiring some basic knowledge of ASP.NET,
> Access and SQL the authors guide you through the process
> of connecting and consuming information in a variety of
> ways. They are packed full of excellent illustrative code
> examples, demonstrating important fundamental principles.
>
>

  Return to Index