wrong host on example invoke pages

Discussion in 'ASP .Net Web Services' started by Rick Boardman, May 10, 2005.

  1. Sorry for the multiple posts. Seems I didn't have my nospam email setup so
    MSDN didn't recognize me as a subscriber. Hopefully this will be the last
    time I have to repost this.

    WebServices on my machine have recently begun experiencing problems when
    testing the service through the description pages.

    For example:
    http://www.testsite.com/services/details.asmx?op=Insert
    The various methods begin with the following header information:

    POST /services/details.asmx HTTP/1.1
    Host: machinename.domain.com
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://tempuri.org/services/details/Insert"

    The Host here is wrong and should be the testsite, not the local machine.

    Clicking Invoke tries to redirect to this:
    http://machinename.domain.com/services/details.asmx/Insert

    when it should be redirecting to this:
    http://www.testsite.com/services/details.asmx/Insert

    Also in the service description for the service the following is wrong:

    - <wsdl:service name="details">
    - <wsdl:port name="siteSoap" binding="tns:siteSoap">
    <soap:address
    location="http://machinename.domain.com/services/details.asmx" />
    </wsdl:port>
    - <wsdl:port name="siteHttpGet" binding="tns:siteHttpGet">
    <http:address
    location="http://machinename.domain.com/services/details.asmx" />
    </wsdl:port>
    - <wsdl:port name="siteHttpPost" binding="tns:siteHttpPost">
    <http:address
    location="http://machinename.domain.com/services/details.asmx" />
    </wsdl:port>
    </wsdl:service>

    These problems started when I installed SP1 on Windows 2003 Server. There
    were some problems during the install and I eventually got the server back up
    so it may have been related to other surronding issues.

    If anyone can shed some light on this for me that would be great! I'm sure
    it's something simple and likely just a setting somewhere.
     
    Rick Boardman, May 10, 2005
    #1
    1. Advertising

  2. "=?Utf-8?B?UmljayBCb2FyZG1hbg==?="
    <> wrote in
    news:D:
    > POST /services/details.asmx HTTP/1.1
    > Host: machinename.domain.com


    Is this also name of the machine it is on? Where/When did you initially enter
    this anywhere?


    --
    Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
    "Programming is an art form that fights back"

    Blog: http://blogs.atozed.com/kudzu
     
    Chad Z. Hower aka Kudzu, May 11, 2005
    #2
    1. Advertising

  3. "Chad Z. Hower aka Kudzu" wrote:

    > "=?Utf-8?B?UmljayBCb2FyZG1hbg==?="
    > <> wrote in
    > news:D:
    > > POST /services/details.asmx HTTP/1.1
    > > Host: machinename.domain.com

    >
    > Is this also name of the machine it is on? Where/When did you initially enter
    > this anywhere?


    Yes, machine name is the name of the machine this is on (entered during
    windows installation) and domain.com is the domain entered during windows
    creation

    > --
    > Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
    > "Programming is an art form that fights back"
    >
    > Blog: http://blogs.atozed.com/kudzu
    >
     
    Rick Boardman, May 11, 2005
    #3
  4. "=?Utf-8?B?UmljayBCb2FyZG1hbg==?=" <> wrote in
    news::
    > Yes, machine name is the name of the machine this is on (entered during
    > windows installation) and domain.com is the domain entered during
    > windows creation


    The page you are showing, is only meant for debugging not real use. When
    ASP.NET generates them, it appears to just take the machine name, not the
    host parameter in your scenario. In fact it should be taking the website name
    as in IIS, and likely is but without seeing your machine I cant see what your
    names are and why you want it different.


    --
    Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
    "Programming is an art form that fights back"

    Blog: http://blogs.atozed.com/kudzu
     
    Chad Z. Hower aka Kudzu, May 11, 2005
    #4
  5. > The page you are showing, is only meant for debugging not real use. When
    > ASP.NET generates them, it appears to just take the machine name, not the
    > host parameter in your scenario. In fact it should be taking the website name
    > as in IIS, and likely is but without seeing your machine I cant see what your
    > names are and why you want it different.


    I understand this is only for debugging, not real use. Being that we are a
    development shop, we do a lot of debugging and testing at this level.

    Please note:
    testsite.com is virtually hosted on machinename.domain.com

    Before Windows 2003 Server SP1 update:
    http://www.testsite.com/services/details.asmx/Insert

    After Windows 2003 Server SP1 update:
    http://machinename.domain.com/services/details.asmx/Insert
    Which causes the invoke to get page not found errors.

    I want webservice example invoke pages to work like they did before Windows
    2003 Server SP1 update where the service was picking up the virtualy hosted
    domain not the local machine name and domain.
     
    Rick Boardman, May 11, 2005
    #5
  6. "=?Utf-8?B?UmljayBCb2FyZG1hbg==?=" <> wrote in
    news::
    > I want webservice example invoke pages to work like they did before
    > Windows 2003 Server SP1 update where the service was picking up the
    > virtualy hosted domain not the local machine name and domain.


    Windows SP's have a bad habit of breaking things in IIS through lockdown
    procedures. I would suggest checking the application settings, or more
    importantly the settings for this virtual host and see if anything has
    changed. .NET hasn't, but something is causing IIS to feed information to
    ..NET differently.


    --
    Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
    "Programming is an art form that fights back"

    Blog: http://blogs.atozed.com/kudzu
     
    Chad Z. Hower aka Kudzu, May 11, 2005
    #6
  7. Chad Z. Hower aka Kudzu, May 11, 2005
    #7
  8. I've looked through the settings for anything I thought might be an issue
    (even before I posted here last month) but haven't found anything I can point
    at as the problem.

    I reviewed the site link posted. From what I gather it doesn't get into
    anything specific nor fixes and basically indicates Windows 2003 Server SP1
    breaks things.

    Is there maybe an MVP or MS Employee who might know what .net does to
    generate the hostname and the verb settings in the wsdl? If so I imagine
    this problem can be isolated to a specific setting in the registry, metabase,
    etc. This would be extremely helpful.
     
    Rick Boardman, May 17, 2005
    #8
  9. Now I have found that aspx pages set to refer themselves back to https are
    also failing. example:

    http://www.testit.com/secure.aspx

    uses request.url.host to build and redirect to

    https://www.testit.com/secure.aspx

    this worked before windows 2003 server sp1. Now it is giving:

    https://machinename.machinedomain.com/secure.aspx

    which of course doesn't exist.

    I've had this post in a managed newsgroup now for over a month and have
    gotten no MS Employee or MVP responses.

    "Rick Boardman" wrote:

    > I've looked through the settings for anything I thought might be an issue
    > (even before I posted here last month) but haven't found anything I can point
    > at as the problem.
    >
    > I reviewed the site link posted. From what I gather it doesn't get into
    > anything specific nor fixes and basically indicates Windows 2003 Server SP1
    > breaks things.
    >
    > Is there maybe an MVP or MS Employee who might know what .net does to
    > generate the hostname and the verb settings in the wsdl? If so I imagine
    > this problem can be isolated to a specific setting in the registry, metabase,
    > etc. This would be extremely helpful.
     
    Rick Boardman, May 26, 2005
    #9
  10. Still no response from MVP or Microsoft.

    This is still an issue.

    wsdl are being generated with incorrect URLs
    request.url.host is responding with incorrect URLs

    This is after install of windows 2003 server sp 1

    There are others experiencing similar issues:

    "In some forums and blogs many people had simmilar isuses. It seems that
    with W2003 SP1 request.url.host doesn't return the public web domain any
    more. Now it return the real server domain name. In your case
    palhost.palhost.net. If this is by design or a bug in SP1, i don't know yet."
    found on
    http://forums.asp.net/1005195/ShowPost.aspx

    "Recently my hosting service patched their Windows 2003 servers to SP1. In
    doing so i noticed that all of a sudden this site (ie my .text blog) was
    broken. I was getting the dreaded "A blog matching the location you requested
    was not found" error. Apparently calls to Request["Server_Name"] previously
    returned the HTTP_HOST variable instead. This has been fixed and now returns
    the actual machine name as is the original purpose. Unfortunaltey it seems
    that Request.Url.Host also seems to now take on this behaviour (at least it
    did for this server?). .TEXT makes a call to this method to get the current
    host."

    found on http://thewebfarm.com/blog/archive/2005/04/03/189.aspx
     
    Rick Boardman, Aug 11, 2005
    #10
    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. Sandro
    Replies:
    8
    Views:
    8,319
    Girish Bharadwaj
    Sep 13, 2004
  2. Orpheus66
    Replies:
    0
    Views:
    4,527
    Orpheus66
    Jul 30, 2003
  3. Jerry Qu
    Replies:
    1
    Views:
    528
    lee atkinson
    Feb 20, 2009
  4. Rick Boardman

    wrong Host on example invoke pages.

    Rick Boardman, Apr 26, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    160
    Rick Boardman
    Apr 26, 2005
  5. Rick Boardman

    wrong Host on example invoke pages. (MSDN Subscriber - Managed NG

    Rick Boardman, May 5, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    192
    Rick Boardman
    May 5, 2005
Loading...

Share This Page