Setup local domain with IIS7 - asp.net

I want to setup local domains like sub1.mydomain.dev and www.mydomain.dev on my local IIS on Windows 7 to test cross-domain things (asp.net app)... is there anyway to do that ?

This should not be done in IIS, but in the DNS server.
You can spoof this by updating your hosts file and add entries for the additional domain names, pointing them to the same server.

Related

Wildcard sub domains in IIS10

I want to access the application www.testsite.com using different wildcard Sub-domain such as :
abc.testsite.com
xyz.testsite.com
I have installed IIS Express 10 on windows 10 Machine and followed below steps:
Created an simple Asp.net MVC web application and published in local folder
Added an website in local IIS as www.testsite.com
Mapped the website to the published folder.
Added binding as *.testsite.com
Edited host file with 127.0.0.1 www.testsite.com and 127.0.0.1
*.testsite.com
Now I am able to access www.testsite.com but not using any other sub domains
Am I missing anything ?
You can add wildcard entry on IIS, but you have to specify the list of subdomains that you are going to map. Ultimately host file will not support any wildcard entry.

How do I get IIS to direct traffic to other binded directory

I have two sites configured on my IIS 7 server. One is the default web site and the other we will call www.othersite.com. The default web site runs a few different Applications running ASP.NET and the other site is a ColdFusion 8 web site.
The default site is configured to pull from the default web location at C:\inetpub\wwwroot while the other is set to pull from C:\sites\othersite.
The bindings are set to send all unassigned traffic to the Default Web Site, but www.othersite.com is set to a specific IP address. This is the same as I have it on other servers, which work perfectly well, but for some reason when I load www.othersite.com it is looking for its files in C:\inetpub\wwwroot instead of C:\sites\othersite even though the physical path is clearly defined in the basic settings.
Anyone have any idea why this might be and how I can get it to point to the proper directory?
Under IIS >> Bindings, you can see a place to put in "Host name". Leaving blank will result in all traffic to IP or host, but by specifying a host name (www.othersite.com) will direct traffic to that dir/site.

Deploy web site without using a domain

I am new to the web world, so I apologize if this question is silly.
I have an ASP.NET web site I wish to deploy.
The server has IIS 7 deployed on it, and I've added the site
to that IIS server as a web site.
For the time being I don't have a domain mapped to the site,
I would like the users to browse for the site directly by using the server's IP.
Is that even possible? because I failed to do it.
The only option that worked so far is using the hosts file to declare
a fake domain.
It would be nice if someone could clarify that issue for me.
Thanks a lot,
Omer
If you set the site bindings to IP address: All Unassigned on port 80, and do not provide a host name, then any request that makes it through to IIS should be served by that site. Make sure you stop any other sites that might have that binding (e.g., "Default Web Site" is normally bound to this).
In order to access the site by IP, you can't have the host name populated in IIS. Your best bet would be to use the "Default Web Site" that's already in IIS, and point that to your application.
Using IP is possible, but you need to make sure your users can see this ip from their machines.

specify a domain when deploying on iis

I am deploying a web application to a windows server 2008 named jonny521 using IIS7. The domain for most applications on this server is jonny521 however one of the application's domain is jonny521.development.local and I'm not sure how the application got that domain. I want to deploy another application to the domain jonny521.development.local so that it has access to the same cookies.
Does anyone know how I can put my web application in the domain jonny521.development.local?
You can put an application on arbitary domain on your Iis. Just create a new website and in website properties, set the domain as the host name.
The remaining part is resolving the host name by your os so that when you navigate, you get to correct server. You can use a dns server but you can also modify the local host file (system32/drivers/etc/hosts).

How can I showoff my ASP.NET application to my friends?

So, I made a cool demo which I want to show to my friends. But when I give them my IP-address (with the Development server's port and aspx page), it doesn't connect. How can I make it work?
They can't see the development server port.
It only serves pages to browser requests on the local computer.
You have to publish it to your IIS or to another machine that has IIS.
Deploy your site to your Local IIS server
The development server will only server connections from localhost. You need to deploy it to a real IIS server instance. Since you don't likely have Windows Server lying around, you can install IIS on any Professional edition of windows. Then your site will run on port 80, just like any other web site. You still may also need to forward that port on your home router.
Cassini (developers web server) has limitations and doesn't serve http requests from intranet/internet
You should deploy your site to IIS on your workstation (if your friends observe workstation via IP) or use Internet Asp.net Hosting
The development server can only be accessed by clients on the local box. You'll need to host your site on IIS to let them access it (assuming they're on your local network.) If you need to expose this on the internet, you'll have to get a hosting company to do that.
You are probably using the built-in webserver called cassini. By default, that webserver does only accept request from the localhost.
Set up a local IIS, and forward all necessary ports through the firewall
You should find a reliable and already configured webhost and host your site there. The first hit on google for "free asp.net host" was here.

Resources