Dim FILENAME As String = server.MapPath("http://appl-08/TB/Test/test.txt")
Dim objStreamWriter As StreamWriter
objStreamWriter = File.CreateText(FILENAME )
objStreamWriter.WriteLine("Note form user")
objStreamWriter.WriteLine(txttext.Text)
I have also tried just mapPath("address"), mapPath ("\\appl-08\wwwroot\TB\test\test.txt")
This is the error I always get!!
Invalid path for MapPath 'http://appl-08/TB/Test/test.txt'. A virtual path is expected.
ANyone got any suggestions.Server.MapPath("TB/Test/test.txt") - assuming the file your working on is in the "appl-08" server root directory directory
If it's in the TB directory then "Test/test.txt"
this is the problem I am working on server appl-07 I need to store the file on appl-08
In which case i would imagine that you have a security issue anyway as you will need to give the ASP account on appl-07 permission to access the folder on appl-08
and then it should be somethign like CreateText("//appl-08/test/test.txt")
I think thats it anyhow i've tried to recreate it on our corporate network to find out for sure but our security settings are too strict for me to do that. It does however find the folder - it just doesn't give me permission to do anything with it.
Ok I can get it to work going to our sql server but not our .net server.
On both servers I created a folder gave it the same permmisions and on the .net server I get the error that I am using the wrong user name or password.
Is there some program that can't be installed or has to be installed for it to work.
perhaps using the .Net account of one machine to access another machine with it's own .Net account is conflicting it?
I dont' know to be honest - Hopefully someone else can help on that one
0 comments:
Post a Comment