How to make subdomain in windows 7 - asp.net

i have website http://eshop200.com/
this website got capability of host multiple shop sites with in...
Now issue i am facing is that when we create sub site like this http://pk.eshop200.com/
its working on production server... where as the code version i am running on windows 7.
I have stuck in a situation the error is occuring on subdomain site...
to reproduce that on my local machine... don't no what to do..
any one help in this issue.

You cannot reproduce the effect of wildcard subdomains on the localhost in a windows platform. However, you can make it work for specified subdomains. Just edit your hosts file inside c:\windows\system32\drivers\etc\hosts.

On your development machine, you can created a hosts file entry that makes pk.eshop200.com point to the loopback address 127.0.0.1. Then, you should be able to access your local development server through http://pk.eshop.200.com:[port] in addition to http://127.0.0.1:[port].

Related

Host ASP.Net MVC Site

I've created a site using ASP.Net MVC that is meant to be stored on a local machine at my place of work. The intention is to have the site stored on this machine, but then accessible by all the other machines within this building.
I've followed Microsoft's tutorial as well as Code Project's tutorial, but I am not having very much luck. The binding is just the localhost, port 80, with * for the IP address. The URL is localhost/GrantTracker.
I've opened the ports within the firewall, checked the permissions on the directory (which is just within wwwroot), tried having the site take the place of the default IIS site (as Microsoft tutorial has you do) and tried having the site stand on its own with its own port (per Code Projects tutorial).
On the host machine I am receiving the standard "This site can't be reached, localhost refused to connect" which feels like either a port or permissions problem. I must be missing a step, but I can't seem to find what it would be. I am new to hosting sites through IIS so forgive me if I am just missing something basic.
I find it a bit strange too because my project uses Windows Authentication and when the site is first visited it performs that initial check with the user, authenticates, but then throws me the error.
Anyone have any ideas? Thanks in advance.
start simple,
create a simple html page, create an IIS application for it, on port 80.
Check and make sure you can see that page from another computer using the internal IP address of the the host machine so something like:
http:\\192.168.0.3\hostapp\test.html .
You can see the proper URL by running it from IIS, this will give you the entire URL you need, with localhost then just replace localhost with the IP address of the host machine to see it on other machines.
Do this in the original IIS folder so you don't encounter any folder permission issues. If you choose another folder you'll have to give access to the Network Service user ( i think, can't remember now, but there is a specific user that needs access to the folder where the website is deployed )
if you can see the page then deploy a proper website and do the same thing. Make sure the app pool is created correctly and it's up and running, then access it again on other computers and it should work.
Port 80 should be open by default so that should not be an issue.

Publish a test website in IIS windows 10

For testing/learning purposes I've been trying to publish a website(build in asp.net) in IIS on windows 10. I enabled everything, made everything as saw on Microsoft tutorials, and youtube tutorials, yet, it seems its not working.
I try to access it thru the Site name I specified, and IP. but its not working.
this is the error keep getting
"This site can’t be reached
projectmms.com’s server DNS address could not be found."
NOTE: projectmms.com is the name/url I specified for the website.
Why is this error keep showing up? I made everything as seen in those tutorials.
and have checked many answers here from other posts, followed the same suggestion and nothing is working. Any suggestion?
EDIT:
after made what few of you requested, this is what I get. This is not my asp.net website.
even tried projectmms.com/default.aspx , it shows that it didn't found the page.
any help?
This is what shows now
You need to add projectmms.com in your hosts file.
add this in C:\Windows\System32\Drivers\etc\host
projectmms.com Your_Server_IP_Address
That will work locally.
You need to add projectmms.com domain to your host file (windows\system32\drivers\etc\host) and forward to your local IP (127.0.0.1).
This should be a comment, not a reply as you give us little to no info.(but I need 50 rep in order to do so)
Is the IIS in your machine or a remote one.
Did you add the name in the DNS server or the HOSTS file.
Do you reach the machine by ping (hostname/ip)?
Did you start the ISS service?
P.S.Ask if you don't understand any of the above points.
Using IIS Express you can only local host access, you have come to enable IIS on Windows resources?
see
http://www.howtogeek.com/112455/how-to-install-iis-8-on-windows-8/
http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy-on-iis-80-or-later

Unable to start debugging on web server, localhost subdomain

I am using VS2013, IIS7, and have set a subdomain in IIS and my hosts file to point to 127.0.0.1.
I've created the secondary website, and have the http binding in IIS pointing to localhost.subdomain.com.
Things i've tried:
IISReset
Deleting Site in IIS, Deleting app pools, re-building from scratch
Cleaning/Re-building solution/Restarting Computer/Visual Studio
Creating Virtual Directory through VS, even tried tying to IISExpress to no avail.
Also, i can go directly to the site in a browser just fine using the http://localhost.subdomain.com and traverse through it all, it just fails to load into Visual Studio for debugging. All debug info is set correctly through project properties as well.
There are a bunch of people within my office with the exact same setups that i've sat down with that work fine on their machines, but not on mine. I've exhausted my google and microsoft.com searches at this point, any suggestion would help.
Visual Studio is unable to resolve the domain because it likely hasn't been added to your hosts file.
If you edit the hosts file found at C:\Windows\System32\Drivers\etc\hosts to include your subdomain:
# rest of hosts file here
127.0.0.1 api.localhost
Then your debugger should start working again.

IIS7 and Classic ASP and Applications and Paths

I yesterday received a zip file containing an old asp site from 2005. Its came in a folder called ivx.
I've unzipped ivx to c:\inetpub\wwwroot and then created an application in IIS called ivxapp and pointed it to c:\inetpub\wwwroot\ivx. Now when I type http://localhost/ivxapp, I am able to access the index page.
My problem is, whoever designed that site, designed it when IIS5 or IIS6 was around. He's used paths like more... which leads to http://localhost/new_posts.asp and not http://localhost/imagevertex/new_posts.asp
The whole site is some 21000 lines of code and contains many many references like this. Then comes the problem with <!--#include virtual = "/common/adminverify.asp" -->
Instead of having to manually edit the entire code, do you know a way to get things going?
This site worked perfectly well on a production server. Right now it's on my local machine on Windows 7 64 home premium.
Yes, you need to give this site a root-URL of its own, and not run it in a subdirectory of your localhost.
This is more of a web-administration question, but what you need to do is either run it under "localhost" directly, or add a domain-name to your network to run this site under.
The easiest for you right now is probably the first option.
If you aren't running a different site under localhost already:
Go to the IIS manager and click the 'localhost' site. On the right side of the IIS interface you can change the basic settings. Point the physical path to the ivx directory. You can reach the site directly on http://localhost.
If you are already running a site under localhost you need to keep:
Now, if you -are- already running a site on your localhost, the second easiest option is to run the ivx site under localhost, but on a different port. To accomplish that, click on the current ivx site in IIS, change the path in the same way as descibed above, and after that click on "bindings" in IIS, and change the PORT for the ivx site to something other than 80, for example 81.
The ivx site will then run on http://localhost:81, your current localhost will still run on http://localhost.
The hard way: adding a host to your network or PC:
The last option is to add a new hostname for the site to your network. You can add an A-record in your DNS for the ip-address of your server or add a host name to your HOSTS file in Windows on your server ("server" in the sense of the machine that runs the site, which can also be your local machine)
You can add a made-up name to the ip-address of the server, and in IIS' bindings add that name under "host name". this way you can run two different sites on the same machine, the "host name" seeting in IIS will make sure that calls to that specific hostname will reach the correct site. Adding it to the DNS of your network, or the HOST file in Windows will make sure the name is resolved to the correct machine (your webserver).
This last option is a little tricky of you've never done something like this before, but the first option works just as well.
Good luck!
Erik

How to allow users from other computers to connect to my IIS7 website?

I am trying to run a website in IIS7 for testing purposes. I can coonnect to it from my local pc typing http://localhost/Webpage1/Default.aspx (or http://localhost to open the default IIS starting page), but i can't connect to it from other computers.
In other similar topics suggestions was to change hosts file in c:\Windows\System32\drivers\etc, but something is not working for me.
Can you please tell me what exactly should i write there and how to connect, if my IP address is 80.233.186.188?
Thanks, Walt
It sounds like you developed this using WebMatrix. That installs IIS 7 Express, instead of IIS 7. It happened to me too, and I solved the problem by following the steps here: http://blog.alirobertson.com/post/11139712138/enabling-non-localhost-access-to-webmatrix

Resources