Change IIS Bindings HostName to use other than localhost/server name - asp.net

I've made an ASP NET page, and put it on a Windows 2008R2 server running IIS and DNS. (Those are the only 2 roles in server manager.)
Without me touching anything the following urls work to get to my site:
ServerName = REALLYCOOLSERVER, IPAddress: 123.123.123.123
http://REALLYCOOLSERVER/App/Login.aspx
http://123.123.123.123/App/Login.aspx
http://localhost/App/Login.aspx
I am on a domain.
I would like to be able to have users of the site navigate to something like:
http://foo/App/Login.aspx
Here's what I've been trying:
Opened IIS Manager, Sites > Edit bindings
There is one row here with Type: http, Host Name: blank, Port: 80, IP Address: *
From what I've read, I simply needed to edit this row, and set a Host name: foo
Then in DNS manager, Forward Lookup Zone > New Zone > Primary Zone (company.com) > Create new file with this file name (company.com.dns) > Do not allow dynamic updates > Finish
This produces the 3 types: Start of Authority(SOA), Name Server(NS), and Host(A) rows.
The A row's name is the server name, with Data being IP Address (123.123.123.123)
My research shows me if I create an Alias (CNAME) with:
Alias name: foo
Fully qualified domain name (FQDN): foo.company.com
Fully qualified domain name for target host: Browse > to A record..so.. servername.company.com
However, when I got to IIS Manager and click on Browse foo on *:80(http), I get a broken link. Also, in my browser when I got to http://foo/App/Login.aspx it's also a broken link.
Any help would be greatly appreciated.
Thanks.

Related

DotNetNuke website migration to Azure fails with nx domain DNS error

I am currently working on a DotNetNuke website (07.03.02) and I am trying to migrate it to Azure. The website is working on my local machine with IIS.
I followed this tutorial to migrate the website : http://www.dnnsoftware.com/community-blog/cid/154975/moving-a-dnn-install-to-microsoft-azure-websites
So I created a new web application on Azure that will host the website files. I also created a new database on Azure, and I imported my DNN backup database.
I changed the connection strings in my web.config to use my Azure database, I uploaded the website folder on Azure.
Now if I try to browse my webapp using the link [sitename].azurewebsites.net, I get the following error :
DNN Error Domain Name Does Not Exist In The Database
DotNetNuke supports multiple websites from a single database/codebase.
It accomplishes this by converting the URL of the client browser
Request to a valid PortalID in the Portals database table. The
following steps describe the process:
Web Server Processing When a web server receives a Request from a
client browser, it compares the file name extension on the target URL
resource to its Application Extension Mappings defined in IIS. Based
on the corresponding match, IIS then sends the Request to the defined
Executable Path ( aspnet_asapi.dll in the case of ASP.NET Requests ).
The aspnet_isapi.dll engine processes the Request in an ordered series
of events beginning with Application_BeginRequest.
HttpModule.URLRewrite OnBeginRequest ( UrlRewriteModule.vb ) The
Request URL is parsed based on the "/" character A Domain Name is
constructed using each of the relevant parsed URL segments.
Examples:
URL: http://www.exemple.com/default.aspx = Domain Name: www.exemple.com
URL: http://209.75.24.131/default.aspx = Domain Name: 209.75.24.131
URL: http://localhost/DotNetNuke/default.aspx = Domain Name:
localhost/DotNetNuke URL:
http://www.exemple.com/virtualdirectory/default.aspx = Domain Name:
www.exemple.com/virtualdirectory URL:
http://www.exemple.com/directory/default.aspx = Domain Name:
www.exemple.com/directory
Using the Domain Name, the application queries the database ( Portals
table - PortalAlias field ) to locate a matching record.
Note: If there are multiple URLs which correspond to the same website
then the website alias field must contain each valid Domain Name in a
comma separated list.
Example:
URL: http://localhost/DotNetNuke/default.aspx URL:
http://MACHINENAME/DotNetNuke/default.aspx URL:
http://209.32.134.65/DotNetNuke/default.aspx PortalAlias:
localhost/DotNetNuke,MACHINENAME/DotNetNuke,209.32.134.65/DotNetNuke
Note: If you are installing the application to a remote server you
must modify the PortalAlias field value for the default record in the
Portals table according to the rules defined above.
So I inserted the Site Alias ([sitename].azurewebsites.net) record into the PortalAlias table as mentioned in the turorial.
Now when I try to reach the website [sitename].azurewebsites.net, I don't have the previous DNN error but it loads for a long time and then I got the following error :
www.[sitename].azurewebsites.net’s server DNS address could not be
found. DNS_PROBE_FINISHED_NXDOMAIN
After the load end, the URL curiously become https://www.[sitename].azurewebsites.net and the DNS error occur.
Is there something I need to change in Azure or in my web.config file ? Maybe there is something to configure in DotNetNuke or in the ASP version?
I don't get why my browser change the url and why this dns error occur (I have no issues with my local IIS server).
(I also tried by using the automatic portal alias transfer as mentioned in the tutorial but I got the same result : the alias is inserted in the database but I still have the NXdomain error)
Thank you for your help !
Etienne.
In your original post you have:
www.[sitename].azurewebsites.net’s server DNS address could not be found. DNS_PROBE_FINISHED_NXDOMAIN
Try to manually put the . (The full, http with colons, etc.) Sometimes the web browser will add the WWW automatically, thinking you wanted it (I hate when they do that). Azure doesn't know about the www subdomain, so that is why you are probably getting that error.
Edit: Oh, and the long load time is good - it means that azure compiled your site and you didn't get a compile error.
The fact that you get an error that comes from DNN is good news, and means that you have (probably) done the major work correctly.
Now, you need to get into your database and modify the PortalAlias table so that there is an alias for sitename.azurewebsites.net. (I'm assuming that the brackets around sitename are incorrect and "[sitename]" eeds to be replaced by the actual domain name for your site.)

How do I configure my DNS record? - MeteorJS

How do i configure my DNS record to point to galaxy?
I bought a domain with the following attributes:
Type: CNAME Record
Host: www
I am kinda lost here, I don't know where I should actually configure my DNS. In my project, or the website I registered my domain in? and how?
The following is my host records:
In Galaxy
Log into galaxy
Click on your app.
Click on settings.
In domains, click add new domain and enter your domain
In the description for the Domains and Encryption section you will see an address that looks something like us-east-1.galaxy-ingress.meteor.com. Copy this down.
On your host
Create a new custom resource record Name: *, Type: CNAME, Data: us-east-1.galaxy-ingress.meteor.com (or paste yours if it differs in galaxy).
Create a new custom resource record Name: www, Type: CNAME, Data: us-east-1.galaxy-ingress.meteor.com (or paste yours if it differs in galaxy).
Let me know if you have any questions! There is a bit more to a full deployment, the docs on http://galaxy-guide.meteor.com/deploy-guide.html go in depth on how to setup everything else.

Windows Authentication occurs automatically with machine name, but not with '.com' domain

I am trying to get a better understanding of what is going on with Windows Auth in our ASP.NET MVC 4 application.
It's just using standard Windows auth, and when I access the application via the machine name, from a workstation on the domain:
http://product/
Then authentication occurs automatically, and I am allowed through.
However, if I access the SAME machine, using a host-name that has been mapped in our DNS (to the exact same internal IP):
http://product.company.com
then I am presented with the basic authentication box for my Windows credentials. I can type them in and proceed, but I want to know - why am I being prompted to enter my credentials in the former, but not the latter, and how would I correct this?
[EDIT]
Here are some results of NSLOOKUP
C:\Users\me>nslookup
Default Server: dnsserver.company.com
Address: 192.168.4.250
> product.company.com
Server: dnsserver.company.com
Address: 192.168.4.250
Name: producttest.company.com
Address: 192.168.5.106
Aliases: product.company.com
> product
Server: dnsserver.company.com
Address: 192.168.4.250
Name: producttest.company.com
Address: 192.168.5.106
Aliases: product.company.com
Just add your site to the local intranet zone in browser options.

mvc3 routing with 2 different domains

I've developed a multi-culture app in mvc3. I have a table that holds a domain list (currently 2 records):
www.mydomain.com -> en-US
www.mydomain.pl -> pl-PL
My app dynamically checks which domain you're coming from and then sets the CurrentCultureUI depending on the domain. This works fine on my localhost as I've also added these domains to my host file, however i'm not sure how I would handle this on the live envirenment?? (yes i did purchase both domains already) any ideas?
EDIT:
I've purchased a '.com' domain AND Hosting from godaddy AND another '.pl' domain from a different registrar (home.pl). I've uploaded my site to the godaddy but the 'pl' version doesn't work. Now, when i go to my domain mngr for '.pl' domain i have an option to "use other host" and text boxes for "DNS" and "IP". Is this what i need to do? what would i need to get from godaddy? to 'home.pl' domain configuration??
I'm not see any problem if it's work locally with hosts file.
In real life no difference because host file replace DNS records in real world.
Point your real domains to same IP address.
Easy for support future domains point .com to IP address and in other domains add CNAME to .com domain. In this case if your IP address was changed you need change only DNS records in .com domain.
First, you need to get the public IP address of your hosted GoDaddy server. Next, you need to select 'Use other host' and enter that public IP address as the IP address for your 'pl' domain name.
After you have done this, you must go into your hosted GoDaddy server, and run IIS Manager. How you proceed will depend on whether the hosted server is running IIS 6, or IIS 7+.
For IIS6, you would select your site, right-click and choose 'Properties', make sure the 'Web Site' tab is selected, then you would click the 'Advanced' button next to the 'IP address' box. In the 'Advanced Web Site Identification' window, in the 'Multiple identities for this Web site' section, you would click 'Add', enter 80 for the TCP port, and enter your .pl domain name in the 'Host header value' box. Click 'OK' to close each window, until you are back at the main IIS Manager window.
For IIS7+, you can follow the directions at http://technet.microsoft.com/en-us/library/cc731692(WS.10).aspx
Once you have added the binding for your 'pl' domain name on the hosted server, and after the DNS change to point your 'pl' domain name to the hosted server propagates, everything should work as it did on your development server.
counsellorben
You need to point the .pl name to your site at .com.
You do this with a CNAME record at www.mydomain.pl pointing to www.mydomain.com.
Don't forget the period at the end. It's important in CNAME-records.
Ok, finally got it working. this is my solution (counsellorben pointed me in the right direction to get this solved)
Solution:
1) Log on to your godaddy account -> my products -> domain manager -> DNS manager ->
you will get a list of your domains.
On top you will notice 3 buttons: "Renew", "Upgrade", "Offsite". Click "Offsite" -> Add new Off-site -> for domain name enter your domain name purchased at third party domain service (in my case it was: "myawesomedomain.pl"). DO NOT check off "This domain will be transferred if you do not want it transferred (currently godaddy doesn't support European domains).
In the popup box you will also notice two nameservers listed. Write these down for later step.
Nameservers:
mns01.domaincontrol.com
mns02.domaincontrol.com
Once you've created an off-site domain click on "Edit zone" link below it. Once there enter the following info:
A (Host): Host: # | Points to: IP address of your .COM domain/hosted by godaddy (myawesomedomain.com)
CNAME (Alias): Host: www | Points to: #
2) While still on godaddys website go to "My products" -> Hosting -> click on your '.COM' hosting service -> Launch -> You should be in "Hosting dashboard":
Click on "settings" -> Domain Management -> click "Add Domain" and enter your european domain name (in my case it was "myawesomedomain.pl"). So now in domain manager I would see two domains listed:
myawesomedomain.com
myawesomedomain.pl (newly added domain)
3) Now log in to your third party domain service and point your domain (in
my case 'myawesomedomain.pl') to godaddy's default hosting nameservers. In my case
I had to log in to home.pl -> configure domain -> "Use external DNS
server". Enter the following for DNS1 and DNS2:
a. mns01.domaincontrol.com
b. mns02.domaincontrol.com
The change should propagate within 24 hours.
Thanks

Error Domain Name onlinethailandbooking.com Does Not Exist In The Database

I am shifting my Website to another server.
i take the back up of both the website and database also. now when i configured it on new server it first shows the upgrade to database and then shows the error of
Domain Name onlinethailandbooking.com Does Not Exist In The Database
DotNetNuke supports multiple portals from a single database/codebase. It accomplishes this by converting the URL of the client browser Request to a valid PortalID in the Portals database table. The following steps describe the process:
Web Server Processing
When a web server receives a Request from a client browser, it compares the file name extension on the target URL resource to its Application Extension Mappings defined in IIS.
Based on the corresponding match, IIS then sends the Request to the defined Executable Path ( aspnet_asapi.dll in the case of ASP.NET Requests ).
The aspnet_isapi.dll engine processes the Request in an ordered series of events beginning with Application_BeginRequest.
HttpModule.URLRewrite OnBeginRequest ( UrlRewriteModule.vb )
The Request URL is parsed based on the "/" character
A Domain Name is constructed using each of the relevant parsed URL segments.
Examples:
URL: http://www.domain.com/default.aspx = Domain Name: www.domain.com
URL: http://209.75.24.131/default.aspx = Domain Name: 209.75.24.131
URL: http://localhost/DotNetNuke/default.aspx = Domain Name: localhost/DotNetNuke
URL: http://www.domain.com/virtualdirectory/default.aspx = Domain Name: www.domain.com/virtualdirectory
URL: http://www.domain.com/directory/default.aspx = Domain Name: www.domain.com/directory
Using the Domain Name, the application queries the database ( Portals table - PortalAlias field ) to locate a matching record.
Note: If there are multiple URLs which correspond to the same portal then the PortalAlias field must contain each valid Domain Name in a comma seperated list.
Example:
URL: http://localhost/DotNetNuke/default.aspx
URL: http://MACHINENAME/DotNetNuke/default.aspx
URL: http://209.32.134.65/DotNetNuke/default.aspx
PortalAlias: localhost/DotNetNuke,MACHINENAME/DotNetNuke,209.32.134.65/DotNetNuke
Note: If you are installing the application to a remote server you must modify the PortalAlias field value for the default record in the Portals table according to the rules defined above.
I look into the database dbo.portalalises but there is only 2 entries of portal but i have 3 portals..i think it can't generates the portal id automatically?
how this error be solved?
Check your permissions on your web folders match those of the AppPool your site runs under on the new host
Verify your database connection and permissions
Verify that your entry in the PortalAlias table in the database is correct for your new host
For anyone having this issue, I had the same issue, after I made sure that I have updated the "Portal Alias" table in db, to have a HTTP Alias (for my local host, I set it to localhost:8089 which was equal to what I had set up in IIS binding for DNN website), with the portal ID of 0 (as my portal id was 0), I was checking to be sure I have updated web.config file with data base connection strings, but then I realized there were two points for database connection in web.config, and I was missing one of them. So make sure to update both two connections as:
1) <connectionStrings>
2) <appSettings>
Hope this helps.

Resources