IIS 6 force IIS to display hostname instead of ip address for dotnetnuke - asp.net

hope someone can provide me some insight on this iss problem!
Th situation is this, i understand that upgrading to IIS7 is absolutely necessary for security but will do so in the future but now, i'm using IIS6 and would like to force IIS6 to display qualified hostname of the IP address.
So far my other websites had gone through and been changed to display the qualified hostname but my dotnetnuke server (version 4.08.04), i am unable to locate the file(dnn or iis6) to change this.
I've used this procedure below for changing
IIS < 7
Force IIS to Display Hostname
It is possible to force IIS to display the hostname of the server instead of the IP address via the following:
Open a command window
Select "Start"
Select "Run"
Type in "cmd" and press enter or select the "OK" button
Browse to the "C:\inetpub\adminscripts" directory (or wherever this directory is located on your server)
Run the following commands:
adsutil set w3svc/UseHostName True
net stop iisadmin /y
net start w3svc
The IIS web service will now return the qualified hostname instead of the IP address.

You can do this with a setting in DNN using the Ifinity Friendly URL provider http://www.ifinity.com.au/Products/Friendly_Url_Provider_For_DNN
Because you are on such an old version of DNN thought you might have to go back to a fairly old version of that provider to make it work. DNN 4.8.4 has quite a few security bugs, so upgrading to a later version of DNN (even on IIS 6) would be ideal.
I believe you could upgrade to DNN 6.2.8 (or whatever the last 6.* release was) without having to upgrade IIS, though you would need .NET 4.0 for any version of DNN after 5.1

Related

Different result in IIS express and IIS

I recently installed webmatrix on a windows 2008 machine.
I installed dotnetnuke using webmatrix, I visited the site using a browser on the server, finished installing the site, and everything works just fine.
I than created a site in IIS, and pointed it at the folder where I installed dotnetnuke.
When I visit the site using my domain name and on port 80 with a browser on my server, it takes me to the install page. When I visit the site using a remote computer, it says "This site is currently Unavailable Please check back later". Yet, when I visit it on iis express, it works perfectly!.
What is wrong?
thanks!
There are a number of things that could be going on at this point.
Incorrect permissions - Ensure that the ASP.NET Worker Process has full permissions to the DotNetNuke directory. (With IIS Express, you are using your user account IIRC)
Incorrect database access - Ensure that the connection information is correct for the database. As with the above, if the connection for example has a "Integrated Security=true" option defined, you will need to either change this to a SQL account or add the ASP.NET worker Process user to have permissions
It could be a missing Portal Alias, but the current versions of DNN don't have the same issue as you use to.
ALso make sure that the UsePortNumber option in the web.config is set to false.

How to set up a asp.net application on IIS

I've copied a whole folder which keeps a website inside from a web server to another computer.From the original server I can easily run the web application. Now I need to know what exactly I have to do in order to be able to run the application on the second computer too. I think there are some special considerations with IIS. What and how do I have to set up in IIS?
Follow these steps.
create a new site from left menu By right clicking and add new website.
Give physical path to that folder
Map with the site url
Give permissions to Directory as (like everyone)
Set up the default page if (index page is not present in the directory)
Set framework which ever you are using.
Install the IIS Windows component for whatever version of Windows you're using.
Create a new site in IIS
Point this new site to your web root
Configure DNS for the site (maybe using your hosts file)
There are some considerations to make depending on which version of IIS you are using. It would be helpful to know if you are using 6 or 7.
If you are under 7, you need to copy the site to your IIS directory (typically wwwroot) and then setup the basic settings in IIS by choosing your application pool and such. Application pools are typically (but not always) setup by .Net Framework. You may need to setup your default page and set it as an application. There are many blogs and sites out there that will tell you how to setup this basic functionality but are specific to your application.
For configuring IIS
1. Firstly, in Programs and features go to Turn on and off windows features...in that tick everything under IIS..go to sub folder and tick everything everywhere
Go to Internet Explorer> Setting> Internet Options> Advanced> untick Show friendly http error messages option
Go to IIS manager
a. In default application pool> advanced settings > Set true enable 32-bit program option
b. Go to Asp> setting> expand debugging properties> there will an option of error messages some 2nd last or last option that would be false...set it to true..apply changes
Run vbscript and asp only in Internet Explorer (edge 10 in developer options for pop ups)

