Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / July 2003

Tip: Looking for answers? Try searching our database.

ASP.Net app, Class Library and Web Service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe Reazor - 23 Jul 2003 19:46 GMT
I have an ASP.Net application that uses some Class Libraries (dll's) that I
created separately.  One of these dll's connects to a Web Service.  I
created the Web Reference to my web service and doing so creates my
App.Config file.  I thought I would then be able to use the config file to
specify where the Web Service existed to connect to. The problem is that I
found out that Class Libraries (dll's) don't have their own config files,
they must use the config files of their containing app.  In this case its a
web app.  So I try adding the appropriate settings in the Web.Config file
hoping that it would be picked up by my dll, but no luck.  Is there
something I am missing?  Is this possible in the standard method that
everyone says to use, is there some other way, or am I screwed and I will be
stuck recompiling my dll every time I want to change the host of the web
service.

TIA for any help.

==============
Joe Reazor
Gorbel Inc.
email: joereaATgorbelDOTcom
Dino Chiesa [MSFT] - 23 Jul 2003 20:49 GMT
settings within web.config should be retrievable from your DLL ;
I do this and it works for me.

do you use System.Configuration.ConfigurationSettings.AppSettings??

What is the problem you are seeing?

> I have an ASP.Net application that uses some Class Libraries (dll's) that I
> created separately.  One of these dll's connects to a Web Service.  I
[quoted text clipped - 16 lines]
> Gorbel Inc.
> email: joereaATgorbelDOTcom
Joe Reazor - 24 Jul 2003 13:25 GMT
I'll give that a try.  In the examples I had seen it looked like an
application that was using a Web Service would automatically read the web
service's location from the config file.  I didn't think there was anything
else I needed to do other than to add the web reference and keep the config
file with my app.  So with a web app I need to do the extra step to read
from the configuration settings and set the URL of the web service object.
Maybe I would need to do this with a regular executable, but I didn't think
so.  That's why I was getting confused.

==============
Joe Reazor
Gorbel Inc.
email: joereaATgorbelDOTcom

> settings within web.config should be retrievable from your DLL ;
> I do this and it works for me.
[quoted text clipped - 26 lines]
> > Gorbel Inc.
> > email: joereaATgorbelDOTcom

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.