StreamWriter error

Joined
Dec 17, 2004
Messages
22
Location
Phoenix
Programming Experience
3-5
hey ya'll, having a little trouble here. I want to save a text file to a mapped network drive (Y) in asp.net. This works fine and dandy in regular vb.net but when I try the same path in asp.net it says
Could not find a part of the path "Y:\WebTExports\FollowUpAlerts\Mailings.txt".
the vb and the asp are running on the same server

VB.NET:
[size=2]objWriter = [/size][size=2][color=#0000ff]New[/color][/size][size=2] IO.StreamWriter([/size][size=2][color=#0000ff]New[/color][/size][size=2] System.IO.FileStream("Y:\WebTExports\FollowUpAlerts\Mailings.txt", IO.FileMode.OpenOrCreate), System.Text.Encoding.ASCII)
 
[/size]

any help would be appriciated
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
Use the UNC address. also don't forget to add aspnet user permissions to the folder.

TPM
 
Joined
Dec 17, 2004
Messages
22
Location
Phoenix
Programming Experience
3-5
TPM,
thanks man. Now it's trying to connect, but the permissions don't exist for it (as you predicted). My new question is how would I add permissions for ASPNET on the remote drive? .NET is NOT installed on the machine. Since there is only the users of the remote machine listed in the file permissions. Thanks for your assistance.
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
Hmm, well if you have .net installed on a domain controller you can change the 'location' to the domain and the aspnet user should be there.
 
Joined
Dec 17, 2004
Messages
22
Location
Phoenix
Programming Experience
3-5
I'll see what I can do. Thanks again for the help.
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
Any time mate.

If that doesn't work you'll probably have to mess with credentials.
 
Top Bottom