Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Could not find file Error

Reply
Thread Tools

Could not find file Error

 
 
Amritha.Datta@gmail.com
Guest
Posts: n/a
 
      07-23-2007
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

 
Reply With Quote
 
 
 
 
Amritha.Datta@gmail.com
Guest
Posts: n/a
 
      07-23-2007
On Jul 23, 1:30 pm, (E-Mail Removed) 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?

 
Reply With Quote
 
 
 
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      07-25-2007
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


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.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
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
could not find file (.msi,.exe,.tmp) error in building web setupproject! chandan ASP .Net 2 03-12-2008 09:26 AM
Parser Error Message: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified. hifiger2004 ASP .Net Web Controls 1 08-30-2007 04:12 PM
Could not find file Error Amritha.Datta@gmail.com ASP .Net 4 07-25-2007 01:21 PM
Folder creation error: "Could not find a part of the path" error E. Kwong ASP .Net Web Controls 0 11-06-2006 11:20 PM
Error Message: Outlook Express Could Not Be Started Because Msoe.dll Could Not Be Loaded Dutch Treat Computer Support 4 06-21-2004 02:01 PM



Advertisments