473,320 Members | 1,947 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,320 software developers and data experts.

.DLL web-service client dynamic configuration uses wrong config fi

All,

I have a web service client written in VB.NET. It is a class library
assembly (.dll file). I made a web reference to a web service and set it to
be dynamic, so it puts the URL of the web-reference in the application
configuration file (app.config)

However, at runtime, the code in the DLL thinks that the config file is the
config file of the .exe calling it. It obviously does not contain my web
reference. Here is my proxy constructor:
Public Sub New()
MyBase.New()

System.Windows.Forms.MessageBox.Show(AppDomain.Cur rentDomain.SetupInformation.ConfigurationFile)
Dim urlSetting As String =
System.Configuration.ConfigurationSettings.AppSett ings("DisplayDocumentCommand.remoteDocMgr.DBGatewa y")
If (Not (urlSetting) Is Nothing) Then
Me.Url = String.Concat(urlSetting, "")
Else
Me.Url = "http://localhost/LookupService/LookupService.asmx"
End If
End Sub

Me.URL is always my localhost test environment because the URL is always
nothing because the ConfigurationFile is the .exe config file, not the .dll
config file. I cannot find a way to configure it to point anywhere else
without recompiling or manually editing this code. I cannot add the web
reference to the .exe config file

What is the proper way for a .dll to call a web-service with the endpoint
declared externally?

Is there a trick to renaming the AppDomain config file? Can I do it in some
static code when the class is loaded, before the constructor is run?

I have tried to reset the configuration file in the constructor of the
library object but by that time AppDomain will not let me alter the value of
anything in it's Settings.

Brad


Nov 21 '05 #1
0 3506

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phillip J. Eby | last post by:
PEP: 333 Title: Python Web Server Gateway Interface v1.0 Version: $Revision: 1.1 $ Last-Modified: $Date: 2004/08/27 17:30:09 $ Author: Phillip J. Eby <pje at telecommunity.com> Discussions-To:...
25
by: John Morgan | last post by:
Though I have designed and implemented a number of large reasonably well received web sites I do not consider myself a graphics designer I am now for the first time going to work with a ...
4
by: Trond A. S. Andersen | last post by:
Hi, all! I'm trying to use the System.Web.Mail. "package" combinded with System.Web.Mail.SmtpMail in order to send MS Excel spreadsheets attached to mail messages. However, sending one single...
5
by: martin | last post by:
Hi, I have created a class that is totally seperate from my web application. However this class is used extensivly by the web application for stuff like data access. I wish to add a function to...
5
by: bclegg | last post by:
Hi, I am a web newbie writing my first intranet web site using Webforms. I remember when playing with Interdev it was possible to get a canned style for your site, 'raygun' comes to mind. Is...
0
by: Erick Lopez | last post by:
When I send my web page to browser in ouput windows recibe this message and the web page the error BC32400 Please Help me Auto-attach to process ' aspnet_wp.exe' on machine 'TABLET'...
5
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
0
by: pd123 | last post by:
I'm new to C# and .net and I'm trying to create a form that will register users in a sql server database. I have the following code but when I run the code I get an error " The name 'Peter' is...
7
by: Jonas | last post by:
Hi. I'm trying to develop a web custom control that uses a programmatically created treeview. My problem is that I get an exception when I try to render the control. With properties do I have to...
5
by: Carl Gilbert | last post by:
Hi I have implemented the ASP.NET Club Site Starter Kit on my 1&1 web space. I have recently been getting some errors where the page doesn't load and just comes up blank. I have put a handler...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.