DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
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:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us