.NET

Reply
Valued Contributor
ognyandim
Posts: 59
Registered: ‎05-21-2008
Message 1 of 3 (345 Views)
Accepted Solution

Problem calling WCF Service from within AutoCAD 2012

345 Views, 2 Replies
01-01-2012 02:52 PM

Hello everybody!

I am experiencing a strange problem and I suppose it is because of some technical detail that I dont currently know.

I have done the first chapter from Windows Communication Foundation 4 Step by Step.

I have built myself a simple service and separete console client that talks with the service and it goes pretty well.

I have made absolutley the same client inside AutoCAD 2012 x64 and tried to call the service and I receive the following error provided on screenshot.

I have provided both codes for you to see. Can you explain the problem? If you provide me a link to something I will be greatful.

I am going to answer it here myself.

We need the app.config loaded. When we have Conosle Client App the config is loaded, but when we make a library client ( .dll that we have to NETLOAD ) it is not loaded anywhere and therefore the config is unavailible.

I have solved my problem by pasting the configuration in acad.exe.config. That way my WCF client config is availible the to .dll which is hosted inside AutoCAD.

 

Here I have found a pretty good intro video for WCF hosted inside AutoCAD. ( Mine was outside of AutoCAD ) :

http://au.autodesk.com/?nd=event_class&jid=610987&session_id=7182

Valued Contributor
ognyandim
Posts: 59
Registered: ‎05-21-2008
Message 2 of 3 (340 Views)

Re: Problem calling WCF Service from within AutoCAD 2012

01-01-2012 03:39 PM in reply to: ognyandim

http://through-the-interface.typepad.com/through_the_interface/2008/01/turning-autocad.html - Kean implemented a thing that calls outside in another way, but that is not exactly what I am looking for.

Valued Contributor
ognyandim
Posts: 59
Registered: ‎05-21-2008
Message 3 of 3 (337 Views)

Re: Problem calling WCF Service from within AutoCAD 2012

01-01-2012 04:16 PM in reply to: ognyandim

I am going to answer it here myself.

We need the app.config loaded. When we have Conosle Client App the config is loaded, but when we make a library client ( .dll that we have to NETLOAD ) it is not loaded anywhere and therefore the config is unavailible.

I have solved my problem by pasting the configuration in acad.exe.config. That way my WCF client config is availible the to .dll which is hosted inside AutoCAD.

 

Here I have found a pretty good intro video for WCF hosted inside AutoCAD. ( Mine was outside of AutoCAD ) :

http://au.autodesk.com/?nd=event_class&jid=610987&session_id=7182

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!