Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > No Touch Deployment and Web Services.

Reply
Thread Tools

No Touch Deployment and Web Services.

 
 
Mats-Erik Grundh
Guest
Posts: n/a
 
      10-15-2003
No Touch Deployment and Web Services.

How do you programatically configure wich server to
access?

My environment:
- Locahost.
- Test server.
- Production server.

My problem is that same webservice deploys on localhosts,
development server, test server and production server and
i want to control from the shortcut on the desktop, or
som other way, on
which server to access webservice from, like this:

C:\WINNT\Microsoft.NET\Framework\v1.1.4322\IEExec. exe
http://ozzy/conet/client/bin/co.win.exe?server=ozzy

the parameter server=ozzy tells which server to run
webservice on.

PS:I've tested the option dynamic on web reference
properties but i cant find a way to programatically
change
the settings in application.config file.

Thanks in advance!

 
Reply With Quote
 
 
 
 
Ricardo Pereira
Guest
Posts: n/a
 
      10-15-2003
On your client application use the url property of the generated proxy,
like:

public class Math : System.Web.Services.Protocols.SoapHttpClientProtoc ol
..... (Generated by Reference import)


your app:

Math m=new Math();
m.Url="your url here"

...

m.YourRemoteMethod();

best regards
ricardo


"Mats-Erik Grundh" <(E-Mail Removed)> wrote in message
news:094701c39326$68f2d190$(E-Mail Removed)...
> No Touch Deployment and Web Services.
>
> How do you programatically configure wich server to
> access?
>
> My environment:
> - Locahost.
> - Test server.
> - Production server.
>
> My problem is that same webservice deploys on localhosts,
> development server, test server and production server and
> i want to control from the shortcut on the desktop, or
> som other way, on
> which server to access webservice from, like this:
>
> C:\WINNT\Microsoft.NET\Framework\v1.1.4322\IEExec. exe
> http://ozzy/conet/client/bin/co.win.exe?server=ozzy
>
> the parameter server=ozzy tells which server to run
> webservice on.
>
> PS:I've tested the option dynamic on web reference
> properties but i cant find a way to programatically
> change
> the settings in application.config file.
>
> Thanks in advance!
>



 
Reply With Quote
 
 
 
 
Mats-Erik Grundh
Guest
Posts: n/a
 
      10-16-2003
I don't think it's a possible solution beacause we have a
huge application with many calls to different webservices
(on same server) and i'ts not reliable to use the URL
property in your code if the developer forgot to write the
url before the call.

>-----Original Message-----
>On your client application use the url property of the

generated proxy,
>like:
>
> public class Math :

System.Web.Services.Protocols.SoapHttpClientProtoc ol
>..... (Generated by Reference import)
>
>
>your app:
>
>Math m=new Math();
>m.Url="your url here"
>
>...
>
>m.YourRemoteMethod();
>
>best regards
>ricardo
>
>
>"Mats-Erik Grundh" <(E-Mail Removed)> wrote in message
>news:094701c39326$68f2d190$(E-Mail Removed)...
>> No Touch Deployment and Web Services.
>>
>> How do you programatically configure wich server to
>> access?
>>
>> My environment:
>> - Locahost.
>> - Test server.
>> - Production server.
>>
>> My problem is that same webservice deploys on

localhosts,
>> development server, test server and production server

and
>> i want to control from the shortcut on the desktop, or
>> som other way, on
>> which server to access webservice from, like this:
>>
>> C:\WINNT\Microsoft.NET\Framework\v1.1.4322\IEExec. exe
>> http://ozzy/conet/client/bin/co.win.exe?server=ozzy
>>
>> the parameter server=ozzy tells which server to run
>> webservice on.
>>
>> PS:I've tested the option dynamic on web reference
>> properties but i cant find a way to programatically
>> change
>> the settings in application.config file.
>>
>> Thanks in advance!
>>

>
>
>.
>

 
Reply With Quote
 
台灣微軟技術處支援部
Guest
Posts: n/a
 
      10-16-2003
You may modify the config file before call the web service, for example:

Dim doc As New XmlDocument

doc.Load("WindowsApplication2.exe.config")

Dim n As XmlNode

