Hello I'm Can't Find Any way to download Text File From My Free Hosting
Cuz i can download from Direct link Website Like Fileden
But My free Hosting it Say

The remote server returned an error: (403) Forbidden.

How Can I get download file From My Hosting
i use

My.Computer.Network.DownloadFile _
("http://www.fileden.com/files/2009/11/14/2650346/Sunchiro%20CalCulator.rar", _
Application.StartupPath & "/Sunchiro%20CalCulator.rar")

it Work no Error But I must Upload file with my program
I don't know how to upload file to fileden.com cuz it is a website uploading file not a hosting

Dani AI

Generated

Short answer: these are two different problems. correctly asked if this is download or upload — needs both. A 403 on programmatic download usually means the host is refusing non-browser requests (hotlink protection, missing Referer/User‑Agent, required cookies or login, or file permissions). If the file URL works from a browser but fails from code, the server is blocking the request or requires extra headers/authentication.

If the goal is to accept uploads on your host, create an ASP.NET page (Upload.aspx) that accepts multipart/form-data and saves files to a folder the app can write to. Example FileUpload markup and VB.NET code-behind:

<asp:FileUpload ID="fu" runat="server" />
<asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="btnUpload_Click" />
<asp:Label ID="lblMsg" runat="server" />
Protected Sub btnUpload_Click(sender As Object, e As EventArgs)
    If Not fu.HasFile Then
        lblMsg.Text = "No file selected."
        Return
    End If

    Dim allowed = New String() {".txt",".jpg",".png",".zip"}
    Dim ext = IO.Path.GetExtension(fu.FileName).ToLowerInvariant()
    If Not allowed.Contains(ext) Then
        lblMsg.Text = "Type not allowed."
        Return
    End If

    Dim uploads = Server.MapPath("~/uploads")
    If Not IO.Directory.Exists(uploads) Then IO.Directory.CreateDirectory(uploads)
    Dim saveName = IO.Path.Combine(uploads, Guid.NewGuid().ToString() & ext)
    fu.SaveAs(saveName)
    lblMsg.Text = "Uploaded."
End Sub

A simple client-side upload from a VB.NET program uses WebClient.UploadFile:

Using wc As New System.Net.WebClient()
    wc.Headers.Add("User-Agent", "MyUploader/1.0")
    wc.UploadFile("http://yourhost/Upload.aspx", "POST", "C:\path\file.txt")
End Using

If downloads are blocked, add a server-side download handler that streams files with Content-Disposition (so your program hits a Download.aspx URL that always serves the file). Also check web.config limits (httpRuntime maxRequestLength and IIS maxAllowedContentLength), ensure the uploads folder has write permission for the app, validate/scan file contents, store files outside web root or deny execute permissions, and confirm the free host actually allows server-side code and file writes — some free hosts only provide static storage or require FTP/control-panel uploads.

Recommended Answers

All 2 Replies

I'm confused... are you trying to download or upload?

Both. And how To Make Upload.aspx IN Hosting
My download Work With Fileden Only Hosting not work

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.