dynamic url from a component

J

Josef Wainz

i've searched this newsgroup as well as the aspnet newsgroup without
an answer to this question.

i call a web service from a component. i specify dynamic url, but
there isn't an app.config or web.config file for the component. so
there isn't a place for the appsettings entry to be made. is it
possible to use a dynamic url web service from a component. if so,
how?
 
D

Dino Chiesa [Microsoft]

if the component is running within ASP.NET, then it gets its config info
from web.config.

If the component is running in some other container (eg, it is used within a
Winforms EXE), then it gets its config from Exename.exe.config
where exename is replaced by the root name of the exe.

If it is running in COM+, then it gets it from dllhost.exe.config.

etc.

Also see this useful article:
http://staff.develop.com/candera/we...stConfigurationSectionHandlerIllEverNeed.html

This can be useful for both ASP.NET and non-ASP.NET (eg Winforms) apps.

-D
 
J

Josef Wainz

thanks dino,

i added <add key="FocusHOPE.MissionStatement.ExcelHelper"
value="http://CAT/ExcelHelper/ExcelHelper.asmx"/> to my web.config
file and it works.

the hard part was getting the right syntax. what i read stated that
changing the URL Behaviour property to Dynamic would automatically
create this entry in the .config file. it didn't because the web
reference was in a component. once you indicated that the component
will get it's config info from it's container, i created a simple
asp.net project, set the web reference, changed the url behaviour to
dynamic, copied it from the web.config file into my real web.config
file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top