Prev: Disabling IISAdmin under Default website?
Next: Problem installing crystal enterprize on IIE 7.5
From: Karl on 1 Jun 2010 21:58
Maybe this is really a .net question? Anyway.....
// Initializing object header.
objXMLHTTP.open ( "POST", "http://www.mydomain.com/WS/MyWebService.asmx",
objXMLHTTP.onreadystatechange = GetResults;
This works fine if the user has included the "www" in the domain name when
the land on the HTML page (and if the search engine index or link includes
the "www"). But if the user goes to my site with just "mydomain.com", then
the call to the web service fails.
Here's my question, can I force IIS to prefix the domain name with "www"?
Or what is the "best practices" solution for this problem?
One other off topic question. Is Microsoft shutting down the newsgroups and
moving to just forum based support? I saw something to this affect on one my
my account pages.
From: Grant Taylor on 1 Jun 2010 22:36
> Maybe this is really a .net question? Anyway.....
I don't know if it's a .NET question or not, but I might have an answer
> This works fine if the user has included the "www" in the domain name
> when the land on the HTML page (and if the search engine index or
> link includes the "www"). But if the user goes to my site with just
> "mydomain.com", then the call to the web service fails.
This sounds like it's a classic "fully qualified path" verses "relative
Usually, if you can, remove all references to both the protocol (http)
and the server (www.mydomain.com) from everywhere that points to pages.
If you can, make all references relative to the site root. That way
your site should be agnostic across both protocol (http / https) and
server name (mydomain.com / www.mydomain.com).
> Here's my question, can I force IIS to prefix the domain name with
If you are wanting IIS to force any connections to mydomain.com to be
redirected to "www.mydomain.com"? If so, the answer is "yes".
If you are wanting IIS to parse pages as they are served up and alter
the code on the fly, I don't know.
> Or what is the "best practices" solution for this problem?
I don't know if this is "best practice" or not, but this is what I do.
I declare that "www.domain.tld" to be the canonical domain name and I
set up all vanity domain names to use an HTTP 301 / 302 redirect to the
canonical domain name. This way if any request comes in to the
non-canonical domain name IIS will direct the requesting client to
re-request what it wants at the same location on the canonical domain name.
This type of redirection can easily be done with an additional virtual
server. I.e. one virtual server hosts the content on the canonical
domain and the other virtual server hosts the redirect on all the vanity
(non-canonical) domain name(s).
> One other off topic question. Is Microsoft shutting down the
> newsgroups and moving to just forum based support? I saw something to
> this affect on one my my account pages.
It is my (mis)understanding that Microsoft has indeed deprecated this
news group and that it will be shut down at some point in the (near?)
That being said, there is supposedly a small program that you can run
that will interact with the forums (via HTTP?) and provide a local
virtual NNTP server that your traditional news clients can use to
Grant. . . .
From: Karl on 2 Jun 2010 06:19
Thank you Grant.
I changed the call to the XMLHTTP object's open method so that the
relative path was passed, as you suggested, and that resolved my problem.
The only thing is, I seem to recall originally having it that way, an
that also caused a problem. But I don't recall what that might have
been. I guess I may find out...