Results 1 to 10 of 10

Thread: [RESOLVED] C# Web Server

  1. #1

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Resolved [RESOLVED] C# Web Server

    Hello all,

    Just need an advice on something, I am about to build a web page to be used solely for viewing pdfs.

    Here is our current scenario, we have 2 server's, say call it server A and server B. Server B is the server where all pdf's will be generated and server A will be used to view them. Due to our current ISO procedures, server A isn't allowed to be directly connected to server B, but we can have a web server that will allows users from server A to download these pdfs. The problem with this is server A is poorly networked so whenever somebody tries to download and open say a pdf, the whole network running on server A gets affected. Rather than improve the network, they decided to change the whole process, so instead of downloading pdfs and opening them on server A. The web server will be utilised to store and open these files to lessen the load of serverA.

    My task is to program a web page that will allow server A users to view pdfs from server B. I'm asking what is the best way of doing this?

    At the moment, the manager want me to code it so that say in server B we will have a folder called Proofs and within it we can have subfolders where the pdfs will be placed. The web server will then show a directory listing of the Proofs folder and then allow users to view straight from it.

    I need to figure out, how I'm going to do the directory listing and what is the best way of allowing the users to view the pdf..would pdfsharp be sufficient? or are there better methods?

    Thanks for your time on this matter and if any of it don't make any sense I'll try my best to expand on it.

    Greyskull
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: C# Web Server

    Hello,

    By default, directory listing on a virtual directory in IIS is turned off, but there is nothing to stop you switching it on. This would then give you rudimentary browsing of the folders within that virtual directory.

    On top of this, most modern browsers already handle the opening of PDF files, so actually all you need to do is click on a link to a PDF and it will already open in the browser.

    Gary

  3. #3

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: C# Web Server

    Thanks for the info Gary, will give this a whirl when I come to implementing it
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: C# Web Server

    Sounds like a plan.

    Let me know how you get on.

    Gary

  5. #5

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: C# Web Server

    Hmm..I was actually misinformed as what is needed..they wanted much more than a directory listing, they wanted to have the following features as well:

    1. Allow users to view reports in pdf or csv format.
    2. Allow users to view pdf proofs
    3. Zipping of reports and / or proofs with capability to add password if needed.
    4. Auto upload to FTP / SFTP with user choosing which 'client' it will go to and what folder it needs to go to.
    5. Ability to search pdfs through filename.
    6. Ability to email the selected pdfs / csv and allowing user to input who to email it to.
    7. Ability to delete certain files
    8. Authenticate users based on their Windows log-in information

    So they want a nice API to go along with it, it seems....

    Viewing csv isn't going to be a problem as I can use datatables to load it onto datagrids. As for zipping files, I guess I can still use Sharpzip to do this task. The rest are all prretty much normal things..the only thing I'm not 100% sure of is the functionality to upload to an SFTP / FTP? Was thinking of having like a browse button here, once they have selected which 'client' to use..do you think that's feasible?

    Also, for the directory listing, would the method DirectoryInfo / FileInfo still work on ASP/C# coding?

    I'm more of a windows programmer than a web programmer, so any help is muchly appreciated.

    Thanks
    Mark
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  6. #6

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: C# Web Server

    All solved Managed to implement something now that fully works.
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  7. #7
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] C# Web Server

    Are we allowed to know what the solution was?

    Gary

  8. #8

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: [RESOLVED] C# Web Server

    Sure, once I've tidied it up a bit...I shall upload the solution here ^_^ Then I shall welcome any comments on it, be it good or bad..hehe
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

  9. #9

  10. #10

    Thread Starter
    Hyperactive Member Greyskull's Avatar
    Join Date
    Dec 2003
    Location
    somewhere in England
    Posts
    382

    Re: [RESOLVED] C# Web Server

    Here is the file I have kind of created as test for all of this. I've basically decided to use a User_Control file so it is easily re-useable on other pages if needed.

    This is a very basic page with no CSS applied yet so it will look plain.

    If it will be useful in the future, I can put this in a library here somewhere if there is any for ASP

    Let me know what ya think of it

    Mark
    Attached Files Attached Files
    Please go to the Thread Tools menu and click Mark Thread Resolved when your post is answered
    If someone helped you today then please consider rating their post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width