Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Error in saving excel file

Error in saving excel file

Scheduled Pinned Locked Moved C#
helpcsharpsysadminasp-netwindows-admin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Manish_Home
    wrote on last edited by
    #1

    Hi, I am using dot net editor 2005. I have written web site(c#.net,asp.net

    : | or * • Make sure the file/path name doesn't contain more than 218 characters. I have tried many combination on server end but probelm stil persist. Also excel application executes under Network service account,I tried to give full access to this account in all distribution groups(all possible groups),excel application but problem still persist Can any one help sugest any solution??

    Manish

    R 1 Reply Last reply
    0
    • M Manish_Home

      Hi, I am using dot net editor 2005. I have written web site(c#.net,asp.net

      : | or * • Make sure the file/path name doesn't contain more than 218 characters. I have tried many combination on server end but probelm stil persist. Also excel application executes under Network service account,I tried to give full access to this account in all distribution groups(all possible groups),excel application but problem still persist Can any one help sugest any solution??

      Manish

      R Offline
      R Offline
      roel_v
      wrote on last edited by
      #2

      Manish, It is considered bad practice to use Excel directly from an IIS web application. If I remember correctly, no matter where you save to, Excel tries to access folders specific for the user it runs under, such as 'My Documents'. For these type of accounts like network service, ASPNET, etc these folders do not exist and that gives you these type of problems. The work-around is a queued approach, where you queue requests for doing something with Excel. Then, you run an NT Service under a 'real' user account that picks up these requests and processes it. However, I was forced once to do something like that with Word and it's difficult to implement and it always remains error prone. Microsoft officially recommends against using Office applications in background services and for good reason. Instead of trying to work around it, I suggest you look into buying one of those third party components that work natively on Excel files without requiring Excel on the server. Those are very stable and much faster than accessing Excel through its own object library. I've used components from SoftArtisans with excellent results. See: http://www.softartisans.com/[^] Hope this helps, Roel

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups