Last post May 14, 2009 08:48 AM by MeDammit
Mar 25, 2009 03:27 PM|jp2code|LINK
GoDaddy Download Files
Mar 25, 2009 06:08 PM|rtpHarry|LINK
Hi, This does sound strange.
I am afraid I dont have much (any) experience with GoDaddy but you should be able to link to files.
If you type the address in directly can you do it?
Have you tried it with a normal file type such as a txt file? Perhaps the server will only give things out that it has a mime type setup for....
If you have aspx hosting then you could set up a httphandler file handler like this:
Mar 25, 2009 06:37 PM|HostingASPNet|LINK
What about if you create just .html file - Default.html - is it works?
Mar 25, 2009 10:04 PM|jp2code|LINK
The direct link using an HTML page does not work either.
Here's my link:
If I attempt to access the ISO file directly, you'll see a beautiful "page not found" error.
See for yourself here:
Mar 26, 2009 05:20 AM|yasserzaid|LINK
try this example to send email using GoDaddy
Protected Sub cmdSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSend.Click
Dim objMail As New System.Net.Mail.MailMessage
.From = New MailAddress(from.Text)
.Subject = subject.Text
.Body = body.Text
Dim client As SmtpClient = New SmtpClient("relay-hosting.secureserver.net")
client.UseDefaultCredentials = True
Hope this helps
Mar 26, 2009 09:09 AM|jp2code|LINK
May 12, 2009 03:00 PM|MeDammit|LINK
Well I don't know if you want a straight asp workaround, but this file has been super reliable for me.
<%Response.Buffer = True%>
On Error Resume Next
strPath = CStr(Request.QueryString("file"))
'-- do some basic error checking for the QueryString
If strPath = "" Then
Response.Write("No file specified.")
ElseIf InStr(strPath, "..") > 0 Then
Response.Write("Illegal folder location.")
ElseIf Len(strPath) > 1024 Then
Response.Write("Folder path too long.")
Private Sub DownloadFile(file)
'-- set absolute file location
strAbsFile = Server.MapPath(file)
'-- create FSO object to check if file exists and get properties
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'-- check to see if the file exists
If objFSO.FileExists(strAbsFile) Then
Set objFile = objFSO.GetFile(strAbsFile)
'-- first clear the response, and then set the appropriate headers
'-- the filename you give it will be the one that is shown
' to the users by default when they save
Response.AddHeader "Content-Disposition", "attachment; filename=" & objFile.Name
Response.AddHeader "Content-Length", objFile.Size
Response.ContentType = "application/octet-stream"
Set objStream = Server.CreateObject("ADODB.Stream")
'-- set as binary
objStream.Type = 1
Response.CharSet = "UTF-8"
'-- load into the stream the file
'-- send the stream in the response
Set objStream = Nothing
Set objFile = Nothing
Set objFSO = Nothing
This will serve any file you hand it via querystring (example: "www.example.com/DownloadFile.asp?File=Somefile.zip") directly into the response.output stream
Hope that works for you
(The only reason I posted here is because I use Godaddy and hate it, they have so many barriers)
May 12, 2009 03:53 PM|jp2code|LINK
Response.ContentType = "application/octect-stream"
May 12, 2009 05:28 PM|viscious|LINK
That is a lot of work to send a single file to a single person. Next time you have an issue with the server not being configured to send the correct mime type, zip the file up and link to the zip file.
May 12, 2009 05:49 PM|jp2code|LINK
May 13, 2009 03:42 AM|you_rock|LINK
you can use System.Net.Mail interface as well....the following is the code snippet:
//import the Mail Interface
//create the mail message
MailMessage mail = new MailMessage();
//set the addresses
mail.From = new MailAddress(txtEmail.Text.Trim());
//set the content
mail.Subject = txtSubject.Text.ToString();
mail.Body = txtQuestion.Text.ToString();
//send the message
SmtpClient smtp = new SmtpClient("mail.yourDomain.com");
smtp.Credentials = new NetworkCredential("yourAccount@yourDomain.com",
Hope this helps
May 13, 2009 04:05 AM|rtpHarry|LINK
For an asp.net solution to the downloader problem you should look into building a httphandler file handler:
It does pretty much the same as that classic asp code that was posted earlier.
On the flip side if you just want to share the file then I would use skydrive to host your file:
May 14, 2009 08:48 AM|MeDammit|LINK
Glad it worked for you. I have a site that uses a lot of .NET pages, but when I was first learning it, I didn't want to have to rewrite that page or build a handler. It's a nice piece of code that you just save as a file and works..
As for the side note, there should be a button when your composing a reply or message in here. It gives a little modal pop up that allows
you to type in code.