Programmatically modifying a file on Windows Server 2008 (Web Ed.)
I have written a .NET 2008 application (Windows Forms), incorporating Microsoft.Office.Interop.Excel, that modifies an existing Excel 2007 spreadsheet. It works perfectly on my WinXP development computer. When I upload the app to a Microsoft Web Server 2008, it opens the file and reads from the file, but when the app tries to save the file, it throws this exception: "System.Runtime.InteropServices.COMException (0x800A03EC): 'july2009.xlsx' is read-only. To save a copy, click OK, then give the workbook a new name in the Save As dialog box." The file is NOT read-only, nor is it opened by any other user or app. The app and the Excel file both reside on the D: (data-only) drive. My first instinct was to look at file permissions. When nothing else worked, I literally created a temporary Group, added EVERY user and security entity to it and granted the group full control of the entire D: drive. No luck. Then I tried manually elevating the permission by running my app as administrator. No luck. Next, I disabled UAC. Nope. Finally, I copied the file to my XP development computer and ran the app there. Of course it worked perfectly. Can anyone please tell me how to give my program permission to edit a file on Server 2008? Thanks!
November 24th, 2009 7:30am

Hi there,Thank you for posting in windows server forums,This forum answers the queries which are related to operating system and non-programatic related.For getting support on programatic related queries you need to post your query under MSDN forums. For your convinience i am pasting the link below.http://social.msdn.microsoft.com/Forums/en-US/category/netdevelopmentHope your problem get resolved soon.
Free Windows Admin Tool Kit Click here and download it now
November 24th, 2009 8:45am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics