wcf - HTTP could not register URL (remote debugging) -


C #, Windows 7 - I write an AutoCAD plugin and use Remote Debugging (MS Visual Studio). My plugin should work as a WCF service. AutoCAD is an unmanaged application and should be in the form of a host for my service. I am reading a book about WCF, and I try to use it, I can not use acad.exe.config for my service settings: I do not have permission. So I do it myself (I'll teach them with my XML file, but later, after refactoring). Code of my "server" (this code begins with AutoCAD):

  Private static zero runs service () {AP Document Doc = cad.DocumentManager.MdiActiveDocument; Try {Uri Address = New Uri ("http: // LocalHost: 8000 / Cread Service"); BasicHttpBinding Binding = New BasicHttpBinding (); Binding .name = "HTBbinding"; Binding. Hostname ComparisonMode = Hostname ComparisonMode. Strongwoldcard; Binding. Security.mode = Basic HTPSAquiry Mod.No.No; Host = new service host (typef (CADSWire)); Host.AddServiceEndpoint (typeof (ICadService), binding, address); host.Open (); // I get an exception here ... if (doctor! = Null) {doc.Editor.WriteMessage ("Service launches. \ N"); }} Hold (exception before) {if (doctor! = Null) {doc.Editor.WriteMessage ("exception: {0} \ n", ex.Message); I get an exception (see code comment):  
  Exception: Could not send HTTP URL http: // +: 8000 / CadServices / Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).   

But http://go.microsoft.com/fwlink/?LinkId=70353 page does not exist I launch MS Visual Studio 2013 as an administrator I try to do (I read about this), but it is not helping me (PS

PS if I launch Autocad as an Administrator - all work fine
PS2 If I launch Remote Debugger as an Administrator - all work fine too.

Should I use it normal user? Can I start my service (hosted at AutoCAD) without the Admin rights?

This is probably because AutoCad does not have the necessary rights to register the port in HTTP.SYS, in that case you have two options:

  1. Autocad in admin mode
  2. HTTP.SYS manually registered port / endpoint T. To that end, several tools are available that will is what I use:

    Let me know if it works

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -