Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How t o open a socket in ASP.Net

How t o open a socket in ASP.Net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorialquestion
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dwark106
    wrote on last edited by
    #1

    Hi EveryBody, I am new in ASP.net. I have a question on ASP.net in C# , How to open a socket in ASPDOT to communicate with other PC, The question is if I go to browser, type "http:\\computername" then it will retrieve all the data from "computername" and give it to me(on client machine). Thanks a lot

    M 1 Reply Last reply
    0
    • D dwark106

      Hi EveryBody, I am new in ASP.net. I have a question on ASP.net in C# , How to open a socket in ASPDOT to communicate with other PC, The question is if I go to browser, type "http:\\computername" then it will retrieve all the data from "computername" and give it to me(on client machine). Thanks a lot

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      ASP.NET is a server-side technology for generating web markup. It sounds like you want to effect the transfer of a number of files, initiated at the client. You may want to just use FTP instead for that sort of thing. If you do want more information about socket support in the .NET framework, investigate the System.Net.Sockets[^] namespace.

      D 1 Reply Last reply
      0
      • M Mike Ellison

        ASP.NET is a server-side technology for generating web markup. It sounds like you want to effect the transfer of a number of files, initiated at the client. You may want to just use FTP instead for that sort of thing. If you do want more information about socket support in the .NET framework, investigate the System.Net.Sockets[^] namespace.

        D Offline
        D Offline
        dwark106
        wrote on last edited by
        #3

        Thanks for replying me. Now I am exploring on FTP. Can u please send me ASP.NET code on tranfering the file(FTP)? Thanks

        M 1 Reply Last reply
        0
        • D dwark106

          Thanks for replying me. Now I am exploring on FTP. Can u please send me ASP.NET code on tranfering the file(FTP)? Thanks

          M Offline
          M Offline
          Mike Ellison
          wrote on last edited by
          #4

          I wonder if you are confused by the purpose of ASP.NET. Your earlier message indicated that you wanted to sit at a client machine and download files from a server. You wouldn't use ASP.NET for this. You would probably use an FTP client, and the server would be setup as an FTP server. You can use Google for a full description of the FTP protocol, and to locate client FTP programs. If you're on a Windows machine, you can use the builtin console FTP.EXE application. Now, if you had a web application built in ASP.NET and needed (for some reason) the web application to contact some other server to download or upload files (again, the key here is that this is server-side processing, not client-side), then you would be looking at implementing FTP functionality, either yourself through a sockets interface, or (more likely) by finding and using a third-party FTP component made for the .NET platform. There are a bunch of them out there (commercial and free), and Google will help you find them. Try a search for "ftp .net" and you'll find a bunch. If you do want to write your own FTP support, you could look at this article, Creating an FTP Client in .NET[^] for a starting point.

          D 1 Reply Last reply
          0
          • M Mike Ellison

            I wonder if you are confused by the purpose of ASP.NET. Your earlier message indicated that you wanted to sit at a client machine and download files from a server. You wouldn't use ASP.NET for this. You would probably use an FTP client, and the server would be setup as an FTP server. You can use Google for a full description of the FTP protocol, and to locate client FTP programs. If you're on a Windows machine, you can use the builtin console FTP.EXE application. Now, if you had a web application built in ASP.NET and needed (for some reason) the web application to contact some other server to download or upload files (again, the key here is that this is server-side processing, not client-side), then you would be looking at implementing FTP functionality, either yourself through a sockets interface, or (more likely) by finding and using a third-party FTP component made for the .NET platform. There are a bunch of them out there (commercial and free), and Google will help you find them. Try a search for "ftp .net" and you'll find a bunch. If you do want to write your own FTP support, you could look at this article, Creating an FTP Client in .NET[^] for a starting point.

            D Offline
            D Offline
            dwark106
            wrote on last edited by
            #5

            Yaah I do agree your point but I donot want to use FTP for transfering the file and downloading a file. I want to do that if I write a code in ASP.Net in C# and it will provide me all the information about other computer(whatever I want) and ASP page display like C:\MyWork\, D:\Songs and so on. As we do in Socket programmming in C#,C++(Open a socket in serverside( bind,listen,accept,send and receive)open a socket in clientside(connect,accept,send and receive) like that. and Using XML for transmitting the "Message". So, If ASP.Net is server-side technology for generating web markup, then there is no need to open the socket. I may be wrong whatever i wrote above. Thanks

            M 1 Reply Last reply
            0
            • D dwark106

              Yaah I do agree your point but I donot want to use FTP for transfering the file and downloading a file. I want to do that if I write a code in ASP.Net in C# and it will provide me all the information about other computer(whatever I want) and ASP page display like C:\MyWork\, D:\Songs and so on. As we do in Socket programmming in C#,C++(Open a socket in serverside( bind,listen,accept,send and receive)open a socket in clientside(connect,accept,send and receive) like that. and Using XML for transmitting the "Message". So, If ASP.Net is server-side technology for generating web markup, then there is no need to open the socket. I may be wrong whatever i wrote above. Thanks

              M Offline
              M Offline
              Mike Ellison
              wrote on last edited by
              #6

              So - is this right - you want a way to manage files on a server from a client browser? If so, read this article, and see if that will help: http://www.codeproject.com/aspnet/WebFileManager.asp[^]

              D 1 Reply Last reply
              0
              • M Mike Ellison

                So - is this right - you want a way to manage files on a server from a client browser? If so, read this article, and see if that will help: http://www.codeproject.com/aspnet/WebFileManager.asp[^]

                D Offline
                D Offline
                dwark106
                wrote on last edited by
                #7

                Yes, Thanks a lot.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups