|
|
|
start date: Mon, 23 Jul 2007 10:30:51 -0700,
posted on: microsoft.public.dotnet.framework.aspnet.webcontrols
back
| Thread Index |
|
1
unknown
|
|
2
unknown
|
|
3
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
|
Could not find file Error
Can anyone tell me why the below code returns error?
Exception Details: System.IO.FileNotFoundException: Could not find
file
Dim strLFolder As String = "c:\Temp\F Files"
Dim intClientID As Integer = 1221
Dim XMLStr As String = strLFolder & "\" &
intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml"
Dim dsPubs As New DataSet
dsPubs.ReadXml(XMLStr)
where as the below code is working
Dim dsPubs As New DataSet
dsPubs.ReadXml("c:\temp\F Files\1221\Lk
\HeaderTrailerDeltails_data.xml")
Thanks
Date:Mon, 23 Jul 2007 10:30:51 -0700
Author:
|
Re: Could not find file Error
On Jul 23, 1:30 pm, Amritha.Da...@gmail.com wrote:
> Can anyone tell me why the below code returns error?
> Exception Details: System.IO.FileNotFoundException: Could not find
> file
>
> Dim strLFolder As String = "c:\Temp\F Files"
> Dim intClientID As Integer = 1221
>
> Dim XMLStr As String = strLFolder & "\" &
> intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml"
> Dim dsPubs As New DataSet
> dsPubs.ReadXml(XMLStr)
>
> where as the below code is working
>
> Dim dsPubs As New DataSet
> dsPubs.ReadXml("c:\temp\F Files\1221\Lk
> \HeaderTrailerDeltails_data.xml")
>
> Thanks
Any response please?
Date:Mon, 23 Jul 2007 11:57:20 -0700
Author:
|
Re: Could not find file Error
I bet your problem is with permissions.
You may need to adjust the security on that folder to allow the ASPNET (or
NetworkService) user the necessary permissions.
Alternately you could use impersonation to have ASP.NET run under a
different user account:
<!-- Web.config file. -->
<identity impersonate="true" userName="Redmond\BillG" password="Melinda"/>
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
wrote in message
news:1185211851.837296.205820@22g2000hsm.googlegroups.com...
> Can anyone tell me why the below code returns error?
> Exception Details: System.IO.FileNotFoundException: Could not find
> file
>
> Dim strLFolder As String = "c:\Temp\F Files"
> Dim intClientID As Integer = 1221
>
> Dim XMLStr As String = strLFolder & "\" &
> intClientID.ToString.Trim & "\Lk\HeaderTrailerDeltails_data.xml"
> Dim dsPubs As New DataSet
> dsPubs.ReadXml(XMLStr)
>
> where as the below code is working
>
> Dim dsPubs As New DataSet
> dsPubs.ReadXml("c:\temp\F Files\1221\Lk
> \HeaderTrailerDeltails_data.xml")
>
>
> Thanks
>
Date:Wed, 25 Jul 2007 07:12:30 -0700
Author:
|
|
|