.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
Go Back  Xtreme Visual Basic Talk > > > .Net office Automation Deployment in Window 2003


Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2007, 07:57 PM
nickel84sg nickel84sg is offline
Newcomer
 
Join Date: Aug 2007
Location: Singapore
Posts: 24
Default .Net office Automation Deployment in Window 2003


Hi,

I am rather new to this forum. Mike_R FAQ was a good source of reference for me to a great extend. After few month of programming, manage to complete my application on schedule and within budget. But i facing a frusting problem. I have the following two warning in my event log when ever my application run the excel.

Detection of product '{90110409-6000-11D3-8CFE-0150048383C9}', feature 'OfficeUserData', component '{4A31E933-6F67-11D2-AAA2-00A0C90F57B0}' failed. The resource 'HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\MS Access Database\' does not exist.


Detection of product '{90110409-6000-11D3-8CFE-0150048383C9}', feature 'ExcelUserData', component '{8ADD2C96-C8B7-11D1-9C67-0000F81F1B38}' failed. The resource 'HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\UserData' does not exist.

But the application was able to run as normal as in my development environment. but will general this 2 warning everytime i run the application. currently setting the Dcom identity to run the excel as launching user(which is NETWORK SERVICE). I believe the problem is cause user NETWORK SERVICE has never run excel locally before to initial all the excel required file. Correct me if i am wrong on this concept.

Some method i tried:

1. Create a new user. XXX and i run excel with this user to initial everything. and grant this user local administrator right. and set the the excel to run as this user. This method work completely on when i test on a win xp (non tighten server) but it fail to run the excel when i adopt the same method on window 2003 harden server.

access right and all those access listed in the dcom security tabs was granted to the xxx user too... Did i miss out anything?

2. I try to create a account yyy and grant it the permission equal to NETWORK SERVICE. and do the above as method 1. But it failed too.

3. I try method 1 but granted with domain administrator right.. and thing work perfectly fine.

Any one have experience deploying excel automation application on window 2003 server? Hope to hear some advise.

Thanks
Reply With Quote
  #2  
Old 08-30-2007, 09:47 AM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Ho nickel84sg,

Welcome to the forum.

I'm sorry, but I'm personally not very strong with deployment issues.

