Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Dynamic URL Failure

Reply
Thread Tools

Dynamic URL Failure

 
 
WhiskyRomeo
Guest
Posts: n/a
 
      02-25-2005
I have an solution with several projects which call a web service for the
data retrieval and updates.

The main program is called DMS.exe. When I configure the webservice to use
Dynamic URL and create entries in the app.config file of the following
format, the application can't find the webservice. Static works fine but I
have to set the url in code in every place a webservice is used.

<appSettings>
<add key="myApplication.myServer.Service1"
value="http://myServer/myXmlWebService/Service1.asmx"/>
</appSettings>

So given:

application name is DMS,
the web service project is called DMSDataWS,
the server is LASER,
the physcial path on the server is:\InetPub\wwwroot\DMSDataWS\wsCommon.asmx,
the virtual folder is named DMSDATAWS (under DefaultWebSite)
the service is name wsCommon.asmx

What should the entry look like? The following does not work.

<appSettings>
<add key="DMS.Laser.wsCommon.asmx"
value="http://LASER/DMSDATA/wsCommon.asmx"/>
</appSettings>

--
wr
 
Reply With Quote
 
 
 
 
Dan Rogers
Guest
Posts: n/a
 
      03-08-2005
You should set the URL setting to be the URL of the service asmx entry
point. So if it is on a server named laser, it would start with
http://laser/....

Try debugging your application - are you sure you are getting the string in
your config file correctly and then using that to set the proxy URL
setting? You really only have to do this at the place you create your
proxy each time. If you can use a local string resource with the right URL
and that works, you can prove whether or not the string you need is coming
from the config file.

