Changing Webservice from Server Without rebuilding

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carlos Hernandez

    Changing Webservice from Server Without rebuilding

    We have created a webservice, and in out test server everyting works fine,
    but when we want to move it to our
    production server, we have ti change IP in the webreference properties, and
    rebuild our application.
    Is there a way to do this dinamically so we dont have to recompile our
    application each time we change IP or server?


    Thanks.


  • Wayne

    #2
    Re: Changing Webservice from Server Without rebuilding

    Right click on your webservice in the VS.net gui and select properties. One
    of the URL Behavior, set it to dynamic. Your app will then have an
    APP.Config if it doesn't already and the URL will be settable in the config
    file.

    Thanks
    Wayne


    "Carlos Hernandez" <carlos@integra softhn.com> wrote in message
    news:e4rXrphWEH A.3420@TK2MSFTN GP12.phx.gbl...[color=blue]
    > We have created a webservice, and in out test server everyting works fine,
    > but when we want to move it to our
    > production server, we have ti change IP in the webreference properties,[/color]
    and[color=blue]
    > rebuild our application.
    > Is there a way to do this dinamically so we dont have to recompile our
    > application each time we change IP or server?
    >
    >
    > Thanks.
    >
    >[/color]


    Comment

    • Elp

      #3
      Re: Changing Webservice from Server Without rebuilding


      "Carlos Hernandez" <carlos@integra softhn.com> wrote in message
      news:e4rXrphWEH A.3420@TK2MSFTN GP12.phx.gbl...[color=blue]
      > We have created a webservice, and in out test server everyting works fine,
      > but when we want to move it to our
      > production server, we have ti change IP in the webreference properties,[/color]
      and[color=blue]
      > rebuild our application.
      > Is there a way to do this dinamically so we dont have to recompile our
      > application each time we change IP or server?[/color]

      In addition to the config file solution, you can also use the Url property
      of your web service proxy. This property can be set at run-time so you can
      for example have a settings dialog box in your client application where
      you'll be able to change the Url of your web service should it be moved to
      another server.


      Comment

      • Carlos Hernandez

        #4
        Re: Changing Webservice from Server Without rebuilding

        Exactly where is that option located?, I have searched for it and didnt find
        it. My web service has an web.config file, but I cant find that property
        that you talked.

        Thanks.
        "Wayne" <wsepega@NoLand Spamstar.com> wrote in message
        news:e$mF2EiWEH A.3944@tk2msftn gp13.phx.gbl...[color=blue]
        > Right click on your webservice in the VS.net gui and select properties.[/color]
        One[color=blue]
        > of the URL Behavior, set it to dynamic. Your app will then have an
        > APP.Config if it doesn't already and the URL will be settable in the[/color]
        config[color=blue]
        > file.
        >
        > Thanks
        > Wayne
        >
        >
        > "Carlos Hernandez" <carlos@integra softhn.com> wrote in message
        > news:e4rXrphWEH A.3420@TK2MSFTN GP12.phx.gbl...[color=green]
        > > We have created a webservice, and in out test server everyting works[/color][/color]
        fine,[color=blue][color=green]
        > > but when we want to move it to our
        > > production server, we have ti change IP in the webreference properties,[/color]
        > and[color=green]
        > > rebuild our application.
        > > Is there a way to do this dinamically so we dont have to recompile our
        > > application each time we change IP or server?
        > >
        > >
        > > Thanks.
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Carlos Hernandez

          #5
          Re: Changing Webservice from Server Without rebuilding

          I added a Windows Application Project, and added a web reference, and in the
          web reference, I found
          the URL Behavior property, but my real application is for smart devices, and
          I am in the exact location, on the
          web reference, and there is NO url behavior???. Does this means I cant have
          a dinamic URL for
          smar devices..?

          Thanks.
          "Wayne" <wsepega@NoLand Spamstar.com> wrote in message
          news:e$mF2EiWEH A.3944@tk2msftn gp13.phx.gbl...[color=blue]
          > Right click on your webservice in the VS.net gui and select properties.[/color]
          One[color=blue]
          > of the URL Behavior, set it to dynamic. Your app will then have an
          > APP.Config if it doesn't already and the URL will be settable in the[/color]
          config[color=blue]
          > file.
          >
          > Thanks
          > Wayne
          >
          >
          > "Carlos Hernandez" <carlos@integra softhn.com> wrote in message
          > news:e4rXrphWEH A.3420@TK2MSFTN GP12.phx.gbl...[color=green]
          > > We have created a webservice, and in out test server everyting works[/color][/color]
          fine,[color=blue][color=green]
          > > but when we want to move it to our
          > > production server, we have ti change IP in the webreference properties,[/color]
          > and[color=green]
          > > rebuild our application.
          > > Is there a way to do this dinamically so we dont have to recompile our
          > > application each time we change IP or server?
          > >
          > >
          > > Thanks.
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Wayne

            #6
            Re: Changing Webservice from Server Without rebuilding

            This was written by ELP in another message:
            [color=blue]
            > In addition to the config file solution, you can also use the Url property
            > of your web service proxy. This property can be set at run-time so you can
            > for example have a settings dialog box in your client application where
            > you'll be able to change the Url of your web service should it be moved to
            > another server.[/color]


            According to the help, Webserver.URL is supported by .net compact framework,
            so you should be able to get an instance of your webservice and then set the
            url property. This should give you the dynamic URL that you need. I've not
            tried it as of yet.

            Thanks
            Wayne


            "Carlos Hernandez" <carlos@integra softhn.com> wrote in message
            news:uGdaxN8WEH A.1352@TK2MSFTN GP10.phx.gbl...[color=blue]
            > I added a Windows Application Project, and added a web reference, and in[/color]
            the[color=blue]
            > web reference, I found
            > the URL Behavior property, but my real application is for smart devices,[/color]
            and[color=blue]
            > I am in the exact location, on the
            > web reference, and there is NO url behavior???. Does this means I cant[/color]
            have[color=blue]
            > a dinamic URL for
            > smar devices..?
            >
            > Thanks.
            > "Wayne" <wsepega@NoLand Spamstar.com> wrote in message
            > news:e$mF2EiWEH A.3944@tk2msftn gp13.phx.gbl...[color=green]
            > > Right click on your webservice in the VS.net gui and select properties.[/color]
            > One[color=green]
            > > of the URL Behavior, set it to dynamic. Your app will then have an
            > > APP.Config if it doesn't already and the URL will be settable in the[/color]
            > config[color=green]
            > > file.
            > >
            > > Thanks
            > > Wayne
            > >
            > >
            > > "Carlos Hernandez" <carlos@integra softhn.com> wrote in message
            > > news:e4rXrphWEH A.3420@TK2MSFTN GP12.phx.gbl...[color=darkred]
            > > > We have created a webservice, and in out test server everyting works[/color][/color]
            > fine,[color=green][color=darkred]
            > > > but when we want to move it to our
            > > > production server, we have ti change IP in the webreference[/color][/color][/color]
            properties,[color=blue][color=green]
            > > and[color=darkred]
            > > > rebuild our application.
            > > > Is there a way to do this dinamically so we dont have to recompile our
            > > > application each time we change IP or server?
            > > >
            > > >
            > > > Thanks.
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            Working...