But deploying on a server has its own special problems an pitfalls. (In general it's simply not recommended). At a minimum, I would have a read here:

Considerations for server-side Automation of Office

Using .NET adds complexity in addition to the issues mentioned by that article.

There are professional programs that are designed to facilitate server-side automation of MS Office documents. Also, Visual Studio Tools (VSTO) has a ServerDocument object model that is designed to handle this scenario. I don't have any personal experience with it, so I can't help you much here, but you might want to Google on the topic and if it looks promising then usign VSTO could be a good solution for you.

That said, after reading the Considerations for server-side Automation of Office, you may be able to see where you are getting hung up. I'm not sure though, because your issue looks more like a .NET deployment issue to me.

Sorry, I wish I could be of more help. I hope that this was worth something...

Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #3  
Old 08-30-2007, 06:27 PM
nickel84sg nickel84sg is offline
Newcomer
 
Join Date: Aug 2007
Location: Singapore
Posts: 24
Default

Thanks Mike.

Currently i am looking into VSTO too. Wish to find an alternative for my problem. I have browse through Consideration for server-side Automation of Office. I believe my problem at the moment is having problem with user identity.

Anyone know how i can configure my excel application to to initialize properly on startup? i read something about creating the registry key etc for excel but have no idea where i should start looking for it.
Reply With Quote
  #4  
Old 08-31-2007, 11:19 AM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Unfortunately, I don't have any experience installing on a Server. However, I would definately read the Considerations for server-side Automation of Office article carefully to see if it gives any clues.

Also, you might want to Google for help on this. I would google on "Considerations for server-side Automation of Office", because any thread discussing these issues probably mentions this article as well. And try keywords like "Solution" or "work around".

Also, you might want to try automating from VB 6.0 or from VBA first and try to solve the problem at that level -- simply to isolate from the issues that adding .NET to the mix can bring. Once you have this solved, then try doing the same with .NET...

This is about the best I can advise. I hope that this helps at least a little...

Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #5  
Old 09-02-2007, 06:33 PM
nickel84sg nickel84sg is offline
Newcomer
 
Join Date: Aug 2007
Location: Singapore
Posts: 24
Default

I have been working on another solution to write registry key to tell excel not to run the initial setup when running excel application using asp.net. Not sure if this will work as i have yet to test the coding on the server (it hard to test on the server as i not given the access right by the network admin).

i tried another way of running using a login ID that had excel initialisation done, i was able to run the excel with no problem but my excel thread can't be killed.

i using the following method in c#.net:

Quote:
static extern IntPtr PostMessageA(IntPtr hwnd, IntPtr wMsg, IntPtr wParam, IntPtr lParam);

PostMessageA((IntPtr)excelApp.Hwnd, (IntPtr)0x12, (IntPtr)0, (IntPtr)0);
Anyone has any ideas if there is any special access right that has to be granted for the above command to work? If i using NETWORK Service to run, the above command work perfectly fine. excel thread can be close at all case. but not when i am running the excel thread using a emulated login ID. the ID was granted local administrator right.

once again. Thanks mike. i will still be sourcing for a solution and updated it here.
Reply With Quote
  #6  
Old 09-02-2007, 09:28 PM
nickel84sg nickel84sg is offline
Newcomer
 
Join Date: Aug 2007
Location: Singapore
Posts: 24
Default

Finally solved my problem with excel.

i created a .reg file that tell excel that the application has been initialised. I run this reg file once using asp.net coding. and created the registry key needed for NETWORK SERVICE account.

Quote:
REGEDIT4

// Registry file generated by the Application Launcher.

[HKEY_USERs\S-1-5-20\Software]

[HKEY_USERs\S-1-5-20\Software\Microsoft]

[HKEY_USERs\S-1-5-20\Software\Microsoft\Office]

[HKEY_USERs\S-1-5-20\Software\Microsoft\Office\11.0]

[HKEY_USERs\S-1-5-20\Software\Microsoft\Office\11.0\Common]
"UserData"=dword:00000001

[HKEY_USERs\S-1-5-20\Software\Microsoft\Office\11.0\Common\General]
"FirstRun"=dword:00000000

[HKEY_USERs\S-1-5-20\Software\Microsoft\Office\11.0\Common\UserInfo]
"UserInfo"=-
"UserName"=hex:00,00,00,00,00,00
"UserInitials"=hex:53,00,00,00,00,00,00,00
"Company"=hex:00,00,00,00,20,00,

[HKEY_USERs\S-1-5-20\Software\Microsoft\Office\11.0\Excel]
"UserData"=dword:00000001

[HKEY_USERs\S-1-5-20\Software\Microsoft\Office\11.0\Excel\Options]
"FirstRun"=dword:00000000
after that no more warning message anymore.

Last edited by nickel84sg; 09-03-2007 at 03:31 AM.
Reply With Quote
  #7  
Old 09-03-2007, 06:18 AM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Hey nickel,

Glad you got it, and I'm sorry that I wasn't more help here. Thansk for sharing that solution, btw, I'm sure that there will be others that will find it very helpful. I wonder how those registry keys differ from how Excel creates them when installed? More or less, those looked pretty standard to me, I wonder what's different...

Anyway, glad you got it, and thanks for sharing
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #8  
Old 09-03-2007, 06:25 AM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Oh no, you're going to want to shoot me.

I forgot about this article:

How to configure Office applications to run under the interactive user account

Now that I figured it out, I guess you don't need this! (I know I suck.) But I'm posting it just in case there's something in it that is helpful...
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #9  
Old 09-03-2007, 07:24 PM
nickel84sg nickel84sg is offline
Newcomer
 
Join Date: Aug 2007
Location: Singapore
Posts: 24
Default

Hi Mike,

For my case, i am using similar setting as the one mention on your link above. But i read somewhere that interactive user has alot of downfall will update the link here again if i came across it.

I am using The launching User as the identity for excel DCOM. For my development environment (window xp professional) the launching user will be ASPNET. But for my production server, it on window 2003 thus the launching user will be NETWORK SERVICE. (This is determine by the identity used for IIS application pool, there is cases where custom account use to run IIS application pool).

so now that we have identify the user, i went to the registry and was stuck in identifying the SID for NETWORK SERVICE account. i got to understand that S-1-5-20 is for NETWORK SERVICE account from
http://support.microsoft.com/kb/243330.

I add to add in registry key under HKEY_USERs\S-1-5-20\Software\Microsoft\Office\11.0. This registry key was to tell Office that the user has initialised the user profiles and prevent it from running MSI installer for it again.

that the explanation for the above problem. Hope others face the problem will get the solution here. [wasted so much time on this deployment issue] But now it is a completed and ready to move on.

and Thanks Mike. i will stay around the forum for as long as i am still in the line.
Reply With Quote
  #10  
Old 09-04-2007, 08:49 AM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

This kind of thing is all over my head to be honest, but I'm sure that your efforts will be appreciated by others. And we have a couple of links to relevant KB articles as well so this is good.

Thanks for sharing!
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003 .Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
 
.Net office Automation Deployment in Window 2003
.Net office Automation Deployment in Window 2003
 
-->