English 中文(简体)
w
原标题:get app startup path in wcf

在2008年(C#)中:

我有:

  1. a main project (windows app)
  2. WCF Library
  3. WCF Host
  4. WCF Client (Windows app)

为了测试我与创建的客户提供的服务,我把我的客户形式称为我的主要主人,在通过这一形式获得服务投入要求之后,我开始通过使用我的服务合同方法作出反应。

在这项服务中,我需要建立与所收到的请求参数的适当联系,我需要我的申请启动途径(D:myProj.dll),以便查阅外部档案。 不幸的是,在使用不同类型的代码来回这条路后,我又走了一条无需我使用的路(myprojbindebug:programfiles pornography 9common7IDE)。

你们能否帮助我?

我不得不说,我通过指挥把这条道路加到我的服务图书馆和客户的施工后活动。

请帮助我获得这一途径(我项目启动的道路——和”<代码>D:myProj.dll)

事先感谢你

最佳回答

http://msdn.microsoft.com/en-us/library/a457089.aspx”rel=“nofollow” 页: 1

path = System.IO.Path.GetDirectoryName(
          System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);

• 实现《刑法》的原则:

string fullPath = System.Reflection.Assembly.GetAssembly(typeof(MyClass)).Location;
问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签