By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,953 Members | 1,489 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,953 IT Pros & Developers. It's quick & easy.

Dynamic URL (part deux)

P: n/a
I am trying to use dynamic URL and the app.config to specify the actuall url
of a web service. It isn't working. When using static URL there is no
problem.

The name of my application is DMS.exe. The DMS.Exe.Config file has the
following entry:

<add key="DMS.Oscar.wsCommon" value="http://Oscar/DMSDataWS/wsCommon.asmx"/>

The name of the server at the customer site is Oscar.

The url of the web service on my development server is:
"http://Mayor/DMSDataWS/wsCommon.asmx" and this is value of the url when it
is deployed.

What I am doing wrong?

wr
Nov 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

It will be helpful if you can show the code which you have used for
dynamically changing the webservice URL. And also what is exact issue you are
getting when doing so. Is it giving any error? I have tried the same and it
is working fine. Basically i generated a proxy class for the webservice and
mentioned the URL in the constructor of the proxy class. If you can provide
more details, it will be easy to solve the issue that you are getting.

regards,
Srimathi.

"WhiskyRomeo" wrote:
I am trying to use dynamic URL and the app.config to specify the actuall url
of a web service. It isn't working. When using static URL there is no
problem.

The name of my application is DMS.exe. The DMS.Exe.Config file has the
following entry:

<add key="DMS.Oscar.wsCommon" value="http://Oscar/DMSDataWS/wsCommon.asmx"/>

The name of the server at the customer site is Oscar.

The url of the web service on my development server is:
"http://Mayor/DMSDataWS/wsCommon.asmx" and this is value of the url when it
is deployed.

What I am doing wrong?

wr

Nov 23 '05 #2

P: n/a
Thanks for the response!

The only code used is when I instaniate an object of the web service:
Dim ws As New wsOrgEvent.wsOrgEvent
ws.Credentials = System.Net.CredentialCache.DefaultCredentials

If I have set the behavior to static URL, I add one more line:
ws.Url = "http:/Laser/DMSDataWS/wsOrgEvent.asmx"

If I have set the behavior to dynamic URL, I do no have the above line.

Either way, I then simply use the object in code like

DsLabFont_DDL1.Clear()
DsLabFont_DDL1.Merge(ws.LabFont_DDL(cmbLab.Text))

wrl

"Srimathi" wrote:
Hi,

It will be helpful if you can show the code which you have used for
dynamically changing the webservice URL. And also what is exact issue you are
getting when doing so. Is it giving any error? I have tried the same and it
is working fine. Basically i generated a proxy class for the webservice and
mentioned the URL in the constructor of the proxy class. If you can provide
more details, it will be easy to solve the issue that you are getting.

regards,
Srimathi.

"WhiskyRomeo" wrote:
I am trying to use dynamic URL and the app.config to specify the actuall url
of a web service. It isn't working. When using static URL there is no
problem.

The name of my application is DMS.exe. The DMS.Exe.Config file has the
following entry:

<add key="DMS.Oscar.wsCommon" value="http://Oscar/DMSDataWS/wsCommon.asmx"/>

The name of the server at the customer site is Oscar.

The url of the web service on my development server is:
"http://Mayor/DMSDataWS/wsCommon.asmx" and this is value of the url when it
is deployed.

What I am doing wrong?

wr

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.