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
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
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
None
0 Points
9 Posts
HttpRequest works locally, but not on server
Feb 06, 2004 03:04 PM|buckeye|LINK
Member
130 Points
293 Posts
Re: HttpRequest works locally, but not on server
Feb 06, 2004 05:22 PM|MilanNegovan|LINK
http://www.AspNetResources.com
ASP.NET With Emphasis On Web Standards
Member
130 Points
293 Posts
Re: HttpRequest works locally, but not on server
Feb 07, 2004 02:33 PM|MilanNegovan|LINK
http://www.AspNetResources.com
ASP.NET With Emphasis On Web Standards
None
0 Points
9 Posts
Re: HttpRequest works locally, but not on server
Feb 09, 2004 11:13 AM|buckeye|LINK