.NET

.NET

Reply
New Member
jamesmcg
Posts: 2
Registered: ‎01-15-2010
Message 1 of 5 (303 Views)

Server Execution Failed when trying New AcadApplication in service

303 Views, 4 Replies
01-15-2010 04:35 PM
I'm working on a service that links into AutoCAD. The service is supposed to automatically do conversions, however, when it gets to this line:
_autoCad = New AcadApplication
it throws this exception:
Server execution failed

I am using VB.Net in visual studio 2003 with .NET 1.1.4322 and AutoCAD 2010. I have "Imports AutoCAD" and the AutoCAD 2010 Type Library referenced.

Thanks for any tips. I searched the forums and all i found was this thread-http://discussion.autodesk.com/forums/message.jspa?messageID=5112009, but i disabled the communication center, and i still encountered the error
*Norman Yuan
Message 2 of 5 (303 Views)

Re: Server Execution Failed when trying New AcadApplication in service

01-15-2010 08:43 PM in reply to: jamesmcg
What kind of service you are creating? Windows service? web/wcf service?...

If it is Windows service, the service is not allowed to run desktop
application. Technically, you may be able to run Acad on a web server with
web application/services with certain configuration, but pratically not an
viable solution. That is why the "=New AcadApplication" statement fails. Not
to mention possible violation of Acad lisence by running it by "service".

You need to rethink/redesign your solution, I am afraid.

"jamesmcg" wrote in message news:6319467@discussion.autodesk.com...
I'm working on a service that links into AutoCAD. The service is supposed
to automatically do conversions, however, when it gets to this line:
_autoCad = New AcadApplication
it throws this exception:
Server execution failed

I am using VB.Net in visual studio 2003 with .NET 1.1.4322 and AutoCAD 2010.
I have "Imports AutoCAD" and the AutoCAD 2010 Type Library referenced.

Thanks for any tips. I searched the forums and all i found was this
thread-http://discussion.autodesk.com/forums/message.jspa?messageID=5112009,
but i disabled the communication center, and i still encountered the error
New Member
jamesmcg
Posts: 2
Registered: ‎01-15-2010
Message 3 of 5 (303 Views)

Re: Server Execution Failed when trying New AcadApplication in service

01-19-2010 09:54 AM in reply to: jamesmcg
Yes, it's a windows service. It's worked in the past, with a previous version (2006, I believe)
Active Contributor
btmsoftware
Posts: 38
Registered: ‎09-06-2007
Message 4 of 5 (78 Views)

Re: Server Execution Failed when trying New AcadApplication in service

11-23-2013 12:55 AM in reply to: jamesmcg

I've read in those forums that removing/disabling the Acad communication center allows running Acad as a services. It is the gulty one regardin Acad hanging

 

Have you tried that ?

Distinguished Mentor
gasty1001
Posts: 582
Registered: ‎04-11-2010
Message 5 of 5 (71 Views)

Re: Server Execution Failed when trying New AcadApplication in service

11-23-2013 06:16 AM in reply to: jamesmcg

Hi,

 

While i don't know if you can run AutoCAD as a service, i do know that you need at least .NET 2.0 Framework (up to 4.0, but not supported nor recommended and with some limitations)  and VS 2008 (i'm not sure if VS 2005 does the cut) to compile and debug .NET code in AutoCAD 2010.

 

 

Gaston Nunez

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.