Need Help ASAP!!

Discussion in 'ASP .Net' started by Roshawn Dawson, Nov 2, 2005.

  1. Hi,

    I have an xslt file located in the root directory. It is used by an aspx pages in both the root
    directory and a subdirectory. But for some strange reason, the aspx page in the subdirectory can
    neither locate the xslt file or the css file needed to get the desired results.

    What's the problem? Can anyone help me?

    Thanks,
    Roshawn
    Roshawn Dawson, Nov 2, 2005
    #1
    1. Advertising

  2. Is the browser having trouble getting it, or some of your server code? How
    are you trying to interact with it? Are you using relative or absolute
    URLs? Is you are trying to do this on the server, are you accessing the
    correct physical folder?

    "Roshawn Dawson" <> wrote in message
    news:uOV$z$$...
    > Hi,
    >
    > I have an xslt file located in the root directory. It is used by an aspx
    > pages in both the root directory and a subdirectory. But for some strange
    > reason, the aspx page in the subdirectory can neither locate the xslt file
    > or the css file needed to get the desired results.
    >
    > What's the problem? Can anyone help me?
    >
    > Thanks,
    > Roshawn
    Peter Rilling, Nov 2, 2005
    #2
    1. Advertising

  3. Hi Peter and thanks for responding.

    I'm using relative urls. The browser doesn't have any trouble getting it. To give you a better
    picture of what I'm dealing with, here's what I have:

    1.) the root directory contains a default.aspx page, css file, and an xslt file that thats used by
    the default.aspx page and a page in the subdirectory

    2.) a subdirectory named "Foo" that contains a default.aspx page.

    The xslt file creates the html output I want. Inside the xslt file I make use of the css file.

    When it comes to the xslt file, ASP.NET gives me a System.IO.FileNotFoundException. It states that
    it cannont find the xslt file in the subdirectory. I took that to mean that the xslt file must also
    exist in the subdirectory.

    I've checked to make sure that I'm doing everything as I should but nothing seems to work.

    Thanks anyway,
    Roshawn

    Peter Rilling wrote:
    > Is the browser having trouble getting it, or some of your server code? How
    > are you trying to interact with it? Are you using relative or absolute
    > URLs? Is you are trying to do this on the server, are you accessing the
    > correct physical folder?
    >
    > "Roshawn Dawson" <> wrote in message
    > news:uOV$z$$...
    >
    >>Hi,
    >>
    >>I have an xslt file located in the root directory. It is used by an aspx
    >>pages in both the root directory and a subdirectory. But for some strange
    >>reason, the aspx page in the subdirectory can neither locate the xslt file
    >>or the css file needed to get the desired results.
    >>
    >>What's the problem? Can anyone help me?
    >>
    >>Thanks,
    >>Roshawn

    >
    >
    >
    Roshawn Dawson, Nov 3, 2005
    #3
  4. Can you post some small snippet what you are trying to do.
    Patrick

    "Roshawn Dawson" <> wrote in message
    news:...
    > Hi Peter and thanks for responding.
    >
    > I'm using relative urls. The browser doesn't have any trouble getting it.

    To give you a better
    > picture of what I'm dealing with, here's what I have:
    >
    > 1.) the root directory contains a default.aspx page, css file, and an xslt

    file that thats used by
    > the default.aspx page and a page in the subdirectory
    >
    > 2.) a subdirectory named "Foo" that contains a default.aspx page.
    >
    > The xslt file creates the html output I want. Inside the xslt file I make

    use of the css file.
    >
    > When it comes to the xslt file, ASP.NET gives me a

    System.IO.FileNotFoundException. It states that
    > it cannont find the xslt file in the subdirectory. I took that to mean

    that the xslt file must also
    > exist in the subdirectory.
    >
    > I've checked to make sure that I'm doing everything as I should but

    nothing seems to work.
    >
    > Thanks anyway,
    > Roshawn
    >
    > Peter Rilling wrote:
    > > Is the browser having trouble getting it, or some of your server code?

    How
    > > are you trying to interact with it? Are you using relative or absolute
    > > URLs? Is you are trying to do this on the server, are you accessing the
    > > correct physical folder?
    > >
    > > "Roshawn Dawson" <> wrote in message
    > > news:uOV$z$$...
    > >
    > >>Hi,
    > >>
    > >>I have an xslt file located in the root directory. It is used by an

    aspx
    > >>pages in both the root directory and a subdirectory. But for some

    strange
    > >>reason, the aspx page in the subdirectory can neither locate the xslt

    file
    > >>or the css file needed to get the desired results.
    > >>
    > >>What's the problem? Can anyone help me?
    > >>
    > >>Thanks,
    > >>Roshawn

    > >
    > >
    > >
    Patrick.O.Ige, Nov 3, 2005
    #4
  5. Hi Patrick

    This is the snippet from the default.aspx page in the subdirectory:

    Private Sub GetDetails(ByVal id As String)
    Dim sb as New StringBuilder()
    sb.Append(ConfigurationSettings.AppSettings("ItemLookup") & "&SubscriptionId=" &
    ConfigurationSettings.AppSettings("SubID") & "&Version=" &
    ConfigurationSettings.AppSettings("Version") & "&Operation=ItemLookup&ItemId=" & id &
    "&ResponseGroup=Large")
    Dim tr As XmlTextReader = New XmlTextReader(sb.ToString)
    Dim xDoc As XPathDocument = New XPathDocument(tr)
    Dim htw As HtmlTextWriter = New HtmlTextWriter(Response.Output)
    Dim trans as XslTranform = new XslTransform()
    trans.Load(Server.MapPath(ConfigurationSettings.AppSettings("Myfile"))
    trans.Transform(xDoc, Nothing, htw)
    End Sub

    This procedure is called during the Page_Load event. All I'm doing is attempting to transform the
    xml that I receive from a third party (I actually get data so that is not an issue). Remember that
    the xslt file is used by the default.aspx page in the root directory and the default.aspx page in
    the subdirectory.

    HTH,
    Roshawn

    Patrick.O.Ige wrote:
    > Can you post some small snippet what you are trying to do.
    > Patrick
    >
    > "Roshawn Dawson" <> wrote in message
    > news:...
    >
    >>Hi Peter and thanks for responding.
    >>
    >>I'm using relative urls. The browser doesn't have any trouble getting it.

    >
    > To give you a better
    >
    >>picture of what I'm dealing with, here's what I have:
    >>
    >>1.) the root directory contains a default.aspx page, css file, and an xslt

    >
    > file that thats used by
    >
    >>the default.aspx page and a page in the subdirectory
    >>
    >>2.) a subdirectory named "Foo" that contains a default.aspx page.
    >>
    >>The xslt file creates the html output I want. Inside the xslt file I make

    >
    > use of the css file.
    >
    >>When it comes to the xslt file, ASP.NET gives me a

    >
    > System.IO.FileNotFoundException. It states that
    >
    >>it cannont find the xslt file in the subdirectory. I took that to mean

    >
    > that the xslt file must also
    >
    >>exist in the subdirectory.
    >>
    >>I've checked to make sure that I'm doing everything as I should but

    >
    > nothing seems to work.
    >
    >>Thanks anyway,
    >>Roshawn
    >>
    >>Peter Rilling wrote:
    >>
    >>>Is the browser having trouble getting it, or some of your server code?

    >
    > How
    >
    >>>are you trying to interact with it? Are you using relative or absolute
    >>>URLs? Is you are trying to do this on the server, are you accessing the
    >>>correct physical folder?
    >>>
    >>>"Roshawn Dawson" <> wrote in message
    >>>news:uOV$z$$...
    >>>
    >>>
    >>>>Hi,
    >>>>
    >>>>I have an xslt file located in the root directory. It is used by an

    >
    > aspx
    >
    >>>>pages in both the root directory and a subdirectory. But for some

    >
    > strange
    >
    >>>>reason, the aspx page in the subdirectory can neither locate the xslt

    >
    > file
    >
    >>>>or the css file needed to get the desired results.
    >>>>
    >>>>What's the problem? Can anyone help me?
    >>>>
    >>>>Thanks,
    >>>>Roshawn
    >>>
    >>>
    >>>

    >
    >
    Roshawn Dawson, Nov 3, 2005
    #5
  6. Roshawn Dawson

    Jevon Guest

    What's the value of ConfigurationSettings.AppSettings("Myfile") ?

    Jevon


    "Roshawn Dawson" <> wrote in message
    news:...
    > Hi Patrick
    >
    > This is the snippet from the default.aspx page in the subdirectory:
    >
    > Private Sub GetDetails(ByVal id As String)
    > Dim sb as New StringBuilder()
    > sb.Append(ConfigurationSettings.AppSettings("ItemLookup") &
    > "&SubscriptionId=" & ConfigurationSettings.AppSettings("SubID") &
    > "&Version=" & ConfigurationSettings.AppSettings("Version") &
    > "&Operation=ItemLookup&ItemId=" & id & "&ResponseGroup=Large")
    > Dim tr As XmlTextReader = New XmlTextReader(sb.ToString)
    > Dim xDoc As XPathDocument = New XPathDocument(tr)
    > Dim htw As HtmlTextWriter = New HtmlTextWriter(Response.Output)
    > Dim trans as XslTranform = new XslTransform()
    > trans.Load(Server.MapPath(ConfigurationSettings.AppSettings("Myfile"))
    > trans.Transform(xDoc, Nothing, htw)
    > End Sub
    >
    > This procedure is called during the Page_Load event. All I'm doing is
    > attempting to transform the xml that I receive from a third party (I
    > actually get data so that is not an issue). Remember that the xslt file
    > is used by the default.aspx page in the root directory and the
    > default.aspx page in the subdirectory.
    >
    > HTH,
    > Roshawn
    >
    > Patrick.O.Ige wrote:
    >> Can you post some small snippet what you are trying to do.
    >> Patrick
    >>
    >> "Roshawn Dawson" <> wrote in message
    >> news:...
    >>
    >>>Hi Peter and thanks for responding.
    >>>
    >>>I'm using relative urls. The browser doesn't have any trouble getting
    >>>it.

    >>
    >> To give you a better
    >>
    >>>picture of what I'm dealing with, here's what I have:
    >>>
    >>>1.) the root directory contains a default.aspx page, css file, and an
    >>>xslt

    >>
    >> file that thats used by
    >>
    >>>the default.aspx page and a page in the subdirectory
    >>>
    >>>2.) a subdirectory named "Foo" that contains a default.aspx page.
    >>>
    >>>The xslt file creates the html output I want. Inside the xslt file I
    >>>make

    >>
    >> use of the css file.
    >>
    >>>When it comes to the xslt file, ASP.NET gives me a

    >>
    >> System.IO.FileNotFoundException. It states that
    >>
    >>>it cannont find the xslt file in the subdirectory. I took that to mean

    >>
    >> that the xslt file must also
    >>
    >>>exist in the subdirectory.
    >>>
    >>>I've checked to make sure that I'm doing everything as I should but

    >>
    >> nothing seems to work.
    >>
    >>>Thanks anyway,
    >>>Roshawn
    >>>
    >>>Peter Rilling wrote:
    >>>
    >>>>Is the browser having trouble getting it, or some of your server code?

    >>
    >> How
    >>
    >>>>are you trying to interact with it? Are you using relative or absolute
    >>>>URLs? Is you are trying to do this on the server, are you accessing the
    >>>>correct physical folder?
    >>>>
    >>>>"Roshawn Dawson" <> wrote in message
    >>>>news:uOV$z$$...
    >>>>
    >>>>
    >>>>>Hi,
    >>>>>
    >>>>>I have an xslt file located in the root directory. It is used by an

    >>
    >> aspx
    >>
    >>>>>pages in both the root directory and a subdirectory. But for some

    >>
    >> strange
    >>
    >>>>>reason, the aspx page in the subdirectory can neither locate the xslt

    >>
    >> file
    >>
    >>>>>or the css file needed to get the desired results.
    >>>>>
    >>>>>What's the problem? Can anyone help me?
    >>>>>
    >>>>>Thanks,
    >>>>>Roshawn
    >>>>
    >>>>
    >>>>

    >>
    Jevon, Nov 3, 2005
    #6
  7. Hi Jevon,

    It's "Myfile.xslt"

    HTH,
    Roshawn

    Jevon wrote:
    > What's the value of ConfigurationSettings.AppSettings("Myfile") ?
    >
    > Jevon
    >
    >
    > "Roshawn Dawson" <> wrote in message
    > news:...
    >
    >>Hi Patrick
    >>
    >>This is the snippet from the default.aspx page in the subdirectory:
    >>
    >>Private Sub GetDetails(ByVal id As String)
    >> Dim sb as New StringBuilder()
    >> sb.Append(ConfigurationSettings.AppSettings("ItemLookup") &
    >>"&SubscriptionId=" & ConfigurationSettings.AppSettings("SubID") &
    >>"&Version=" & ConfigurationSettings.AppSettings("Version") &
    >>"&Operation=ItemLookup&ItemId=" & id & "&ResponseGroup=Large")
    >> Dim tr As XmlTextReader = New XmlTextReader(sb.ToString)
    >> Dim xDoc As XPathDocument = New XPathDocument(tr)
    >> Dim htw As HtmlTextWriter = New HtmlTextWriter(Response.Output)
    >> Dim trans as XslTranform = new XslTransform()
    >> trans.Load(Server.MapPath(ConfigurationSettings.AppSettings("Myfile"))
    >> trans.Transform(xDoc, Nothing, htw)
    >>End Sub
    >>
    >>This procedure is called during the Page_Load event. All I'm doing is
    >>attempting to transform the xml that I receive from a third party (I
    >>actually get data so that is not an issue). Remember that the xslt file
    >>is used by the default.aspx page in the root directory and the
    >>default.aspx page in the subdirectory.
    >>
    >>HTH,
    >>Roshawn
    >>
    >>Patrick.O.Ige wrote:
    >>
    >>>Can you post some small snippet what you are trying to do.
    >>>Patrick
    >>>
    >>>"Roshawn Dawson" <> wrote in message
    >>>news:...
    >>>
    >>>
    >>>>Hi Peter and thanks for responding.
    >>>>
    >>>>I'm using relative urls. The browser doesn't have any trouble getting
    >>>>it.
    >>>
    >>>To give you a better
    >>>
    >>>
    >>>>picture of what I'm dealing with, here's what I have:
    >>>>
    >>>>1.) the root directory contains a default.aspx page, css file, and an
    >>>>xslt
    >>>
    >>>file that thats used by
    >>>
    >>>
    >>>>the default.aspx page and a page in the subdirectory
    >>>>
    >>>>2.) a subdirectory named "Foo" that contains a default.aspx page.
    >>>>
    >>>>The xslt file creates the html output I want. Inside the xslt file I
    >>>>make
    >>>
    >>>use of the css file.
    >>>
    >>>
    >>>>When it comes to the xslt file, ASP.NET gives me a
    >>>
    >>>System.IO.FileNotFoundException. It states that
    >>>
    >>>
    >>>>it cannont find the xslt file in the subdirectory. I took that to mean
    >>>
    >>>that the xslt file must also
    >>>
    >>>
    >>>>exist in the subdirectory.
    >>>>
    >>>>I've checked to make sure that I'm doing everything as I should but
    >>>
    >>>nothing seems to work.
    >>>
    >>>
    >>>>Thanks anyway,
    >>>>Roshawn
    >>>>
    >>>>Peter Rilling wrote:
    >>>>
    >>>>
    >>>>>Is the browser having trouble getting it, or some of your server code?
    >>>
    >>>How
    >>>
    >>>
    >>>>>are you trying to interact with it? Are you using relative or absolute
    >>>>>URLs? Is you are trying to do this on the server, are you accessing the
    >>>>>correct physical folder?
    >>>>>
    >>>>>"Roshawn Dawson" <> wrote in message
    >>>>>news:uOV$z$$...
    >>>>>
    >>>>>
    >>>>>
    >>>>>>Hi,
    >>>>>>
    >>>>>>I have an xslt file located in the root directory. It is used by an
    >>>
    >>>aspx
    >>>
    >>>
    >>>>>>pages in both the root directory and a subdirectory. But for some
    >>>
    >>>strange
    >>>
    >>>
    >>>>>>reason, the aspx page in the subdirectory can neither locate the xslt
    >>>
    >>>file
    >>>
    >>>
    >>>>>>or the css file needed to get the desired results.
    >>>>>>
    >>>>>>What's the problem? Can anyone help me?
    >>>>>>
    >>>>>>Thanks,
    >>>>>>Roshawn
    >>>>>
    >>>>>
    >>>>>

    >
    Roshawn Dawson, Nov 4, 2005
    #7
  8. Roshawn Dawson

    Jevon Guest

    Hi Roshawn,

    From that it looks like you're either misunderstanding how virtual
    directories work, how Server.MapPath works, or both :)

    By having "Myfile.xslt" in that variable in the sub directory, for example
    /foo/, when you run Server.MapPath on it in /foo/default.aspx, you map to
    /foo/Myfile.xslt, not /Myfile.xslt, as you seem to expect. Server.MapPath
    works from the current path, not the root. I think, to get everything
    working correctly, you just need to change the "Myfile" setting to
    "../Myfile.xslt" - but only in the sub directory, not the root.

    I don't know how the CSS is linked/how XLST tranformation actually works,
    you might need to do something similar with the path to the CSS file as
    well.

    Jevon


    "Roshawn Dawson" <> wrote in message
    news:...
    > Hi Jevon,
    >
    > It's "Myfile.xslt"
    >
    > HTH,
    > Roshawn
    >
    > Jevon wrote:
    >> What's the value of ConfigurationSettings.AppSettings("Myfile") ?
    >>
    >> Jevon
    >>
    >>
    >> "Roshawn Dawson" <> wrote in message
    >> news:...
    >>
    >>>Hi Patrick
    >>>
    >>>This is the snippet from the default.aspx page in the subdirectory:
    >>>
    >>>Private Sub GetDetails(ByVal id As String)
    >>> Dim sb as New StringBuilder()
    >>> sb.Append(ConfigurationSettings.AppSettings("ItemLookup") &
    >>> "&SubscriptionId=" & ConfigurationSettings.AppSettings("SubID") &
    >>> "&Version=" & ConfigurationSettings.AppSettings("Version") &
    >>> "&Operation=ItemLookup&ItemId=" & id & "&ResponseGroup=Large")
    >>> Dim tr As XmlTextReader = New XmlTextReader(sb.ToString)
    >>> Dim xDoc As XPathDocument = New XPathDocument(tr)
    >>> Dim htw As HtmlTextWriter = New HtmlTextWriter(Response.Output)
    >>> Dim trans as XslTranform = new XslTransform()
    >>> trans.Load(Server.MapPath(ConfigurationSettings.AppSettings("Myfile"))
    >>> trans.Transform(xDoc, Nothing, htw)
    >>>End Sub
    >>>
    >>>This procedure is called during the Page_Load event. All I'm doing is
    >>>attempting to transform the xml that I receive from a third party (I
    >>>actually get data so that is not an issue). Remember that the xslt file
    >>>is used by the default.aspx page in the root directory and the
    >>>default.aspx page in the subdirectory.
    >>>
    >>>HTH,
    >>>Roshawn
    >>>
    >>>Patrick.O.Ige wrote:
    >>>
    >>>>Can you post some small snippet what you are trying to do.
    >>>>Patrick
    >>>>
    >>>>"Roshawn Dawson" <> wrote in message
    >>>>news:...
    >>>>
    >>>>
    >>>>>Hi Peter and thanks for responding.
    >>>>>
    >>>>>I'm using relative urls. The browser doesn't have any trouble getting
    >>>>>it.
    >>>>
    >>>>To give you a better
    >>>>
    >>>>
    >>>>>picture of what I'm dealing with, here's what I have:
    >>>>>
    >>>>>1.) the root directory contains a default.aspx page, css file, and an
    >>>>>xslt
    >>>>
    >>>>file that thats used by
    >>>>
    >>>>
    >>>>>the default.aspx page and a page in the subdirectory
    >>>>>
    >>>>>2.) a subdirectory named "Foo" that contains a default.aspx page.
    >>>>>
    >>>>>The xslt file creates the html output I want. Inside the xslt file I
    >>>>>make
    >>>>
    >>>>use of the css file.
    >>>>
    >>>>
    >>>>>When it comes to the xslt file, ASP.NET gives me a
    >>>>
    >>>>System.IO.FileNotFoundException. It states that
    >>>>
    >>>>
    >>>>>it cannont find the xslt file in the subdirectory. I took that to mean
    >>>>
    >>>>that the xslt file must also
    >>>>
    >>>>
    >>>>>exist in the subdirectory.
    >>>>>
    >>>>>I've checked to make sure that I'm doing everything as I should but
    >>>>
    >>>>nothing seems to work.
    >>>>
    >>>>
    >>>>>Thanks anyway,
    >>>>>Roshawn
    >>>>>
    >>>>>Peter Rilling wrote:
    >>>>>
    >>>>>
    >>>>>>Is the browser having trouble getting it, or some of your server code?
    >>>>
    >>>>How
    >>>>
    >>>>
    >>>>>>are you trying to interact with it? Are you using relative or
    >>>>>>absolute
    >>>>>>URLs? Is you are trying to do this on the server, are you accessing
    >>>>>>the
    >>>>>>correct physical folder?
    >>>>>>
    >>>>>>"Roshawn Dawson" <> wrote in message
    >>>>>>news:uOV$z$$...
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>>Hi,
    >>>>>>>
    >>>>>>>I have an xslt file located in the root directory. It is used by an
    >>>>
    >>>>aspx
    >>>>
    >>>>
    >>>>>>>pages in both the root directory and a subdirectory. But for some
    >>>>
    >>>>strange
    >>>>
    >>>>
    >>>>>>>reason, the aspx page in the subdirectory can neither locate the xslt
    >>>>
    >>>>file
    >>>>
    >>>>
    >>>>>>>or the css file needed to get the desired results.
    >>>>>>>
    >>>>>>>What's the problem? Can anyone help me?
    >>>>>>>
    >>>>>>>Thanks,
    >>>>>>>Roshawn
    >>>>>>
    >>>>>>
    >>>>>>

    >>
    Jevon, Nov 4, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chad A. Beckner
    Replies:
    2
    Views:
    552
    Chad A. Beckner
    Jun 18, 2004
  2. Chad A. Beckner

    Need Help ASAP!

    Chad A. Beckner, Jun 25, 2004, in forum: ASP .Net
    Replies:
    14
    Views:
    715
    Roger Helliwell
    Jul 5, 2004
  3. IC Browsers
    Replies:
    1
    Views:
    328
    Roedy Green
    May 10, 2004
  4. Danno
    Replies:
    5
    Views:
    320
    Patricia Shanahan
    Jun 14, 2006
  5. Roshawn

    Compression - need help asap!!!

    Roshawn, Jan 11, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    303
    Roshawn
    Jan 11, 2007
Loading...

Share This Page