You must Sign In to post a response.
  • Category: ASP.Net MVC

    Excel File upload not working in deployment server

    Hi,
    I have file upload control in my project to upload excel file.It is working fine in my local system.But after deployment file upload not working.It is working in Development environment but after deployment not working.

    Pls help me..
  • #761059
    Hi
    Jeevan

    when you upload to server excel file set permission for your upload folder path in server.

    You can go through Below links

    https://msdn.microsoft.com/en-us/library/bb727008.aspx

    http://serverfault.com/questions/357108/what-permissions-should-my-website-files-folders-have-on-a-linux-webserver

    https://technet.microsoft.com/en-us/library/cc754344.aspx

    Or can you give teamviewer id come online

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #761061
    Hi Dotnet Developer-2015,
    Thanks for your reply .May i know what are the permissions i need to grant on that folder to access that folder from server.

  • #761062
    Hi
    Jeeva

    Read and write permission for your server uploading
    Folder

    For ex: your folder Name this -> ExcelFileUpload

    Right click given permission this Read,Write,all permissions

    Can you share with snapshots in your server folder location.

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #761063

  • #761064

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #761065

    Delete Attachment

  • #761066
    Hi Dotnet Developer-2015,
    i had attached ExcelFile Folder current permissions screenshot.I have a folder called 'ExcelFile' in my MVC project to store uploaded files.

    Please suggest...

    Delete Attachment

  • #761067
    hi

    jeevan

    Select all groups and users option
    apply full control and go to edit and advanced same
    set the permissions apply Full control and try it

    did you host separate server or in your pc?

    Server means give read and write full control or recreate folder give full permission and try them..

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #761071
    Hi Dotnet Developer-2015,
    I have given full permissions to Everyone to my folder.Eventhough Excel File uploading not working in deployment server.

    Do we need to change anything in IIS settings ?
    Please let me know

  • #761073
    Hi

    Jeevan

    refer this urls

    Hi
    Jeevan

    refer this urls

    https://support.microsoft.com/en-us/kb/323246


    http://www.codeproject.com/Questions/686434/How-to-upload-file-to-web-server-using-ASP-net-Csh


    http://www.aspsnippets.com/Articles/Uploading-Files-to-FTP-Server-programmatically-in-ASPNet-using-C-and-VBNet.aspx


    http://www.asp.net/web-forms/overview/data-access/working-with-binary-files/uploading-files-cs

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #761145
    Hai Jeevan,
    This is very common error where the file upload is working on the local and not working when you deploy your application to the hosting environment.
    The issue is that when you write the SaveAs(...), it will save the file in your application directory and the folder must be there.
    Now when you deploy your application to server, you need to have the same folder there and then this SaveAs will work correctly.
    Also it is better to provide some path which is available to both the client and server and use that path to save the files.
    To download the files to the client machine from the server, you need to use the Web HttpResponse and connect to the server to get the same file download to the client machine.
    You can use the below link for the download:

    http://codedisplay.com/how-to-download-a-file-from-server-using-asp-net-c-vb-net/

    http://stackoverflow.com/questions/18477398/asp-net-file-download-from-server

    Hope it will be helpful to you.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com


Sign In to post your comments