Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

Location/name of config file

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 01-17-2007   #1 (permalink)
Mark Brouwers
Guest


 

Location/name of config file

HI,
I'm a newbie to WCF had heve following question.
What is the location of a config file. I've created an application that
references an other assembly that uses WCF. My application has a config file
application.exe.config and my referenced client has a client.dll.config. The
reference dll is a component that searches for articles in our DB. As soon
as I call new ArtikelServiceClient() I get an error (see below)
It look to me that it can't find the condig file. I copied the
client.ddl.config in the exe-directory, but no luck.
Is there a way to specift the location of my condig file (like in .net
remoting RemotingConfiguration.Configure)
Hope I made myself clear.

TIA
Mark

Here's the error :
System.InvalidOperationException was unhandled
Message="Could not find default endpoint element that references contract
'ClientArtikel.ws_Art.IArtikelService' in the ServiceModel client
configuration section. This might be because no configuration file was found
for your application, or because no endpoint element matching this contract
could be found in the client element."
Source="System.ServiceModel"
StackTrace:
at
System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint
serviceEndpoint, String configurationName)
at System.ServiceModel.ChannelFactory.ApplyConfiguration(String
configurationName)
at System.ServiceModel.ChannelFactory.InitializeEndpoint(String
configurationName, EndpointAddress address)
at System.ServiceModel.ChannelFactory`1..ctor(String
endpointConfigurationName, EndpointAddress remoteAddress)
at System.ServiceModel.ClientBase`1..ctor()
at ClientArtikel.ws_Art.ArtikelServiceClient..ctor() in
D:\_LPBS2005\CLIENT\Artikel\Service References\ws_Art.cs:line 1888
at ClientArtikel.ArtBas.Zoek_Artikelen(Int16 firma, String artikelnr,
String taal, LPBSTrace tr) in
D:\_LPBS2005\CLIENT\Artikel\Classes\ArtBas.cs:line 42
at GUIArtikel.frmArtikelen.SelBar_OnEindeSelectieEvent() in
D:\_LPBS2005\GUI\Artikel\Forms\Artikelen.cs:line 52
at GUIArtikel.frmArtikelSelectie.btnRefresh_Click(Object sender,
EventArgs e) in D:\_LPBS2005\GUI\Artikel\Forms\ArtikelSelectie.cs:line 29
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef
hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam,
IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd,
Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
at
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at LPBS.AppMain.Main(String[] args) in
D:\_LPBS2005\APP\LPBS\MAIN\Classes\AppMain.cs:line 229
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()



My System SpecsSystem Spec
Old 01-17-2007   #2 (permalink)
MobileMan
Guest


 

RE: Location/name of config file

The "app.config" file we use is located in the root of our hosting project in
Visual Studio (at the same level as Properties and References when looking at
the Solution Explorer). When you compile your app the values that are
contained in the app.config will get placed into the
"ApplicationName.exe.config" file for you automatically.

We have found some issues ... mostly dealing with Callback contracts using
1-way communication ... using WCF ServiceTypes in external DLLs. We
originally got everything working by having the interfaces (the Contracts)
and the implementing classes (the ServiceTypes) residing directly in our
application, and along with the "ABCs" - Address, Binding, Contracts"
settings in app.config. We then refactored our code and moved it into an
external "WCFLibrary" and most pieces work, but anything that uses a callback
contract quit working for reasons unknown.

Not sure about specifing a location for the app.config settings because
ultimatly they end up in your ApplicationName.exe.config to be used during
runtime.

Make sure that the fully qualified names are used in your configuratione
file for the contract attribute in the endpoint element (we also use it for
our name attribute in our service behaviorConfiguration elements too).

--
Stay Mobile


"Mark Brouwers" wrote:

