Web Connection
GetMultiPartFile not saving to disk
Gravatar is a globally recognized avatar based on your email address. GetMultiPartFile not saving to disk
  n/a
  All
  Jan 29, 2015 @ 04:52pm
I have a website that uploads a file to the server. I can boil the upload process down to this:

lcFileBuffer1 = REQUEST.GetMultiPartFile("FileName1",@lcFileName1)
File2Var(lcFileName1,lcFileBuffer1)

This has worked fine for several years on a 2003 Server. I am trying to install on a 2012 Server, and the file never gets saved to the server. The FileName FolderName are saved to a dbf after the upload, so Visual FoxPro thinks that the file was saved properly. There is a moderate amount of error checking that goes on to verify that the file sizes are appropriate, etc, and nothing is reported out of the ordinary. Everything seems to be just fine....but the file never saves.

Is there any difference between Server 2003 and 2012 that might cause this? Can you think of anything that I might need to consider?

Thanks!

Jeff

Gravatar is a globally recognized avatar based on your email address. Re: GetMultiPartFile not saving to disk
  Rick Strahl
  Jeff
  Jan 29, 2015 @ 07:57pm
Most likely permissions.

Make sure the IIS Application Pool user account has writes to write the file in the folder you're writing it too. You might also want to check and insure that the file is actually getting captured in the string...

+++ Rick ---



I have a website that uploads a file to the server. I can boil the upload process down to this:

lcFileBuffer1 = REQUEST.GetMultiPartFile("FileName1",@lcFileName1)
File2Var(lcFileName1,lcFileBuffer1)

This has worked fine for several years on a 2003 Server. I am trying to install on a 2012 Server, and the file never gets saved to the server. The FileName FolderName are saved to a dbf after the upload, so Visual FoxPro thinks that the file was saved properly. There is a moderate amount of error checking that goes on to verify that the file sizes are appropriate, etc, and nothing is reported out of the ordinary. Everything seems to be just fine....but the file never saves.

Is there any difference between Server 2003 and 2012 that might cause this? Can you think of anything that I might need to consider?

Thanks!

Jeff



Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: GetMultiPartFile not saving to disk
  n/a
  Rick Strahl
  Jan 29, 2015 @ 08:35pm
When you say "You might also want to check and insure that the file is actually getting captured in the string" ... meaning make sure that there is actually something in the buffer? I think that means that the size of the buffer is > 0. Right? Sorry, I haven't touched this code in a couple of years.

Thanks!

Jeff


Most likely permissions.

Make sure the IIS Application Pool user account has writes to write the file in the folder you're writing it too. You might also want to check and insure that the file is actually getting captured in the string...

+++ Rick ---



I have a website that uploads a file to the server. I can boil the upload process down to this:

lcFileBuffer1 = REQUEST.GetMultiPartFile("FileName1",@lcFileName1)
File2Var(lcFileName1,lcFileBuffer1)

This has worked fine for several years on a 2003 Server. I am trying to install on a 2012 Server, and the file never gets saved to the server. The FileName FolderName are saved to a dbf after the upload, so Visual FoxPro thinks that the file was saved properly. There is a moderate amount of error checking that goes on to verify that the file sizes are appropriate, etc, and nothing is reported out of the ordinary. Everything seems to be just fine....but the file never saves.

Is there any difference between Server 2003 and 2012 that might cause this? Can you think of anything that I might need to consider?

Thanks!

Jeff



Gravatar is a globally recognized avatar based on your email address. Re: GetMultiPartFile not saving to disk
  Rick Strahl
  Jeff
  Jan 30, 2015 @ 04:04pm

Yup.

Probably fine, but you have to check anyway if you have a problem. Permissions are the most likely culprit though.

+++ Rick ---



When you say "You might also want to check and insure that the file is actually getting captured in the string" ... meaning make sure that there is actually something in the buffer? I think that means that the size of the buffer is > 0. Right? Sorry, I haven't touched this code in a couple of years.

Thanks!

Jeff


Most likely permissions.

Make sure the IIS Application Pool user account has writes to write the file in the folder you're writing it too. You might also want to check and insure that the file is actually getting captured in the string...

+++ Rick ---



I have a website that uploads a file to the server. I can boil the upload process down to this:

lcFileBuffer1 = REQUEST.GetMultiPartFile("FileName1",@lcFileName1)
File2Var(lcFileName1,lcFileBuffer1)

This has worked fine for several years on a 2003 Server. I am trying to install on a 2012 Server, and the file never gets saved to the server. The FileName FolderName are saved to a dbf after the upload, so Visual FoxPro thinks that the file was saved properly. There is a moderate amount of error checking that goes on to verify that the file sizes are appropriate, etc, and nothing is reported out of the ordinary. Everything seems to be just fine....but the file never saves.

