OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Call Open Office API from ASP.NET

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
void
General User
General User


Joined: 09 Feb 2009
Posts: 5

PostPosted: Tue Feb 10, 2009 2:12 pm    Post subject: Call Open Office API from ASP.NET Reply with quote

Has any one had any success doing this? I keep getting "Access Denied". And when I add "ASPNET" and "NETWORK SERVICE" (the app pool user) to the administrators group It just freezes on the "CreateInstance" call. I opened up sysinternals File Monitor and Reg monitor and found no "access denieds" in either. I also went through dcomcnfg and added permissions on 'OpenOffice.org 1.1 Text Document'

Code:
Code:
Type i_svc_manager = Type.GetTypeFromProgID("com.sun.star.ServiceManager");
Object l_obj_instance = Activator.CreateInstance(i_svc_manager);


Error:
Code:
Retrieving the COM class factory for component with CLSID {82154420-0FBF-11D4-8313-005004526AB4} failed due to the following error: 80070005
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Wed Feb 11, 2009 2:28 pm    Post subject: Reply with quote

Try this link http://opendocument4all.com/content/view/68/47/ or look in this forum for posts of LarsB.
Back to top
View user's profile Send private message
void
General User
General User


Joined: 09 Feb 2009
Posts: 5

PostPosted: Thu Feb 12, 2009 7:45 am    Post subject: Reply with quote

The link is for console apps and on how to use the api. I can already successfully do this. (see above.)

After searching through the forums again I found the question asked multiple times but never answered.. If there's an answer out there..I would suggest it get stickyed.


http://www.oooforum.org/forum/viewtopic.phtml?t=9083&highlight=iis
http://www.oooforum.org/forum/viewtopic.phtml?t=75764&highlight=iis
http://www.oooforum.org/forum/viewtopic.phtml?t=67025&highlight=iis
http://www.oooforum.org/forum/viewtopic.phtml?t=67040&highlight=iis
http://www.oooforum.org/forum/viewtopic.phtml?t=65669&highlight=iis
http://www.oooforum.org/forum/viewtopic.phtml?t=74978&highlight=asp
http://www.oooforum.org/forum/viewtopic.phtml?t=71004&highlight=asp
http://www.oooforum.org/forum/viewtopic.phtml?t=70123&highlight=asp
http://www.oooforum.org/forum/viewtopic.phtml?t=70134&highlight=asp
http://www.oooforum.org/forum/viewtopic.phtml?t=65411&highlight=asp

Edit:
(sorry if this came off as angrey..im just horribly frustrated and have people asking me why this doesnt work..)
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Thu Feb 12, 2009 10:32 am    Post subject: Reply with quote

void wrote:
The link is for console apps and on how to use the api. I can already successfully do this. (see above.)

I didn't get that point from your post. And even I would have got it, I still would have recommended the above mentioned link Wink

void wrote:
After searching through the forums again I found the question asked multiple times but never answered..

My knowledge of Microsoft technologies is very limited. Anyway, perhaps I'm not totally wrong assuming that ASP is in some ways similar to Java's JSP (Java Server Pages). If so, I never would try to connect from an ASP to OOo! In a web application it is possible to open the same JSP simultaneously from several browsers. If I would embed in such a JSP to open a connection to OOo, it would result in opening several connections at the same time. That is a very bad idea! Instead, needing a web application to create some documents through using OOo, I would (and I had) write a service in Java (because that's the programming language I'm familiar with) and call that service from my JSP. So it would be the task of the service to get one connection to OOo and serialize all parallel calls from the JSP. Is something like that possible for you, too? You write a "console app" which waits for calls from an ASP? Let the "console app" handle one connection to OOo and let it act as a service serializing all parallel calls from the ASP. What do you think? If I'm totally wrong, let me know in which way you intend to use OOo from your ASP.

void wrote:
sorry if this came off as angrey..im just horribly frustrated and have people asking me why this doesnt work.

Thank you very much for your clarification, but your post didn't sound angry to me.
Back to top
View user's profile Send private message
void
General User
General User


Joined: 09 Feb 2009
Posts: 5

PostPosted: Wed Feb 18, 2009 8:54 pm    Post subject: Reply with quote

The intent is a webservice that would convert an ms word document into a pdf. It would be great to have it set up to handle multiple connections at once, but for my needs the frequency at which the service would be called I don't need to worry about that yet. You are very correct in assuming asp is like php. Its the very same concept (server side code execution)

I think the problem I'm having is permissions. So even if I were to create such a console app I suspect I would still hit the same issue.
Back to top
View user's profile Send private message
void
General User
General User


Joined: 09 Feb 2009
Posts: 5

PostPosted: Fri Mar 06, 2009 1:44 pm    Post subject: Reply with quote

*Bump*

Which was the case with the console app.. Still am not able to call open office api from ASP.NET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group