4

I am trying to host a site on port 8123. It's working fine, but after hosting it I am trying to set its host header(DNS): when I set its host header it did not open application on that link .

My site name is "InspectionDesign": after hosting it when I set its host header I go in its binding setting and edit it:

Type    HostHeader       Port    IP Address

http    haks.design.us   8123      *

and when I use this link haks.design.us it do not get any thing.

I also tried appcmd on terminal from this link:

http://technet.microsoft.com/en-us/library/cc753195%28v=ws.10%29.aspx

and alter this command according to my needs like:

 appcmd set site /site.name: InspectionDesign/bindings.[protocol='http',bindingInformation='*:8123:'].bindingInformation:*:8123: haks.design.us

when I run this command I get error "appcmd is not recognized as an internal or external command"

How would i set host header and what mistakes I am doing?

Hopes for your suggestion.

Thanks in Advance

ᗩИᎠЯƎᗩ
  • 2,122
  • 5
  • 29
  • 41
joe weilder
  • 95
  • 1
  • 6
  • Do you call that link with port number also? Like haks.design.us:8123 ? What error do you get when calling that link? – Robert Oct 09 '13 at 06:45
  • it do not call any thing when i use port no too with the link – joe weilder Oct 09 '13 at 07:01
  • are you sure you have correct records in DNS setup for the domain? The one you're interested in is *A* record – Robert Oct 09 '13 at 07:43
  • 1
    Have you declared a DNS entry, or updated your .hosts ? see http://stackoverflow.com/a/18758934/1236044 – jbl Oct 09 '13 at 08:26
  • 1
    @jbl i haven't declaired DNS entery i will try this and one more thing if the hosted iis app is on server then how every one will visit this link it does not seem to be fine that every one would do entry for visiting this link ? – joe weilder Oct 09 '13 at 09:07

1 Answers1

1

There are two things that I immediately see being wrong and that can be easily overcome:

appcmd is not recognized as an internal or external command

And a space is needed in between the name of the site and the /bindings cmdline parameter.

appcmd is usually located in (it is apparently not part of your PATH environment variable)

%systemroot%\system32\inetsrv\

Normally %systemroot% is located at

C:\windows

So to do the command, you need to fully specify the path to appcmd like so

C:\windows\system32\inetsrv\appcmd set site /site.name: InspectionDesign /bindings.[protocol='http',bindingInformation=':8123:'].bindingInformation::8123: haks.design.us

This results in an error, because the documentation on the Technet page you mentioned is incorrect. I filed a bug report about that to Microsoft.

The correct cmd is:

C:\windows\system32\inetsrv\appcmd set site /site.name:InspectionDesign /+bindings.[protocol='http',bindingInformation='*:8123:haks.design.us']

If you don't have a dns entry yet, you can fake one using an entry in the hosts file on the computer from which you need to browse to the site. So not on the server, if that's not the machine your browsing from. The hosts file is located in C:\Windows\System32\drivers\etc and does not have an extension.

N.B. I am administrator and this is tested in iis 7.5 on Windows 7

twildeman
  • 599
  • 5
  • 10
  • new binding object missing required attributes can not add duplicate collection entry of type binding with combined key attribute protocole – joe weilder Oct 09 '13 at 11:51
  • i have edited my host file with 127.0.0.1 haks.design.us and also run the command as you mentioned above but still haks.design.us not working for me ??? – joe weilder Oct 10 '13 at 06:11
  • @ Issue was fire wall due to which changing in host file not working that file was blocked – joe weilder Oct 11 '13 at 04:54
  • So you don't have any issues anymore? (sorry for the late reaction) – twildeman Oct 11 '13 at 15:02
  • i did one more thing which i forgot to update that i delete my host file and recreate host file using software "Host Xpert" this software recreate my host file then i again add ip and host name in it and it works ! – joe weilder Oct 15 '13 at 08:17