Something to be careful of is the \ character - make sure that you account
for it as the escape operator in any local strings (so you would have
"http:\\\\laser\\foo.asmx"

--------------------
>Thread-Topic: Dynamic URL Failure
>thread-index: AcUbWjBNICQRk6LrSNKJqbCFhha7zQ==
>X-WBNR-Posting-Host: 65.27.6.160
>From: "=?Utf-8?B?V2hpc2t5Um9tZW8=?="

<(E-Mail Removed)>
>Subject: Dynamic URL Failure
>Date: Fri, 25 Feb 2005 08:51:02 -0800
>Lines: 31
>Message-ID: <(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:28301
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>I have an solution with several projects which call a web service for the
>data retrieval and updates.
>
>The main program is called DMS.exe. When I configure the webservice to

use
>Dynamic URL and create entries in the app.config file of the following
>format, the application can't find the webservice. Static works fine but

I
>have to set the url in code in every place a webservice is used.
>
><appSettings>
> <add key="myApplication.myServer.Service1"
> value="http://myServer/myXmlWebService/Service1.asmx"/>
></appSettings>
>
>So given:
>
>application name is DMS,
>the web service project is called DMSDataWS,
>the server is LASER,
>the physcial path on the server

is:\InetPub\wwwroot\DMSDataWS\wsCommon.asmx,
>the virtual folder is named DMSDATAWS (under DefaultWebSite)
>the service is name wsCommon.asmx
>
>What should the entry look like? The following does not work.
>
><appSettings>
> <add key="DMS.Laser.wsCommon.asmx"
>value="http://LASER/DMSDATA/wsCommon.asmx"/>
></appSettings>
>
>--
>wr
>


 
Reply With Quote
 
 
 
 
WhiskyRomeo
Guest
Posts: n/a
 
      03-08-2005
Thanks for the reply . . .

When debugging it is obvious the URL did not come from the config file. But
what I don't know is -- did it fail because it couldn't find the key it was
looking for or what?

So my question remains what does the key look like so the lookup will
suceed? The URL I am using is correct because when I use the static mode, it
works correctly.

I can move it to the production server and set the URL each time I form the
proxy and it works fine. However, I don't want to have to go through code
and change it everytime I deploy to a different server.

I have another way to accomplish this, by I don't understand what is failing
with they dynamic URL route.

WR

"Dan Rogers" wrote:

> You should set the URL setting to be the URL of the service asmx entry
> point. So if it is on a server named laser, it would start with
> http://laser/....
>
> Try debugging your application - are you sure you are getting the string in
> your config file correctly and then using that to set the proxy URL
> setting? You really only have to do this at the place you create your
> proxy each time. If you can use a local string resource with the right URL
> and that works, you can prove whether or not the string you need is coming
> from the config file.
>
> Something to be careful of is the \ character - make sure that you account
> for it as the escape operator in any local strings (so you would have
> "http:\\\\laser\\foo.asmx"
>
> --------------------
> >Thread-Topic: Dynamic URL Failure
> >thread-index: AcUbWjBNICQRk6LrSNKJqbCFhha7zQ==
> >X-WBNR-Posting-Host: 65.27.6.160
> >From: "=?Utf-8?B?V2hpc2t5Um9tZW8=?="

> <(E-Mail Removed)>
> >Subject: Dynamic URL Failure
> >Date: Fri, 25 Feb 2005 08:51:02 -0800
> >Lines: 31
> >Message-ID: <(E-Mail Removed)>
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 7bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >Path: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
> >Xref: TK2MSFTNGXA02.phx.gbl

> microsoft.public.dotnet.framework.aspnet.webservic es:28301
> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >
> >I have an solution with several projects which call a web service for the
> >data retrieval and updates.
> >
> >The main program is called DMS.exe. When I configure the webservice to

> use
> >Dynamic URL and create entries in the app.config file of the following
> >format, the application can't find the webservice. Static works fine but

> I
> >have to set the url in code in every place a webservice is used.
> >
> ><appSettings>
> > <add key="myApplication.myServer.Service1"
> > value="http://myServer/myXmlWebService/Service1.asmx"/>
> ></appSettings>
> >
> >So given:
> >
> >application name is DMS,
> >the web service project is called DMSDataWS,
> >the server is LASER,
> >the physcial path on the server

> is:\InetPub\wwwroot\DMSDataWS\wsCommon.asmx,
> >the virtual folder is named DMSDATAWS (under DefaultWebSite)
> >the service is name wsCommon.asmx
> >
> >What should the entry look like? The following does not work.
> >
> ><appSettings>
> > <add key="DMS.Laser.wsCommon.asmx"
> >value="http://LASER/DMSDATA/wsCommon.asmx"/>
> ></appSettings>
> >
> >--
> >wr
> >

>
>

 
Reply With Quote
 
Dan Rogers
Guest
Posts: n/a
 
      03-08-2005
I think the problem is going to be in the code you use to get your
appsettings. If you don't specify a match on key name, you won't get the
data you want. What I'm suggesting is you debug your logic with
breakpoints so you can see what and when (or if) your code that gets the
appsettings is even accessed. You do have code that asks for the specific
app-setting don't you? There is no automatic app setting mapping done for
you to get a connection string.

--------------------
>Thread-Topic: Dynamic URL Failure
>thread-index: AcUj8rmKH5JcQEuXQaOmN2jbeWIMtQ==
>X-WBNR-Posting-Host: 65.27.6.160
>From: "=?Utf-8?B?V2hpc2t5Um9tZW8=?="

<(E-Mail Removed)>
>References: <(E-Mail Removed)>

<(E-Mail Removed)>
>Subject: RE: Dynamic URL Failure
>Date: Tue, 8 Mar 2005 07:23:05 -0800
>Lines: 99
>Message-ID: <(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:28492
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>Thanks for the reply . . .
>
>When debugging it is obvious the URL did not come from the config file.

But
>what I don't know is -- did it fail because it couldn't find the key it

was
>looking for or what?
>
>So my question remains what does the key look like so the lookup will
>suceed? The URL I am using is correct because when I use the static mode,

it
>works correctly.
>
>I can move it to the production server and set the URL each time I form

the
>proxy and it works fine. However, I don't want to have to go through code
>and change it everytime I deploy to a different server.
>
>I have another way to accomplish this, by I don't understand what is

failing
>with they dynamic URL route.
>
>WR
>
>"Dan Rogers" wrote:
>
>> You should set the URL setting to be the URL of the service asmx entry
>> point. So if it is on a server named laser, it would start with
>> http://laser/....
>>
>> Try debugging your application - are you sure you are getting the string

in
>> your config file correctly and then using that to set the proxy URL
>> setting? You really only have to do this at the place you create your
>> proxy each time. If you can use a local string resource with the right

URL
>> and that works, you can prove whether or not the string you need is

coming
>> from the config file.
>>
>> Something to be careful of is the \ character - make sure that you

account
>> for it as the escape operator in any local strings (so you would have
>> "http:\\\\laser\\foo.asmx"
>>
>> --------------------
>> >Thread-Topic: Dynamic URL Failure
>> >thread-index: AcUbWjBNICQRk6LrSNKJqbCFhha7zQ==
>> >X-WBNR-Posting-Host: 65.27.6.160
>> >From: "=?Utf-8?B?V2hpc2t5Um9tZW8=?="

>> <(E-Mail Removed)>
>> >Subject: Dynamic URL Failure
>> >Date: Fri, 25 Feb 2005 08:51:02 -0800
>> >Lines: 31
>> >Message-ID: <(E-Mail Removed)>
>> >MIME-Version: 1.0
>> >Content-Type: text/plain;
>> > charset="Utf-8"
>> >Content-Transfer-Encoding: 7bit
>> >X-Newsreader: Microsoft CDO for Windows 2000
>> >Content-Class: urn:content-classes:message
>> >Importance: normal
>> >Priority: normal
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>> >Path: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
>> >Xref: TK2MSFTNGXA02.phx.gbl

>> microsoft.public.dotnet.framework.aspnet.webservic es:28301
>> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>> >
>> >I have an solution with several projects which call a web service for

the
>> >data retrieval and updates.
>> >
>> >The main program is called DMS.exe. When I configure the webservice to

>> use
>> >Dynamic URL and create entries in the app.config file of the following
>> >format, the application can't find the webservice. Static works fine

but
>> I
>> >have to set the url in code in every place a webservice is used.
>> >
>> ><appSettings>
>> > <add key="myApplication.myServer.Service1"
>> > value="http://myServer/myXmlWebService/Service1.asmx"/>
>> ></appSettings>
>> >
>> >So given:
>> >
>> >application name is DMS,
>> >the web service project is called DMSDataWS,
>> >the server is LASER,
>> >the physcial path on the server

>> is:\InetPub\wwwroot\DMSDataWS\wsCommon.asmx,
>> >the virtual folder is named DMSDATAWS (under DefaultWebSite)
>> >the service is name wsCommon.asmx
>> >
>> >What should the entry look like? The following does not work.
>> >
>> ><appSettings>
>> > <add key="DMS.Laser.wsCommon.asmx"
>> >value="http://LASER/DMSDATA/wsCommon.asmx"/>
>> ></appSettings>
>> >
>> >--
>> >wr
>> >

>>
>>

>


 
Reply With Quote
 
WhiskyRomeo
Guest
Posts: n/a
 
      03-08-2005
The article on which I am basing my question is:

Redirecting an Application to Target a Different XML Web Service During
Installation

I found it by searching VS Help using "Dynamic URL."

This article implies -- simply putting a key:value entry in the appconfig
file of the form I listed in my original question and changing the URL
Behaviour to Dynamic is all that is needed. They go on to specify a custom
installer class, so that a user can input the name of the server and service.
This used to modify the key:value entry in the appconfig during
installation. I am not doing this, I am simply modifying the appconfig file
before generating the install files.

In otherwords, when the URL Behaviour is Dynamic, the application knows to
look in the appconfig for the key --> MyWebApp.localhost.Service1

In this case, there is no other code at runtime being used to access the
appconfig file to set the URL.

"Dan Rogers" wrote:

> I think the problem is going to be in the code you use to get your
> appsettings. If you don't specify a match on key name, you won't get the
> data you want. What I'm suggesting is you debug your logic with
> breakpoints so you can see what and when (or if) your code that gets the
> appsettings is even accessed. You do have code that asks for the specific
> app-setting don't you? There is no automatic app setting mapping done for
> you to get a connection string.
>
> --------------------
> >Thread-Topic: Dynamic URL Failure
> >thread-index: AcUj8rmKH5JcQEuXQaOmN2jbeWIMtQ==
> >X-WBNR-Posting-Host: 65.27.6.160
> >From: "=?Utf-8?B?V2hpc2t5Um9tZW8=?="

> <(E-Mail Removed)>
> >References: <(E-Mail Removed)>

> <(E-Mail Removed)>
> >Subject: RE: Dynamic URL Failure
> >Date: Tue, 8 Mar 2005 07:23:05 -0800
> >Lines: 99
> >Message-ID: <(E-Mail Removed)>
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 7bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
> >Xref: TK2MSFTNGXA02.phx.gbl

> microsoft.public.dotnet.framework.aspnet.webservic es:28492
> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >
> >Thanks for the reply . . .
> >
> >When debugging it is obvious the URL did not come from the config file.

> But
> >what I don't know is -- did it fail because it couldn't find the key it

> was
> >looking for or what?
> >
> >So my question remains what does the key look like so the lookup will
> >suceed? The URL I am using is correct because when I use the static mode,

> it
> >works correctly.
> >
> >I can move it to the production server and set the URL each time I form

> the
> >proxy and it works fine. However, I don't want to have to go through code
> >and change it everytime I deploy to a different server.
> >
> >I have another way to accomplish this, by I don't understand what is

> failing
> >with they dynamic URL route.
> >
> >WR
> >
> >"Dan Rogers" wrote:
> >
> >> You should set the URL setting to be the URL of the service asmx entry
> >> point. So if it is on a server named laser, it would start with
> >> http://laser/....
> >>
> >> Try debugging your application - are you sure you are getting the string

> in
> >> your config file correctly and then using that to set the proxy URL
> >> setting? You really only have to do this at the place you create your
> >> proxy each time. If you can use a local string resource with the right

> URL
> >> and that works, you can prove whether or not the string you need is

> coming
> >> from the config file.
> >>
> >> Something to be careful of is the \ character - make sure that you

> account
> >> for it as the escape operator in any local strings (so you would have
> >> "http:\\\\laser\\foo.asmx"
> >>
> >> --------------------
> >> >Thread-Topic: Dynamic URL Failure
> >> >thread-index: AcUbWjBNICQRk6LrSNKJqbCFhha7zQ==
> >> >X-WBNR-Posting-Host: 65.27.6.160
> >> >From: "=?Utf-8?B?V2hpc2t5Um9tZW8=?="
> >> <(E-Mail Removed)>
> >> >Subject: Dynamic URL Failure
> >> >Date: Fri, 25 Feb 2005 08:51:02 -0800
> >> >Lines: 31
> >> >Message-ID: <(E-Mail Removed)>
> >> >MIME-Version: 1.0
> >> >Content-Type: text/plain;
> >> > charset="Utf-8"
> >> >Content-Transfer-Encoding: 7bit
> >> >X-Newsreader: Microsoft CDO for Windows 2000
> >> >Content-Class: urn:content-classes:message
> >> >Importance: normal
> >> >Priority: normal
> >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >> >Path: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
> >> >Xref: TK2MSFTNGXA02.phx.gbl
> >> microsoft.public.dotnet.framework.aspnet.webservic es:28301
> >> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >> >
> >> >I have an solution with several projects which call a web service for

> the
> >> >data retrieval and updates.
> >> >
> >> >The main program is called DMS.exe. When I configure the webservice to
> >> use
> >> >Dynamic URL and create entries in the app.config file of the following
> >> >format, the application can't find the webservice. Static works fine

> but
> >> I
> >> >have to set the url in code in every place a webservice is used.
> >> >
> >> ><appSettings>
> >> > <add key="myApplication.myServer.Service1"
> >> > value="http://myServer/myXmlWebService/Service1.asmx"/>
> >> ></appSettings>
> >> >
> >> >So given:
> >> >
> >> >application name is DMS,
> >> >the web service project is called DMSDataWS,
> >> >the server is LASER,
> >> >the physcial path on the server
> >> is:\InetPub\wwwroot\DMSDataWS\wsCommon.asmx,
> >> >the virtual folder is named DMSDATAWS (under DefaultWebSite)
> >> >the service is name wsCommon.asmx
> >> >
> >> >What should the entry look like? The following does not work.
> >> >
> >> ><appSettings>
> >> > <add key="DMS.Laser.wsCommon.asmx"
> >> >value="http://LASER/DMSDATA/wsCommon.asmx"/>
> >> ></appSettings>
> >> >
> >> >--
> >> >wr
> >> >
> >>
> >>

> >

>
>

 
Reply With Quote
 
Dan Rogers
Guest
Posts: n/a
 
      03-09-2005
Ahh.

You're right. When you change the URL behavior property from Static to
Dynamic, you'll find that the setting gets made for you automatically in
the appsettings section of your config file. The pattern for the key is
ProjectNamespace.ProxyNamespace.ServiceClassname.

You should be able to look in your myapplicationexename.config file and see
this setting. If you put this in a different file, it could explain the
issue.


SO where you have

>> >> ><appSettings>
>> >> > <add key="myApplication.myServer.Service1"
>> >> > value="http://myServer/myXmlWebService/Service1.asmx"/>
>> >> ></appSettings>


In your example:
>> >> ><appSettings>
>> >> > <add key="DMS.Laser.wsCommon.asmx"
>> >> >value="http://LASER/DMSDATA/wsCommon.asmx"/>
>> >> ></appSettings>


You have an extra .asmx in the key name. This could be the problem.


this means your applications namespace is myApplication, your proxy
namespace is "myServer", and the name of the service class is Service1.

--------------------
>Thread-Topic: Dynamic URL Failure
>thread-index: AcUkI+aYz8xNpjy3QNOfIYz/9YKiyQ==
>X-WBNR-Posting-Host: 65.27.6.160
>From: "=?Utf-8?B?V2hpc2t5Um9tZW8=?="

<(E-Mail Removed)>
>References: <(E-Mail Removed)>

<(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
>Subject: RE: Dynamic URL Failure
>Date: Tue, 8 Mar 2005 13:15:06 -0800
>Lines: 172
>Message-ID: <(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:28513
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>The article on which I am basing my question is:
>
>Redirecting an Application to Target a Different XML Web Service During
>Installation
>
>I found it by searching VS Help using "Dynamic URL."
>
>This article implies -- simply putting a key:value entry in the appconfig
>file of the form I listed in my original question and changing the URL
>Behaviour to Dynamic is all that is needed. They go on to specify a

custom
>installer class, so that a user can input the name of the server and

service.
> This used to modify the key:value entry in the appconfig during
>installation. I am not doing this, I am simply modifying the appconfig

file
>before generating the install files.
>
>In otherwords, when the URL Behaviour is Dynamic, the application knows to
>look in the appconfig for the key --> MyWebApp.localhost.Service1
>
>In this case, there is no other code at runtime being used to access the
>appconfig file to set the URL.
>
>"Dan Rogers" wrote:
>
>> I think the problem is going to be in the code you use to get your
>> appsettings. If you don't specify a match on key name, you won't get

the
>> data you want. What I'm suggesting is you debug your logic with
>> breakpoints so you can see what and when (or if) your code that gets the
>> appsettings is even accessed. You do have code that asks for the

specific
>> app-setting don't you? There is no automatic app setting mapping done

for
>> you to get a connection string.
>>
>> --------------------
>> >Thread-Topic: Dynamic URL Failure
>> >thread-index: AcUj8rmKH5JcQEuXQaOmN2jbeWIMtQ==
>> >X-WBNR-Posting-Host: 65.27.6.160
>> >From: "=?Utf-8?B?V2hpc2t5Um9tZW8=?="

>> <(E-Mail Removed)>
>> >References: <(E-Mail Removed)>

>> <(E-Mail Removed)>
>> >Subject: RE: Dynamic URL Failure
>> >Date: Tue, 8 Mar 2005 07:23:05 -0800
>> >Lines: 99
>> >Message-ID: <(E-Mail Removed)>
>> >MIME-Version: 1.0
>> >Content-Type: text/plain;
>> > charset="Utf-8"
>> >Content-Transfer-Encoding: 7bit
>> >X-Newsreader: Microsoft CDO for Windows 2000
>> >Content-Class: urn:content-classes:message
>> >Importance: normal
>> >Priority: normal
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>> >Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
>> >Xref: TK2MSFTNGXA02.phx.gbl

>> microsoft.public.dotnet.framework.aspnet.webservic es:28492
>> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>> >
>> >Thanks for the reply . . .
>> >
>> >When debugging it is obvious the URL did not come from the config file.


>> But
>> >what I don't know is -- did it fail because it couldn't find the key

it
>> was
>> >looking for or what?
>> >
>> >So my question remains what does the key look like so the lookup will
>> >suceed? The URL I am using is correct because when I use the static

mode,
>> it
>> >works correctly.
>> >
>> >I can move it to the production server and set the URL each time I form

>> the
>> >proxy and it works fine. However, I don't want to have to go through

code
>> >and change it everytime I deploy to a different server.
>> >
>> >I have another way to accomplish this, by I don't understand what is

>> failing
>> >with they dynamic URL route.
>> >
>> >WR
>> >
>> >"Dan Rogers" wrote:
>> >
>> >> You should set the URL setting to be the URL of the service asmx

entry
>> >> point. So if it is on a server named laser, it would start with
>> >> http://laser/....
>> >>
>> >> Try debugging your application - are you sure you are getting the

string
>> in
>> >> your config file correctly and then using that to set the proxy URL
>> >> setting? You really only have to do this at the place you create

your
>> >> proxy each time. If you can use a local string resource with the

right
>> URL
>> >> and that works, you can prove whether or not the string you need is

>> coming
>> >> from the config file.
>> >>
>> >> Something to be careful of is the \ character - make sure that you

>> account
>> >> for it as the escape operator in any local strings (so you would have
>> >> "http:\\\\laser\\foo.asmx"
>> >>
>> >> --------------------
>> >> >Thread-Topic: Dynamic URL Failure
>> >> >thread-index: AcUbWjBNICQRk6LrSNKJqbCFhha7zQ==
>> >> >X-WBNR-Posting-Host: 65.27.6.160
>> >> >From: "=?Utf-8?B?V2hpc2t5Um9tZW8=?="
>> >> <(E-Mail Removed)>
>> >> >Subject: Dynamic URL Failure
>> >> >Date: Fri, 25 Feb 2005 08:51:02 -0800
>> >> >Lines: 31
>> >> >Message-ID: <(E-Mail Removed)>
>> >> >MIME-Version: 1.0
>> >> >Content-Type: text/plain;
>> >> > charset="Utf-8"
>> >> >Content-Transfer-Encoding: 7bit
>> >> >X-Newsreader: Microsoft CDO for Windows 2000
>> >> >Content-Class: urn:content-classes:message
>> >> >Importance: normal
>> >> >Priority: normal
>> >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>> >> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>> >> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
>> >> >Path:

TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA03.phx.gbl
>> >> >Xref: TK2MSFTNGXA02.phx.gbl
>> >> microsoft.public.dotnet.framework.aspnet.webservic es:28301
>> >> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>> >> >
>> >> >I have an solution with several projects which call a web service

for
>> the
>> >> >data retrieval and updates.
>> >> >
>> >> >The main program is called DMS.exe. When I configure the webservice

to
>> >> use
>> >> >Dynamic URL and create entries in the app.config file of the

following
>> >> >format, the application can't find the webservice. Static works

fine
>> but
>> >> I
>> >> >have to set the url in code in every place a webservice is used.
>> >> >
>> >> ><appSettings>
>> >> > <add key="myApplication.myServer.Service1"
>> >> > value="http://myServer/myXmlWebService/Service1.asmx"/>
>> >> ></appSettings>
>> >> >
>> >> >So given:
>> >> >
>> >> >application name is DMS,
>> >> >the web service project is called DMSDataWS,
>> >> >the server is LASER,
>> >> >the physcial path on the server
>> >> is:\InetPub\wwwroot\DMSDataWS\wsCommon.asmx,
>> >> >the virtual folder is named DMSDATAWS (under DefaultWebSite)
>> >> >the service is name wsCommon.asmx
>> >> >
>> >> >What should the entry look like? The following does not work.
>> >> >
>> >> ><appSettings>
>> >> > <add key="DMS.Laser.wsCommon.asmx"
>> >> >value="http://LASER/DMSDATA/wsCommon.asmx"/>
>> >> ></appSettings>
>> >> >
>> >> >--
>> >> >wr
>> >> >
>> >>
>> >>
>> >

>>
>>

>


 
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
Success Or Failure: There Is No Such Thing As Failure bs866806@163.com C Programming 0 01-06-2008 11:41 AM
[JAVA] [EVALUATION] - The Java Failure (Sorry: The Java(tm) Failure) Ilias Lazaridis Java 0 02-01-2005 10:32 AM
Dynamic memory failure reason Sanjeev Kumar C++ 5 01-29-2005 01:15 AM
URL - substitution of a correct URL by a GUID like URL in favorites. Just D. ASP .Net Mobile 0 08-11-2004 04:26 PM
redirect URL's, return URL's, and URL Parameters Jon paugh ASP .Net 1 07-10-2004 05:29 AM



Advertisments