|
-
Aug 31st, 2005, 07:06 AM
#1
Thread Starter
Fanatic Member
DCOM Config on web server
Guys,
I am trying to launch excel on a web server as a user. Not ideal I know, but its a temp solution until I get time to develop a better reporting mechanism.
Before I started messing with DCOM, I had excel installed on the server, when I went to launch Excel I was prompted for a login. If I login as domain admin my code runs fine, opens an excel template, dumps data from a dataset into the file, then saves it as an xls.
I was trying to get rid of the login when I came accross these 2 pages and I have implemented everything detailed in the first MSDN article.
http://support.microsoft.com/default...b;EN-US;288367
http://www.asp101.com/articles/jayra...et/default.asp
However, when I now try to run the code, excel.exe is starting as a process on the server, owned by the user (Identity impersonate is on), but Excel just hangs at that point and nothing more happens until I forcibily end the excel process.
I have no code in the xlt file, and opening it direct on the server I don't see any dialogue boxes that could be causing the hang.
Any ideas guys ?
Bob
-
Aug 31st, 2005, 10:34 AM
#2
Hyperactive Member
Re: DCOM Config on web server
Hi,
I got some project related to this one recently. Uploading an Excel File to server and reading the Excel data in the server and dumping it on the SQL Server....
My 1st approach is the ADO reading the Excel File but it has some consideration to take...If the rows on the same column have some different data type.. take a look on this http://support.microsoft.com/default...b;EN-US;257819 and locate the topic A Caution about Mixed Data Types
Second if Office Automation in the Server Side whic I think the same as what you did and also you need to set your DCOM config for your Microsoft Excel Application pertaining to the its property in the Security Tab about Launch and Activation Permission and Access Permission (For the mean time for your testing try to put some Everyone Account there and check on the allows...but if you implement it hmmm I dont know if this is the a better solution but try to use the Login Authentication in your IIS which is the default IUSR_<ur machine name> )
Its kinda bulky on the server but it works..
3rd solution is to make first your Excel as a CVS file which is smaller and you can use ADO to read it as a text file... No Excel Application hassel....
Good luck to your project...
-Vince
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|