n =
doc.DocumentElement.SelectSingleNode("/configuration/appSettings/add[@key='W
indowsApplication2.localhost.Service1'] ")



n.Attributes(1).InnerXml =
"http://AppServer/WebService1/Service1.asmx"

doc.Save("WindowsApplication2.exe.config")

doc = Nothing

Dim o As New localhost.Service1

MsgBox(o.GetString)


This will change the web service's url dynamically.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
Mats-Erik Grundh
Guest
Posts: n/a
 
      10-20-2003
Thanks, but how do i get access to the app.config file
when i use "No Touch Deployment" like:

...\Framework\v1.1.4322\IEExec.exe http://server/my.app.exe

/Mats-Erik

>-----Original Message-----
>You may modify the config file before call the web

service, for example:
>
> Dim doc As New XmlDocument
>
> doc.Load("WindowsApplication2.exe.config")
>
> Dim n As XmlNode
>
> n =
>doc.DocumentElement.SelectSingleNode

("/configuration/appSettings/add[@key='W
>indowsApplication2.localhost.Service1'] ")
>
>
>
> n.Attributes(1).InnerXml =
>"http://AppServer/WebService1/Service1.asmx"
>
> doc.Save("WindowsApplication2.exe.config")
>
> doc = Nothing
>
> Dim o As New localhost.Service1
>
> MsgBox(o.GetString)
>
>
>This will change the web service's url dynamically.
>
>Luke
>Microsoft Online Support
>
>Get Secure! www.microsoft.com/security
>(This posting is provided "AS IS", with no warranties,

and confers no
>rights.)
>
>.
>

 
Reply With Quote
 
MSFT
Guest
Posts: n/a
 
      10-21-2003
Then you may try to set the web service's url property, for example:

Dim o As New Server1.Service1

o.Url = "http://Server2/WebService1/Service1.asmx"

MsgBox(o.GetString)

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
Mats-Erik Grundh
Guest
Posts: n/a
 
      10-21-2003
I don't think it's a possible solution beacause we have a
huge application with many calls to different webservices
(on same server) and i'ts not reliable to use the URL
property in your code if the developer forgot to write the
url before the call.

"MSFT" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Then you may try to set the web service's url property, for example:
>
> Dim o As New Server1.Service1
>
> o.Url = "http://Server2/WebService1/Service1.asmx"
>
> MsgBox(o.GetString)
>
> Luke
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>



 
Reply With Quote
 
MSFT
Guest
Posts: n/a
 
      10-22-2003
When we redirect a web service, there may two ways:

1. Modify its url in code
2. Specify its url in config file.

Since your appliaction was executed thhorugh IEexec, it is hard to modify
config file on the web server. Therefore, the only resort is achieving this
in code. If we have a better design in the code, for example, when
developer need to call a web service, he need to call a public method:


Dim webobj= GetWebServiceObject()

Public Function GetWebServiceObject() as Server1.Service1


Dim o As New Server1.Service1
o.Url = strWebServiceUrl

return o

End Function

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
Ken
Guest
Posts: n/a
 
      10-22-2003
> Source File:
> c:\windows\microsoft.net\framework\v1.1.4322\Confi g\machine.config

Line:
> 258

<add
> assembly="*"/>

"MSFT" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> When we redirect a web service, there may two ways:
>
> 1. Modify its url in code
> 2. Specify its url in config file.
>
> Since your appliaction was executed thhorugh IEexec, it is hard to modify
> config file on the web server. Therefore, the only resort is achieving

this
> in code. If we have a better design in the code, for example, when
> developer need to call a web service, he need to call a public method:
>
>
> Dim webobj= GetWebServiceObject()
>
> Public Function GetWebServiceObject() as Server1.Service1
>
>
> Dim o As New Server1.Service1
> o.Url = strWebServiceUrl
>
> return o
>
> End Function
>
> Luke
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>



 
Reply With Quote
 
Mats-Erik Grundh
Guest
Posts: n/a
 
      10-22-2003
What is the purpose of adding assembly="*" in machine.config?


"Ken" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> > Source File:
> > c:\windows\microsoft.net\framework\v1.1.4322\Confi g\machine.config

> Line:
> > 258

> <add
> > assembly="*"/>

> "MSFT" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > When we redirect a web service, there may two ways:
> >
> > 1. Modify its url in code
> > 2. Specify its url in config file.
> >
> > Since your appliaction was executed thhorugh IEexec, it is hard to

modify
> > config file on the web server. Therefore, the only resort is achieving

> this
> > in code. If we have a better design in the code, for example, when
> > developer need to call a web service, he need to call a public method:
> >
> >
> > Dim webobj= GetWebServiceObject()
> >
> > Public Function GetWebServiceObject() as Server1.Service1
> >
> >
> > Dim o As New Server1.Service1
> > o.Url = strWebServiceUrl
> >
> > return o
> >
> > End Function
> >
> > Luke
> > Microsoft Online Support
> >
> > Get Secure! www.microsoft.com/security
> > (This posting is provided "AS IS", with no warranties, and confers no
> > rights.)
> >

>
>



 
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
FileUtils.touch not consistent with system('touch') Han Holl Ruby 4 10-12-2006 05:36 AM
No Touch Deployment and Web Services. Mats-Erik Grundh ASP .Net Web Services 7 10-24-2003 11:36 PM
No Touch Deployment and Web Services. Mats-Erik Grundh ASP .Net Web Services 3 10-17-2003 01:04 PM
No Touch Deployment and Web Services. Mats-Erik Grundh ASP .Net Web Services 0 10-04-2003 05:57 AM
No Touch Deployment and Web Services. Mats-Erik Grundh ASP .Net Web Services 2 10-02-2003 08:22 AM



Advertisments