locked
HttpRequest works locally, but not on server RRS feed

  • Question

  • User-1105658167 posted
    I made a very elementry upload function. It works excellent on my local environment, but when I upload on my server it doesnt work. I'm beginning to think it's my host. could they control that and prevent me from uploading? Not sure why they would. I cant seem to catch any errors either. Heres my example Dim fso dim strFile = inpfileup.Postedfile.Filename fso = CreateObject("Scripting.FileSystemObject") Dim Getname = fso.GetFileName(strFile) Try SQLConnection SQLString SqlCommander = New OleDbCommand (Sqlstr, SQLconnect) inpfileup.PostedFile.SaveAs(docpath & getname) SqlConnect.Open() SqlCommander.ExecuteNonQuery() lblmessage.Text = "file uploaded successfully" Catch msg as Exception response.write(msg.Message) lblmessage.Text = "Your File was not uploaded!" Finally SQLConnect.Close() End Try
    Friday, February 6, 2004 3:04 PM

All replies

  • User-1391363652 posted
    It will be helpful to dump error details in the trace or elsewhere. Also, if you're hosting this page you need to make sure you have permissions to access their file system. I can bet you don't have that kind of access by default. Either tweak permissions through an online panel if you can or call your host. I've run into the same problem a number of times and each time it was about permissions. Hope this helps! Milan
    Friday, February 6, 2004 5:22 PM
  • User-1391363652 posted
    Found this KB article you might find helful
    Saturday, February 7, 2004 2:33 PM
  • User-1105658167 posted
    Thanks for your help. It appeared that when files are uploaded to mysite, the ASPClient is the owner of the documents, so therefore the ASPNet user quota had to be increased. Now i just have to get fileextensions to prevent nasty files. thanks
    Monday, February 9, 2004 11:13 AM