> HI,
> I'm a newbie to WCF had heve following question.
> What is the location of a config file. I've created an application that
> references an other assembly that uses WCF. My application has a config file
> application.exe.config and my referenced client has a client.dll.config. The
> reference dll is a component that searches for articles in our DB. As soon
> as I call new ArtikelServiceClient() I get an error (see below)
> It look to me that it can't find the condig file. I copied the
> client.ddl.config in the exe-directory, but no luck.
> Is there a way to specift the location of my condig file (like in .net
> remoting RemotingConfiguration.Configure)
> Hope I made myself clear.
>
> TIA
> Mark
>
> Here's the error :
> System.InvalidOperationException was unhandled
> Message="Could not find default endpoint element that references contract
> 'ClientArtikel.ws_Art.IArtikelService' in the ServiceModel client
> configuration section. This might be because no configuration file was found
> for your application, or because no endpoint element matching this contract
> could be found in the client element."
> Source="System.ServiceModel"
> StackTrace:
> at
> System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint
> serviceEndpoint, String configurationName)
> at System.ServiceModel.ChannelFactory.ApplyConfiguration(String
> configurationName)
> at System.ServiceModel.ChannelFactory.InitializeEndpoint(String
> configurationName, EndpointAddress address)
> at System.ServiceModel.ChannelFactory`1..ctor(String
> endpointConfigurationName, EndpointAddress remoteAddress)
> at System.ServiceModel.ClientBase`1..ctor()
> at ClientArtikel.ws_Art.ArtikelServiceClient..ctor() in
> D:\_LPBS2005\CLIENT\Artikel\Service References\ws_Art.cs:line 1888
> at ClientArtikel.ArtBas.Zoek_Artikelen(Int16 firma, String artikelnr,
> String taal, LPBSTrace tr) in
> D:\_LPBS2005\CLIENT\Artikel\Classes\ArtBas.cs:line 42
> at GUIArtikel.frmArtikelen.SelBar_OnEindeSelectieEvent() in
> D:\_LPBS2005\GUI\Artikel\Forms\Artikelen.cs:line 52
> at GUIArtikel.frmArtikelSelectie.btnRefresh_Click(Object sender,
> EventArgs e) in D:\_LPBS2005\GUI\Artikel\Forms\ArtikelSelectie.cs:line 29
> at System.Windows.Forms.Control.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnClick(EventArgs e)
> at System.Windows.Forms.Button.WndProc(Message& m)
> at
> System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
> m)
> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
> Int32 msg, IntPtr wparam, IntPtr lparam)
> at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef
> hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
> at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam,
> IntPtr lparam)
> at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd,
> Message& m)
> at System.Windows.Forms.Control.WmCommand(Message& m)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
> at System.Windows.Forms.ContainerControl.WndProc(Message& m)
> at System.Windows.Forms.Form.WndProc(Message& m)
> at
> System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
> m)
> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
> Int32 msg, IntPtr wparam, IntPtr lparam)
> at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr
> wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
> at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
> at System.Windows.Forms.Control.DefWndProc(Message& m)
> at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
> button, Int32 clicks)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ButtonBase.WndProc(Message& m)
> at System.Windows.Forms.Button.WndProc(Message& m)
> at
> System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
> m)
> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
> Int32 msg, IntPtr wparam, IntPtr lparam)
> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
> msg)
> at
> System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
> dwComponentID, Int32 reason, Int32 pvLoopData)
> at
> System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
> reason, ApplicationContext context)
> at
> System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
> ApplicationContext context)
> at System.Windows.Forms.Application.Run(Form mainForm)
> at LPBS.AppMain.Main(String[] args) in
> D:\_LPBS2005\APP\LPBS\MAIN\Classes\AppMain.cs:line 229
> at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
> args)
> at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
> assemblySecurity, String[] args)
> at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
> at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
> at System.Threading.ExecutionContext.Run(ExecutionContext
> executionContext, ContextCallback callback, Object state)
> at System.Threading.ThreadHelper.ThreadStart()
>
>
>

My System SpecsSystem Spec
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
config file problems Neil Chambers PowerShell 6 08-05-2008 04:37 PM
Read config file sylan PowerShell 3 07-10-2008 07:09 AM
what is the web.config file? geotso Vista General 6 11-04-2006 04:42 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51