Reputation: 22084
I'm working on an Intranet web application on a server somewhere, and I wish that application to generate files so I can download them to my local PC.
I connect to this application using a URL in the browser like this...
and I can get to the software using an ftp connection...
where I can see a directory structure like this...
myapp.ourplace.com
aspnet_client
bin
files
images
UserControls
default.aspx
myapp.bin
.
.
.
I need to know how the C# application can locate the directory files
in the above structure in order to write files into it. I've tried Environment.CurrentDirectory() + "\\files"
but that doesn't appear to be the same place; no files appear in it at any rate.
Does anyone know how to do this?
Upvotes: 0
Views: 223
Reputation: 740
There are a couple different ways
AppDomain.CurrentDomain.BaseDirectory + @"\files\"
or
Server.MapPath(@"\files\")
Upvotes: 3