473,388 Members | 1,327 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

System.Configuration does not support config files for libraries.

<!-- 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
8 3136
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
3
by: Michael Bøcker-Larsen | last post by:
Hi I'v been stuck on this problem for ages now. I have found that I'm not the only one with this problem, by looking through the different newsgroups. Hope you can help me! I know there is a...
2
by: Alex Maghen | last post by:
I want to use the new System.Net.Mail instead of the old System.Web.Mail. I'm getting an error "Hot not specified" when I try to do my last two lines: System.Net.Mail.SmtpClient SMTP = new...
1
by: Sky | last post by:
Yesterday I was told that GetType(string) should not just be with a Type, but be Type, AssemblyName. Fair enough, get the reason. (Finally!). As long as it doesn't cause tech support problems...
0
by: metaperl | last post by:
A Comparison of Python Class Objects and Init Files for Program Configuration ============================================================================= Terrence Brannon bauhaus@metaperl.com...
0
by: CoderHead | last post by:
I understand what's happening, but not why. I hope somebody else can help me out. I wrote a class library - DataAccess. This library can be included in any type of application but for now is...
2
by: =?Utf-8?B?c2FtMDFt?= | last post by:
I have a remoting application that was developed on a Windows XP SP2 machine with VS2005 SP1. I finally got everything deployed using Wix 3.0, and it works great. Problem is, when I install the msi...
8
by: =?Utf-8?B?TWFuanJlZSBHYXJn?= | last post by:
Hi, I created a web service and hosted it in Windows Services. It is working fine. Now I am trying to implement the X509 certificates for message layer security. But it is throwing the following...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.