By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,873 Members | 1,040 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,873 IT Pros & Developers. It's quick & easy.

System.Configuration does not support config files for libraries.

P: n/a
<!-- When deploying the service library project, the content of the
config file must be added to the host's app.config file.
System.Configuration does not support config files for libraries. -->

I assume "libraries" here to mean DLL's. If that's the case, is there
any way to supply both ends of a service (client and host) with the code
for the class that describes the contact WITHOUT a duplication in
source code?

Thanks.
Nov 8 '08 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Bill,

I assume you are referring to WCF given the nature of your previous
post.

Assuming that, you are confusing the config file (which is just an XML
file with config info) with the assembly itself (the DLL). You can easily
distribute a DLL to both sides (client and server). It's the config file
you can't share (well, in WCF's case, you actually could assuming you had no
clients in the service, and no other services in the client).

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Bill McCormick" <wp*********@newsgroup.nospamwrote in message
news:eg****************@TK2MSFTNGP03.phx.gbl...
<!-- When deploying the service library project, the content of the
config file must be added to the host's app.config file.
System.Configuration does not support config files for libraries. -->

I assume "libraries" here to mean DLL's. If that's the case, is there
any way to supply both ends of a service (client and host) with the code
for the class that describes the contact WITHOUT a duplication in
source code?

Thanks.
Nov 8 '08 #2

P: n/a
Nicholas Paldino [.NET/C# MVP] wrote:
Bill,

I assume you are referring to WCF given the nature of your previous
post.

Assuming that, you are confusing the config file (which is just an
XML file with config info) with the assembly itself (the DLL). You can
easily distribute a DLL to both sides (client and server). It's the
config file you can't share (well, in WCF's case, you actually could
assuming you had no clients in the service, and no other services in the
client).
Well, I'm referring to WCF in general. Thanks you.
Nov 8 '08 #3

P: n/a
Hi Bill,

Seems what you want to do is sharing some custom classes/types (defined in
a class library) between the WCF service and client application. For WCF
there is type sharing support. Here are two artifcles which has mentioned
some information on this;

#Type sharing in WCF service reference
http://blogs.msdn.com/lifenglu/archi...-in-wcf-servic
e-reference.aspx

#Sharing WCF Collection Types between Service and Client
http://www.codeproject.com/KB/WCF/WC...peSharing.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from

the community or a Microsoft Support Engineer within 2 business day is
acceptable. Please note that

each follow up response may take approximately 2 business days as the
support professional working

with you may need further investigation to reach the most efficient
resolution. The offering is not

appropriate for situations that require urgent, real-time or phone-based
interactions. Issues of this

nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft

Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: Bill McCormick <wp*********@newsgroup.nospam>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Subject: Re: System.Configuration does not support config files for
libraries.
>References: <eg**************@TK2MSFTNGP03.phx.gbl>
<23**********************************@microsoft.co m>
>
Nicholas Paldino [.NET/C# MVP] wrote:
>Bill,

I assume you are referring to WCF given the nature of your previous
post.

Assuming that, you are confusing the config file (which is just an
XML file with config info) with the assembly itself (the DLL). You can
easily distribute a DLL to both sides (client and server). It's the
config file you can't share (well, in WCF's case, you actually could
assuming you had no clients in the service, and no other services in the
client).
Well, I'm referring to WCF in general. Thanks you.
Nov 10 '08 #4

P: n/a
Steven Cheng wrote:
Hi Bill,

Seems what you want to do is sharing some custom classes/types (defined in
a class library) between the WCF service and client application. For WCF
there is type sharing support. Here are two artifcles which has mentioned
some information on this;

#Type sharing in WCF service reference
http://blogs.msdn.com/lifenglu/archi...-in-wcf-servic
e-reference.aspx

#Sharing WCF Collection Types between Service and Client
http://www.codeproject.com/KB/WCF/WC...peSharing.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from

the community or a Microsoft Support Engineer within 2 business day is
acceptable. Please note that

each follow up response may take approximately 2 business days as the
support professional working

with you may need further investigation to reach the most efficient
resolution. The offering is not

appropriate for situations that require urgent, real-time or phone-based
interactions. Issues of this

nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft

Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: Bill McCormick <wp*********@newsgroup.nospam>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Subject: Re: System.Configuration does not support config files for
libraries.
>References: <eg**************@TK2MSFTNGP03.phx.gbl>
<23**********************************@microsoft.co m>
>Nicholas Paldino [.NET/C# MVP] wrote:
>>Bill,

I assume you are referring to WCF given the nature of your previous
post.

Assuming that, you are confusing the config file (which is just an
XML file with config info) with the assembly itself (the DLL). You can
easily distribute a DLL to both sides (client and server). It's the
config file you can't share (well, in WCF's case, you actually could
assuming you had no clients in the service, and no other services in the
client).
Well, I'm referring to WCF in general. Thanks you.
Thanks Steven. I think that is indeed for what I'm looking. However, I
expected this to be a little more trivial that it appears to be.

I guess I'm now left with two nagging questions:

1. Why is type sharing frowned upon?

2. How can a client app be written, using intellisense, without type
sharing?
Thanks,

Bill
Nov 10 '08 #5

P: n/a
Thanks for your reply Bill,

As for the sharing type functionality, it is done by the WCF client proxy
generation process. As mentioned in the articles, the command svcutil.exe
can help do it via a command line option. While in Visual studio IDE, when
"Add service reference", you can click "Advanced" button to find the
sharing type option. So far this is the most interactive friendly means I
have found.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: ms****@microsoft.com.

--------------------
>From: Bill McCormick <wp*********@newsgroup.nospam>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: Steven Cheng <st*****@online.microsoft.com>
Subject: Re: System.Configuration does not support config files for
libraries.
>
Steven Cheng wrote:
>Hi Bill,

