adamsinline Posted January 19, 2005 Posted January 19, 2005 My fileopen statement runs fine when I'm running the vb.net asp app from my c drive. but when I run the app on a server, openfile does not seem to understand the text of the filepath.txt. filepath = "c:\slic\validation_file.txt" I'm thinking VB is trying to look at the C drive of the server the *.ASPx files sit on, thus not able to pick up the file from my own c drive. Any idea on filepath on c drives? FileOpen(1, FilePath.Text, OpenMode.Input) Quote
kahlua001 Posted January 19, 2005 Posted January 19, 2005 User Server.Mappath, this will return you the physical path of a virtual one. Server.MapPath("testfolder/test.txt") Quote
Administrators PlausiblyDamp Posted January 20, 2005 Administrators Posted January 20, 2005 ASP.Net is a server side technology and cannot just access your local drives, imagine the security implications if any web application could open any of your local files. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
adamsinline Posted January 20, 2005 Author Posted January 20, 2005 ASP.Net is a server side technology and cannot just access your local drives' date=' imagine the security implications if any web application could open any of your local files.[/quote'] I see your point. In general, I'm trying to access a txt file on the users hard drive which the users will be selecting via dialog box. From there I'm trying to get the vb.net asp app to open the file and read through it checking for errors. Do you see any way this can be done, or any third party control that can handle this ? Thanks for your time. Adam Quote
Administrators PlausiblyDamp Posted January 20, 2005 Administrators Posted January 20, 2005 You would have to upload the file to the server and parse it there, there is an HTML Input file control on the toolbox (or similar name) that you could use. If you have a search of these forums you should find some hits. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.