Accessing IIS site folder from Managed windows service
I have a managed service that receives files from users and I process the files and create audio files and xml files. I want to put the generated files from my service to a directory in Webserver (IIS) so that I can generate a link and users could download the generated files from web. Can anyone tell me how can I acheive it ( generating link is where I am stuck ). I am not sure how can I get the directory of the IIS ( there are some examples on the web to get the IIS directory... ). My question is it a good practice to get the IIS directory and copy over the generated file to a predetermined directory in a IIS site folder and generate link to that folder and send the links to the user ? can anyone please tell me a best practice to do this ? Will there be a security issue if I access a IIS site folder from windows service problem ? ( for example, Access violation ) ?
Kin开发者_StackOverflowd regards
Technically speaking - you just need FSO, in order to gain access to file system on server. File Scripting Object FSO. If you use JScript - then this will give folder postion: Server.MapPath("\database\file.txt"); and PHP: dirname(FILE) . '\database\x.html'; And you need to make the ISS folders availble using Sharing and Security on folder Mike
精彩评论