Is there any difference between Server 2003 and 2012 that might cause this? Can you think of anything that I might need to consider?

Thanks!

Jeff






Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: GetMultiPartFile not saving to disk
  n/a
  Rick Strahl
  Feb 19, 2015 @ 04:32pm
We run our web connection executable as a service, and I determined the culprit to be the service's credentials. If I run as "local system" the upload fails, but if I put in domain admin creds it works fine. It also fails if I use Local Admin credentials.

All components (.exe, website, all data, temp folders, etc) are on the local machine. Any suggestions of how we can beef up a Local Admin account so that it can properly upload the files? Hate to keep an active Domain Admin account provisioned solely to use to run this one website.

Thanks,

Jeff

Yup.

Probably fine, but you have to check anyway if you have a problem. Permissions are the most likely culprit though.

+++ Rick ---



When you say "You might also want to check and insure that the file is actually getting captured in the string" ... meaning make sure that there is actually something in the buffer? I think that means that the size of the buffer is > 0. Right? Sorry, I haven't touched this code in a couple of years.

Thanks!

Jeff


Most likely permissions.

Make sure the IIS Application Pool user account has writes to write the file in the folder you're writing it too. You might also want to check and insure that the file is actually getting captured in the string...

+++ Rick ---



I have a website that uploads a file to the server. I can boil the upload process down to this:

lcFileBuffer1 = REQUEST.GetMultiPartFile("FileName1",@lcFileName1)
File2Var(lcFileName1,lcFileBuffer1)

This has worked fine for several years on a 2003 Server. I am trying to install on a 2012 Server, and the file never gets saved to the server. The FileName FolderName are saved to a dbf after the upload, so Visual FoxPro thinks that the file was saved properly. There is a moderate amount of error checking that goes on to verify that the file sizes are appropriate, etc, and nothing is reported out of the ordinary. Everything seems to be just fine....but the file never saves.

Is there any difference between Server 2003 and 2012 that might cause this? Can you think of anything that I might need to consider?

Thanks!

Jeff






Gravatar is a globally recognized avatar based on your email address. Re: GetMultiPartFile not saving to disk
  Rick Strahl
  Jeff
  Feb 20, 2015 @ 03:00am

Hmmm... I'm not sure why SYSTEM would not be able to access a folder on the local machine. SYSTEM has global Full Rights unless permissions have been explicitly changed.

Check folder permissions in the folder you're trying to write to and make sure SYSTEM is the rights.

Also check and make sure that there's no interference from Anti-Virus software. It might quarantine writes from SYSTEM in certain locations on disk. Turn it off and try the write operations again to see if that works...

+++ Rick ---


We run our web connection executable as a service, and I determined the culprit to be the service's credentials. If I run as "local system" the upload fails, but if I put in domain admin creds it works fine. It also fails if I use Local Admin credentials.

All components (.exe, website, all data, temp folders, etc) are on the local machine. Any suggestions of how we can beef up a Local Admin account so that it can properly upload the files? Hate to keep an active Domain Admin account provisioned solely to use to run this one website.

Thanks,

Jeff

Yup.

Probably fine, but you have to check anyway if you have a problem. Permissions are the most likely culprit though.

+++ Rick ---



When you say "You might also want to check and insure that the file is actually getting captured in the string" ... meaning make sure that there is actually something in the buffer? I think that means that the size of the buffer is > 0. Right? Sorry, I haven't touched this code in a couple of years.

Thanks!

Jeff


Most likely permissions.

Make sure the IIS Application Pool user account has writes to write the file in the folder you're writing it too. You might also want to check and insure that the file is actually getting captured in the string...

+++ Rick ---



I have a website that uploads a file to the server. I can boil the upload process down to this:

lcFileBuffer1 = REQUEST.GetMultiPartFile("FileName1",@lcFileName1)
File2Var(lcFileName1,lcFileBuffer1)

This has worked fine for several years on a 2003 Server. I am trying to install on a 2012 Server, and the file never gets saved to the server. The FileName FolderName are saved to a dbf after the upload, so Visual FoxPro thinks that the file was saved properly. There is a moderate amount of error checking that goes on to verify that the file sizes are appropriate, etc, and nothing is reported out of the ordinary. Everything seems to be just fine....but the file never saves.

Is there any difference between Server 2003 and 2012 that might cause this? Can you think of anything that I might need to consider?

Thanks!

Jeff









Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

© 1996-2024