Installing .net site locally results in "This page can't be displayed" - asp.net

I've received some files for a site I'd like to update and am trying to get it running in IIS locally. IIS is working - if I go to http://localhost I get the index.htm file - but if I go to http://localhost/aspxsite/ (their files) I get "This page can't be displayed".
I'm very unfamiliar with this stuff - any suggestions would be appreciated.
I'm running IIS 7.5.7600.16385 on Windows 7 Pro.

1.Open IIS Manager.
In the Connections pane, right-click the Sites node in the tree, and then click Add Web Site.
3.In the Physical path box, type the physical path of the Web site's folder, or click the browse button (...) to navigate the file system to find the folder.
Go to C:\Windows\System32\drivers\etc\hosts.txt and add this line:
127.0.0.1 aspxSiteName
Type in browser http://aspxSiteName

Related

How to configure IIS 7 for localhost website?

I am new in Asp.Net
I have enabled features of IIS 7 on my windows system and able to see IIS manager.
I created an application but build/run application through visual studio it goes to browser and run the application with different port number. When i stop build/run application through visual studio and again i refresh browser application could not run.
I want to run application without visual studio. How to do this.
It gives this : http://localhost:9864/
To configure IIS with a new website follow these instructions:
Open IIS manager, right click Sites (At the right menu) and click Add Website
Give the site a Site Name, The physical path on your machine, and a Host Name
There are some conventions as for what website physical path to choose you can read about it in this SO question
In Windows Explorer go to C:\Windows\System32\drivers\etc and Edit the hosts file
Add this line at the end of the file:
127.0.0.1 your-chosen-host-name-from-iis-ie-localhost.testsite.com
And save the file
Thats about it. You can open your browser and browse the Host Name you chosen for your website or in IIS right click your site and click Manage Website - Browse
Important note
If you wish to use the same address as your VS uses (http://localhost:9864/) then on step 2 leave the Host Name textbox blank and instead change the Port textbox to your desired port (9864). In this case you can also ignore step 3.
As a site note:
If you installed IIS on your machine after the VS installation you might get some conflicts. You might be able by this stage to browse to static content as html but not .NET resources like aspx files. If by browsing to .NET files you get a message saying The page you are requesting cannot be served because of the extension configuration you can solve it with this SO question

Remove solution/folder name from url in sitefinity project while running on localhost

I have one Telerik sitefinity project developed on other machine. When I configure the project on my system and run on localhost it takes folder/solution name in url. Therefore while clicking on links it give 404 not found error.
Url created now is:-
http://localhost:xxxx/ProjectName/home
What I want is:-
http://localhost:xxxx/home
Just create a new website in IIS and point it to the project folder.
Then browse it using the host header of the site, e.g. localhost or even something like mysite.localtest.me (*.localtest.me will point to 127.0.0.1)

Turn off folder browsing with IIS

I have a hosted web site built using ASP.Net. I was working on an update and wanted to install it in a sub folder of the domain to test it. I published it using VS 2010, but the site would not run. I contacted the vendor and they made some changes. Although the site run you must type in the full path to default.aspx to view the main page. I was expecting that typing the path in to the browser will find and load default.aspx; instead it shows the folder contents in the browser window.
I contacted the vendor again and they said I must use IIS 7 or above to turn off folder browsing myself or they could do it for me for one-time fee of $95. I downloaded IIS and logged in to my domain, but I don't see the folder where the new site is. If fact, I don't see any of my folders or files. I don't see a WWWRoot. I'm not really sure what I'm looking at.
How do I find the folder in IIS? If I can find it I see the option to turn off folder browsing.
Greg
Enable or Disable Directory Browsing in IIS 7
https://technet.microsoft.com/en-us/library/cc731109%28v=ws.10%29.aspx
https://technet.microsoft.com/en-us/library/cc731109%28v=ws.10%29.aspx
Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7).
In Features View, double-click Directory Browsing.
In the Actions pane, click Enable if the Directory Browsing feature is disabled and you want to enable it. Or, click Disable if the Directory Browsing feature is enabled and you want to disable it.

Deploy asp.net on IIS 8

I'm trying to deploy a asp.net site on iis 8 but i'm getting an error.
Site is working in visual studio, deployment is done without error using a custom profile with file system as publish method. (Here is actually my first question, should I use file system?)
Build->publish site->(Custom profile, file system, release)
Well, the site is added to selected folder which I've set up in IIS. I host several php pages from this folder whithout problem. But when I try to url forward to the new site I get this error: Given URL returns 500
I'm using IIS8, .tk adress through a dlinkddns.com adress
Any ideas?
Edit: added picture
What should I choose here if i'm hosting the page on the same computer? (I tried File system for now)
The error I get when I'm opening default.aspx
To deploy a website into IIS8 from Visual Studio, use 'File System' instead of 'Web Deploy', and put in the directory of where you want to publish your site.
Right-click your site name on your IIS 8 manager, select 'Add Application', and select the folder where you published your website in your physical path.
Click on the application under the website, then click browse, and you should view the website on your browser.
You can look at my question on how to create new website under the title, 'New website not showing default page in IIS 8.5'.

Publish Visual Studio 2010 web application to localhost

I created a new web application in visual studio 2010.
I tried to publish it to the same computer (localhost) Windows7 64 bit/IIS7
No luck
I read some remarks from others, I also tried to specify the machine name instead of localhost.
I also tried creating a web setup project...
When I "surf" to localhost , I get the IIS7 welcome screen.
you don't need to publish it, just point the virtual directory in iis to your source code.
To host your web application, firstly you need to publish the app to a desired location; after publishing, then open IIS Manager(type "inetmgr" in run and hit enter) and go through sites path from the left panel and then right click on the sites and select "Add website"; In the next step, Add Website form will be opened asking you to enter some details; Enter the sitename, link the physical path to where you previously published and lastly give the port num; If you want to open that website in the port 80 itself, leave it as 80 and then click OK.. You can now browser your published web application... :)

Resources