Am i hardcoding the web service ?

Discussion in 'ASP .Net Web Services' started by moko, Dec 16, 2003.

  1. moko

    moko Guest

    I have a C# webservice file, which i compile , make a corresponding .asmx
    file, then create a proxy .cs file using WSDL, compile this proxy, and
    consume it from a windows form, which is hosted in an IE browser. Now, the
    proxy file refers to http://localhost/somevirtualfolder/something.asmx. All
    works well, when i use it from the same PC where the web-service is hosted.

    However, when i try to access the same web-service across the intranet, i
    get some security error. Is it because the "localhost" in the proxy needs to
    be set to the name of the server , or is there some other hidden problem ?

    Any guesses ?
     
    moko, Dec 16, 2003
    #1
    1. Advertising

  2. moko

    Jan Tielens Guest

    You can use Dynamic properties to solve this issue. By doing so the location
    of the webservice is stored in the app.config file (xml) which you can edit
    with notepad for example (without recompiling the project!).

    To do so, just set the URL Behavior property of the webreference to
    Dynamic. The app.config file will ve created automatically!

    --
    Greetz

    Jan Tielens
    ________________________________
    Read my weblog: http://weblogs.asp.net/jan


    "moko" <> wrote in message
    news:uXZ8A$...
    > I have a C# webservice file, which i compile , make a corresponding .asmx
    > file, then create a proxy .cs file using WSDL, compile this proxy, and
    > consume it from a windows form, which is hosted in an IE browser. Now, the
    > proxy file refers to http://localhost/somevirtualfolder/something.asmx.

    All
    > works well, when i use it from the same PC where the web-service is

    hosted.
    >
    > However, when i try to access the same web-service across the intranet, i
    > get some security error. Is it because the "localhost" in the proxy needs

    to
    > be set to the name of the server , or is there some other hidden problem ?
    >
    > Any guesses ?
    >
    >
    >
     
    Jan Tielens, Dec 16, 2003
    #2
    1. Advertising

  3. moko

    Mas Jabier Guest

    In the server side, open IE
    and get to Tools-Internet Options-Connection-LAN Settings-
    Advanced, add http://localhost in the Exceptions : Do not
    use proxy server with....

    Now try to access again. You should get this smoothly.


    Jody Ananda,MCAD,MCSD.Net




    >-----Original Message-----
    >I have a C# webservice file, which i compile , make a

    corresponding .asmx
    >file, then create a proxy .cs file using WSDL, compile

    this proxy, and
    >consume it from a windows form, which is hosted in an IE

    browser. Now, the
    >proxy file refers to

    http://localhost/somevirtualfolder/something.asmx. All
    >works well, when i use it from the same PC where the web-

    service is hosted.
    >
    >However, when i try to access the same web-service across

    the intranet, i
    >get some security error. Is it because the "localhost" in

    the proxy needs to
    >be set to the name of the server , or is there some other

    hidden problem ?
    >
    >Any guesses ?
    >
    >
    >
    >.
    >
     
    Mas Jabier, Dec 19, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alen Smith

    datagrid hardcoding...

    Alen Smith, Jun 30, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    1,629
    Alen Smith
    Jun 30, 2005
  2. cgian31
    Replies:
    11
    Views:
    776
    Oliver Wong
    Oct 21, 2005
  3. cgian31
    Replies:
    0
    Views:
    274
    cgian31
    Oct 20, 2005
  4. cgian31
    Replies:
    4
    Views:
    170
    McKirahan
    Oct 25, 2005
  5. cgian31
    Replies:
    0
    Views:
    102
    cgian31
    Oct 20, 2005
Loading...

Share This Page