ftp upload with mac browser using asp.net

P

psb

I have a file upload Web page using
System.Web.UI.HtmlControls.HtmlInputFile. Anyone have any issues uploading
files using MacOS browsers of any sort?? Almost all of them bomb on our
server. Is there something I need to put in the web.config or page
directive that will allow ftp uploading on a Mac. What is funny is we have
a ClassicASP file that does this, and it is WAY more reliable. It is nasty
code -adodb.streams and all... Asp.net really wrapped all of that junk,
although it isn't working the .net way. I really don't want to purchase a
ActiveXDll control that does the same thing, or purchase an active x control
that clients will mess up... I just want a simle <input type="file"
id="file1" runat="Server" />

-Paul
 
K

Kevin Spencer

What you're describing is NOT FTP, but HTTP. The input type="file" HTML
element sends the uploaded file with the form's HTTP POST request. I am not
aware of any issues with this type of form field in Mac browsers. I would
have to guess that your issue lies somewhere in your server-side code which
is handling the upload. It isn't necessary for you to buy or install
anything, only to debug your code.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
P

psb

yeah, yeah. http, i hear ya! the code is a cake walk in asp.net... it is
so easy that I feel like I am doing something wrong, and since macOS ONLY
people are nearing 100% failure rate, I though there would be more to it
than a couple lines of code. is this the code I have to check? do you
think I am missing anything?

<input type="file" id="txbUpload" runat="server"/>
----------------------------------------------------
dim sFile as string = txbUpload.PostedFile.FileName
sFile = GetFileNameWithoutPath()
dim sFullPath as string = "c:\tmp\" & sFile
txtUpload.PostedFile.SaveAs(sFullPath)

thanks,
Paul
 
K

Kevin Spencer

Hi Paul,

I take it you're not using Visual Studio.Net, and can't use Breakpoints?

Interesting that this is only happeining on Mac browsers. I'm curious about
the following lines of code:

sFile = GetFileNameWithoutPath()
dim sFullPath as string = "c:\tmp\" & sFile

What does this "GetFileNameWithoutPath()" method do? You might try using
System.IO.Path.GetFileName() instead. I am not very familiar with Mac
browsers, but it may be possible that the path is stripped by the Mac
browser prior to uploading, which is different than the behavior of most
browsers.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
P

psb

yes, I like the IO library, and yes I am using vs.net. I have never done
any server side debugging with a mac browser. GetFileNameWithoutPath() is
something I made up for this post, so you would know we got the filename
only. as I am looking over the code we are not using IO, but doing this...

sSplit = Split(sFile, "\")
sFile = sSplit(Ubound(sSplit))

You may have something, so I am going to test it...

In an effor to make ftp access for our clients easy, we have made more
difficulties. 1st we were using IIS's FTP server with Active Directory
Permissions for all of our clients. no matter what, my team was always
called by a sales rep about a client having problems
connecting/authenticating to our ftp site. we then installed a new ftp
server, ServeU. This is fantastic software, although we still had same
problems. So I said, let's just make it as simple as possible with http (5
lines of code, two buttons and txbox). that is why the title of the post is
"ftp...". The problem lies with macs, mac users, and mac ftp client
software.

-p
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top