asp.net setting up subdomain on localhost

I added the following entries in the HOSTS file.
127.0.0.1 abc.localhost.com
127.0.0.1 xyz.localhost.com
Using the VS2010 ASP.NET Development server I am unable to run or execute the website.
When browsing http://localhost:2687/TestProject/ it shows up the default.aspx page. But when accessing http://abc.localhost:2687/TestProject/ it shows a website cannot be found page.
Is there anything else to be done when setting up subdomain on localhost.
EDIT: To make this work I removed the .com and in IE-->Connections-->LAN uncheck everything. Subdomains with port works are correctly getting forwarded. Nothing else need to be configured.
Obvious mistake is that in your hosts file you have abc.localhost.com, whereas you are browsing to http://abc.localhost/folder
Not the same thing.
Not sure this will work as you intend anyhow. I would also recommend IIS Express, part of WebMatrix, which I think is still in beta, or just use IIS. IIS 7+ on Vista, W7, Server 2008 is all really easy to use.
Use IIS or IIS express, rather than Cassini. (For several reasons, which you can google or look for on stackoverflow)
With the IIS you can easily add a hostheader entry to you webapplication with just 2 clicks.
Be aware, that you are assigning both a Url and a port.
So adding abc.localhost won't allow you to browse abc.localhost2687, just the default port (80). If you also want to browse to abc.localhost:2687 you need to a a hostheader entry according to that that Url and port.
This screenshot shows you the dialog to add hostheaders (the picture is from IIS 6, but in IIS 7 or IIS 7.5 it looks very similar)

Friendly URLs for localhost ASP.NET websites

I Use Visual Studio 2010 with ASP.NET 4.0 and IIS7.
When I open my site, the URL looks like this
http://localhost:6549/Website/help/tab/contact-us
I want a friendly URL:
http://mysite/help/tab/contact-us
or anything that will help me to get rid of the Port 6549 from URL
http://localhost/Website/help/tab/contact-us
I use ASP.NET Development Server which is what Visual Studio use when you run a localhost website
Wait !! Please make distinction between "Properties window" and "Property pages" of the project. I always tried your advices, but using "Property pages", and there is no such property like Use dynamic ports on that page. This property can be found only in the "Properties window"
Assuming it's the ASP.NET development server:
To get rid of the port number you need to do this
- go to properties of the project
- click the web tab
- check the specific port and assign 80
There is also a virtual path setting here which you could set to /
Is your solution configured to use IIS and not the ASP.NET Development Server? There is also a property on the web application where you can specify the port (or allow for a random port to be chosen) - port 80 is the appropriate port - this requires administrator access to the process that is launching the web site.
Edit:
I was thinking you can use your host file to redirect the user, but I checked and you can't redirect to a port.
If you have IIS7 on the machine, just make the location of your web development folder into a virtual directory on IIS.
Then you can access it by http://localhost/website/

Getting 404 with locall IIS 7 served page

My setup:
Vista 64-bit PC (my local PC)
IIS 7 obviously
VS 2008
I setup a new "Application" manually under the IIS default site. It's running.
The application is pointing to the correct directory (where my default.aspx exists)
I've setup this same exact setup on our dev server running Server 2008 and it runs fine
But for me, when I go to http://localhost/MyAppName I get a 404 not found.
I have no clue why.
So since that did not work and still got a 404, then I tried instead changing from using the VS web server to using IIS in my web project properties in the "Web" tab in VS 2008. Then clicked the "Create Virtual Directory" button and it created a new Application in IIS for me. Same thing though. If I go to that address, I get a 404 on my local machine where it's running.
Ok, I had not installed the IIS 6 functionality of IIS in Vista. I did not know it still used legacy features in IIS 7 to run sites locally....I guess. Not sure why but I guess it uses these IIS6 features. Will have to research why it's dependent on this stuff.
Do you have the home directory to look for "default.aspx" as the default page?
A couple things to check:
First, look at your access logs to see exactly what request is getting logged.
Check your IIS config - you may have a default.aspx page, but is IIS configured to use that as one of the default pages? If you go to http://localhost/AppName/default.aspx do you still get a 404?
If you put a static test.html file in the same directory, can you access it?
These should all help determine the cause.

Resources