file upload problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I try to upload a file from whithin a form, it works locally.

But when i deploy my asp.net application, i got the error 'uri formats are
not supported'.
I thought it has something to do with permissions, so i looked in the
target-directory from the upload, and i have these permissions :
everyone-full control.

What could be the problem ?
Bart
 
Hi,

Try to add ASP.Net account for this folder. and then give fullcontrol for
it.

Mike
 
can you give us the exact error message? Is it thrown by .NET or IIS?
 
The error is this :

An unhandled exception occured during the execution of the current web
request. Please review the stack trace for more information about the error
and where it originated in the code
Exception details : system.argumentException : URI formats are not supported.

I has to to with this code
picture.postedfile.saveas(server.mappath("/pictures/" & filename)

where filename is "filename.ext"

The directory "pictures" has everyone-full control and aspnet-full control.




"Daniel Fisher(lennybacon)" schreef:
 
I added the account aspnet with full control, but it's still the same.

"Michael Tkachev" schreef:
 
I saw this error in my App..
It was to do something with the path..

Please check the path.

check this

Dim strFilename As String = "CMGUserList" & Now.Month.ToString() &
Now.Day.ToString() & Now.Year.ToString() & Now.Second.ToString & ".xls"
'Path.GetFileName(myFile.FileName)

' Write data into a file
WriteToFile(Server.MapPath(strFilename), myData)
filePath = Server.MapPath(strFilename)


Vinay
 
I don't get it. If I use server.mappath, everything keeps working local, but
not on our webserver. On the webserver, it returns "file:\\...", and off
course that will not work.
So i try this
picture.postedFile.saveAs("http://urltothewebsite/imageFolder/file.ext")
But it still gives me the error "uri formats are not supported".
 
You could just remove the protocol prefix if found to keep just the physical
file name.

Let us know if you find why Server.MapPath returns file://... This is the
first time I ear about that.

Patrice
--
 

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

Back
Top