Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > ASP.Net app, Class Library and Web Service

Reply
Thread Tools

ASP.Net app, Class Library and Web Service

 
 
Joe Reazor
Guest
Posts: n/a
 
      07-23-2003
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


 
Reply With Quote
 
 
 
 
Dino Chiesa [MSFT]
Guest
Posts: n/a
 
      07-23-2003
settings within web.config should be retrievable from your DLL ;
I do this and it works for me.

do you use System.Configuration.ConfigurationSettings.AppSett ings??

What is the problem you are seeing?


"Joe Reazor" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Joe Reazor
Guest
Posts: n/a
 
      07-24-2003
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

"Dino Chiesa [MSFT]" <(E-Mail Removed)> wrote in message
news:#$(E-Mail Removed)...
> settings within web.config should be retrievable from your DLL ;
> I do this and it works for me.
>
> do you use System.Configuration.ConfigurationSettings.AppSett ings??
>
> What is the problem you are seeing?
>
>
> "Joe Reazor" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
Web Application, Web Service, Class Libraries, and StrongNameIdentityPermissionAttribute Class Mythran ASP .Net 1 08-23-2005 11:17 PM
Re: Difference between Web Control Library and Class Library Alan Ferrandiz [MCT] ASP .Net 0 09-11-2004 01:51 PM
Re: Difference between Web Control Library and Class Library Mythran ASP .Net 0 08-24-2004 05:53 PM



Advertisments