Error in saving excel file
-
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
-
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
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