My Localhost is not running - asp.net

When I run my local host from VS2010, I'm getting a blank page in the browser. Which means that I'm not able to run my asp.net project.
localhost:50319/Default.aspx
but typing in the address bar localhost only display the default page.
IIS is already configured and hosted over the internet using a static IP.
Without debugging I cannot publish or make any change to my site.

Related

trouble publishing app on IIS, always landing on welcome page

I'm trying to publish a C# app on my windows PC but cant succeed using IIS,
I've been publishing my app with with visual studio no problem,
When i add a new website on IIS and only specify the name and physical path the app is indeed working on localhost,
But when i add my IP to the host name, i can connect, but always land on IIS Welcome Page...
I've tried to move my published folder inside the default website folder but it does'nt seem to work either.
default page for reference

ERR_INVALID_REDIRECT When Accessing An IIS Website From Another Machine On The Network

I'm receiving an ERR_INVALID_REDIRECT error when trying to access the Default.aspx webpage from another computer.
I have setup a local website using IIS - from the machine where the website has been hosted using IIS, I am able to navigate to the Default.aspx webpage on the local browser.
I have setup bindings to an IP address so I can access it from other devices on the network. I have also setup the firewall to unblock all ports so I am able to access this.
Problem:
When I navigate on the local machine where I have the website hosted using IIS, I am able to see the Default.aspx webpage.
However, now that I have binded an IP in IIS to the website, I want to be able to reach it from another PC on the network.
Currently I am able to access all the webpages in sub directories and also the main directory for the website using:
192.168.1.165:81/SubDirectory/File.aspx
192.168.1.165:81/FileInLocalDirectory.aspx
BUT I am not able to access the homepage named 192.168.1.165:81/Default.aspx.
I have no idea why. The error I receive is
192.168.1.165 sent an invalid response.
ERR_INVALID_REDIRECT
I don't know what the issue is. I don't know if there is something in Default.aspx that is stopping the webpage from being displayed when trying to be accessed from a machine and not the local machine.
#LexLi

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

IIS Server - website keeps showing default page

I currently have a couple of websites setup on an IIS Server. I have setup the Host Headers correctly but whilst testing using the Hosts file (By adding in the URL and public IP address) - it displays the default IIS Start page instead of the actual website, this is the case for all of the websites added to the IIS Server.
Any help would be great.
Many thanks.

Use Local IIS Web server for debugging

So I'm trying to setup a local test domain so I can have a subdomain using this article. My problem is that I can set up the sites fine in IIS and browse to files there. But when trying to setup visual studio to use the site for eg. In Project Url: http://localtest.me when I click Create VirtualDriectory I get the following error: Unable to create virtual directory. The URL 'http://localtest.me' is already mapped to a different folder 'C:\Websites\site'.
If I delete the site from IIS and allow visual studio to try create it, I get the following error: Unable to create the virtual directory. Could not find the server 'http://localtest.me' on the local machine. Creating a virtual directory is only supported on the local IIS server. But the site localtest.me poits to 127.0.0.1, which is my local machine right?
So how do I set up debugging in a scenario like this where I already created the site in IIS?
Instead of using the "Use Local IIS Web Server" setting in visual studio I always check "Use Custom Web Server" and point it at my local url. for your example localtest.me with the start url above set to localtest.me
If you still run into problems you can always get into debug mode but doing attach to process instead of F5 and selecting the IIS process.

Resources