Seems what you want to do is sharing some custom classes/types (defined
in
>a class library) between the WCF service and client application. For WCF
there is type sharing support. Here are two artifcles which has
mentioned
>some information on this;

#Type sharing in WCF service reference
http://blogs.msdn.com/lifenglu/archi...-in-wcf-servic
>e-reference.aspx

#Sharing WCF Collection Types between Service and Client
http://www.codeproject.com/KB/WCF/WC...peSharing.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my
manager
>at: ms****@microsoft.com.

================================================= =
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subs...#notifications.
>>
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from

the community or a Microsoft Support Engineer within 2 business day is
acceptable. Please note that

each follow up response may take approximately 2 business days as the
support professional working

with you may need further investigation to reach the most efficient
resolution. The offering is not

appropriate for situations that require urgent, real-time or phone-based
interactions. Issues of this

nature are best handled working with a dedicated Microsoft Support
Engineer
>by contacting Microsoft

Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
================================================= =
This posting is provided "AS IS" with no warranties, and confers no
rights.
>>
Nov 11 '08 #6

P: n/a
Steven Cheng wrote:
Thanks for your reply Bill,

As for the sharing type functionality, it is done by the WCF client proxy
generation process. As mentioned in the articles, the command svcutil.exe
can help do it via a command line option. While in Visual studio IDE, when
"Add service reference", you can click "Advanced" button to find the
sharing type option. So far this is the most interactive friendly means I
have found.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Thanks Steven, but I'm not sure if that really answers my questions:

1. What is the *argument* against type sharing?

2. What are the *alternatives* to type sharing?

However, I am happy to know that there's a "pointy-clicky" way to
generate a client proxy. But that leads me to an extension of my 2nd
question:

2a. Is a "client proxy" strictly required for type sharing?
Bill
Nov 11 '08 #7

P: n/a
Thanks for your reply Bill,

As you mentioned in first message that you want to reuse the same set of
custom classes(will be used as parameter or return value of WCF service
operation), then I suggest you the "sharing type" feature of WCF. That's
the means which can help you make the client generated WCF proxy reference
the existing classes (in the specified assembly) instead generate a new
copy of delegate classes.

For WCF service, using "client proxy" is the most convenient means to
consume service methods. If you do not use them, you'll need to manually
write the code to call the WCF service(is this what you want?).

#Connect to WCF Service Without Proxy
http://geeks.netindonesia.net/blogs/...12/11/connect-
to-wcf-service-without-proxy.aspx

http://www.clariusconsulting.net/blo...08/07/639.aspx

For that case, I think you can try directly use the shared classes in class
library assembly directly(since there is no pregenerated proxy classes).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: ms****@microsoft.com.
--------------------
>From: Bill McCormick <wp*********@newsgroup.nospam>
To: Steven Cheng <st*****@online.microsoft.com>
Subject: Re: System.Configuration does not support config files for
libraries.
>
Steven Cheng wrote:
>Thanks for your reply Bill,

As for the sharing type functionality, it is done by the WCF client
proxy
>generation process. As mentioned in the articles, the command
svcutil.exe
>can help do it via a command line option. While in Visual studio IDE,
when
>"Add service reference", you can click "Advanced" button to find the
sharing type option. So far this is the most interactive friendly means
I
>have found.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Thanks Steven, but I'm not sure if that really answers my questions:

1. What is the *argument* against type sharing?

2. What are the *alternatives* to type sharing?

However, I am happy to know that there's a "pointy-clicky" way to
generate a client proxy. But that leads me to an extension of my 2nd
question:

2a. Is a "client proxy" strictly required for type sharing?
Bill
Nov 12 '08 #8

P: n/a
OK. I think it's starting to sink in. I'm going to end this thread since
the topic is now starting to converge with the WCF Advice thread I have
on going. If you would, please join me there.

Thanks,

Bill

Steven Cheng wrote:
Thanks for your reply Bill,

As you mentioned in first message that you want to reuse the same set of
custom classes(will be used as parameter or return value of WCF service
operation), then I suggest you the "sharing type" feature of WCF. That's
the means which can help you make the client generated WCF proxy reference
the existing classes (in the specified assembly) instead generate a new
copy of delegate classes.

For WCF service, using "client proxy" is the most convenient means to
consume service methods. If you do not use them, you'll need to manually
write the code to call the WCF service(is this what you want?).

#Connect to WCF Service Without Proxy
http://geeks.netindonesia.net/blogs/...12/11/connect-
to-wcf-service-without-proxy.aspx

http://www.clariusconsulting.net/blo...08/07/639.aspx

For that case, I think you can try directly use the shared classes in class
library assembly directly(since there is no pregenerated proxy classes).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: ms****@microsoft.com.
--------------------
>From: Bill McCormick <wp*********@newsgroup.nospam>
To: Steven Cheng <st*****@online.microsoft.com>
Subject: Re: System.Configuration does not support config files for
libraries.
>Steven Cheng wrote:
>>Thanks for your reply Bill,

As for the sharing type functionality, it is done by the WCF client
proxy
>>generation process. As mentioned in the articles, the command
svcutil.exe
>>can help do it via a command line option. While in Visual studio IDE,
when
>>"Add service reference", you can click "Advanced" button to find the
sharing type option. So far this is the most interactive friendly means
I
>>have found.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Thanks Steven, but I'm not sure if that really answers my questions:

1. What is the *argument* against type sharing?

2. What are the *alternatives* to type sharing?

However, I am happy to know that there's a "pointy-clicky" way to
generate a client proxy. But that leads me to an extension of my 2nd
question:

2a. Is a "client proxy" strictly required for type sharing?
Bill
Nov 12 '08 #9

This discussion thread is closed

Replies have been disabled for this discussion.