Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Reply
godaddy asp.net upload issue verification
Old 05-07-2006, 01:24 PM godaddy asp.net upload issue verification
Junior Talker

Posts: 2
Trades: 0
Hi

I do not seem to be able to get anything to upload through the browser to my godaddy account. I have the deluxe version and I am trying to do it using asp.net 2.0 (which it supports). I have included the code listing i came up with below.

I am using the code from a few different tutorials and my extensive knowledge of how to do this with classic asp. I am not a noob at file uploading and no matter what I try i cannot get it to upload onto my godaddy account.

I believe it to be an issue with them because the code works on my other hosting account in .net and classic asp. Anybody found a way to make it work?

if (fuFileUpload.HasFile == true)
{
string strFileName = System.IO.Path.GetFileName(fuFileUpload.PostedFile.FileName);
string strSaveLocation = Server.MapPath(".") + "\\images\\comicstorage\\" + strFileName;
try
{
fuFileUpload.PostedFile.SaveAs(strSaveLocation);
lblUploadMessage.Text =
"The file was uploaded successfully";
}
catch (Exception ex)
{
lblUploadMessage.Text =
"Error: " + ex.Message;
}
}
else
{
lblUploadMessage.Text =
"Please select a file to upload!";
}

------------------------------
*" ~~ .net rules ~~ " *
~~~~~~~~~
~~~~~~
adamtaa is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-07-2006, 05:04 PM Re: godaddy asp.net upload issue verification
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
What happens? Does it raise an exception? (If so, whats the message) or does the script give the success message but no file?
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 05-11-2006, 06:10 AM Re: godaddy asp.net upload issue verification
Novice Talker

Posts: 12
Trades: 0
The filename property of pasted file does not give u only file name it gives u full path of the file on clients machine.
"fuFileUpload.PostedFile.FileName" is not file name it is complete path
u can extract the fil ename from it
Code:
string strFileName= fuFileUpload.PostedFile.FileName.Substring(1+fuFileUpload.PostedFile.FileName.LastIndexOf(@"\"));

Last edited by handshakeit; 05-11-2006 at 06:13 AM..
handshakeit is offline
Reply With Quote
View Public Profile
 
Old 05-11-2006, 08:42 AM Re: godaddy asp.net upload issue verification
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Quote:
string strFileName= fuFileUpload.PostedFile.FileName.Substring(1+fuFil eUpload.PostedFile.FileName.LastIndexOf(@"\"));
Which is acheived in the above code by using System.IO.Path.GetFileName()
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 05-18-2006, 04:46 AM Re: godaddy asp.net upload issue verification
Junior Talker

Posts: 4
Trades: 0
Permission Issue
newmore is offline
Reply With Quote
View Public Profile
 
Old 07-17-2006, 12:44 AM Re: godaddy asp.net upload issue verification
Junior Talker

Posts: 1
Trades: 0
I assume it is permission issue. I had access denied error when ever i try uploading the file to a specific folder.

solution:
Goto the control panel of the specific domain. Choose the Directory management under Settings menu.

Create the folder name of where you want to upload the file with read and write permission.

Good luck
yrskumar is offline
Reply With Quote
View Public Profile
 
Old 08-24-2006, 08:21 AM Re: godaddy asp.net upload issue verification
saadatshah's Avatar
Extreme Talker

Posts: 215
Name: Syed Saadat Ali
Location: Lahore, Pakistan
Trades: 0
Permission Issue
__________________
- -- --- ---- ----- ------ ------- ---------------
If you have knowledge, let others light their candles in it.
saadatshah is offline
Reply With Quote
View Public Profile Visit saadatshah's homepage!
 
Reply     « Reply to godaddy asp.net upload issue verification
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26693 seconds with 12 queries