IIS: How change URL to include site name when browsing web files - iis

In my IIS, I have created "App1" as my site name and setup everything.
Now when I browse one of my web file from IIS, the URL for that page is something like "http://localhost/Folder1/Default.aspx".
But back to last time when I was using window 7, the URL that I can get is "http://localhost/App1/Folder1/Default.aspx", now I'm only getting "http://localhost/Folder1/Default.aspx" after I upgrade to window 8. I'm not sure if it's window 8 that causing the issue or anything, but I need advice on how to include the site name when I browse the file so that I can get "http://localhost/App1/Folder1/Default.aspx".
The reason why I need to include site name is because my entire project solution is calling files and web services that including the site name since long time ago. Without the site name, I can't run the program at all because I can retrieve data from any web service
Can anyone advice me on how to include site name in IIS?
I tried Directory Browsing but seems not the solution in my case. I try search for how to include site name in my domain but usually end up directing me to Directory Browsing.
FYI, my application pool setting is as below:
.Net CLR Version: v2.0.50727
Managed Pipeline mode: Classic
Really appreciate any help on this.
Thanks

Just in case anyone face the same issue like me, I found my solution.
Yesterday I just thought of instead of searching Google for so many hours looking for how to include site name in my URL, I remove the App1 application in my IIS. Then, in the physical directory of my App1, I created one new folder call "Main" and I move my App1 folder into Main.
When I create a new application in IIS, i create new application as App1 but point the physical application path to "Main". This way, when I browse one of the web files in IIS, I can see something like "http://localhost/App1/Folder1/Default.aspx" which totally solve my problem, and my program can run properly now.
Although I still do not know how to include site name into the URL and why the site name is missing. But at least this solve my issue now

Related

iis 10 Static Website: Deleting default site and creating completely new site (how to access new site)

This post needs help from experienced iis administrators, but must be explained in details for EXTREME newbies.
What I am doing:
I have two computers, both running Windows 10. One is a desktop and one is a laptop.
iis is enabled on both computers. Each computer can access the iis web server from the other and pull up a page from the other - using the ip address.
There is no DNS or host files being used (this is by ip address only), nor do I want to use any sort of naming.
Both computers are running an identical website, and the website files are in a different directory than the default. The structure is like this:
C:\inetpub\ROOT\myWebsite\myIndex.html
web.config
Changes I've made - now a few problems.
On both computers I have deleted the DefaultAppPool and the default website that comes installed with iis. This has not stopped the website from completely working, so adding that back seems unlikely to fix my problem.
I have deleted my application pool and website from iis (never deleting the actual files from the file system) several times, and added it several times. Each time I do this, my site comes back, but with the same problem I am having.
I have deleted all of the default documents, and the only default document listed in iis is myIndex.html.
myIndex.html initially displays a graphic image (using the standard tag), and this image comes up. Sort of. See explanation below.
The problem I am having
Before I started this project, I had iis working on the desktop with the default site and app pool and simply added some of my own files with really simple text content and some pics. I had replaced the default iis splash image with my own image, and all that worked with no problem.
the image that comes up is a link to another page that has a list of links to other stuff in my website. It all works no problem there.
Now, with the setup I have now, on the desktop I was originally using (in the paragraph above) if I pull up my website locally, myIndex.html loads in the browser and my image comes up, and everything works fine.
The same is true on the laptop, when I access the site locally.
However, if I attempt to access the desktop site (using its ip address) from the laptop, it pulls up the old splash image from the default site I deleted.( I left those files there even though I deleted the site from within iis). All those files are in the default location C:\inetpub\wwwroot.
If I move those files to another directory, thus leaving C:\inetpub\wwwroot completely empty, then when I access the site on the desktop (via the ip address) from the laptop, my new site comes up without a problem.
While it seems I may have solved my problem by moving the file from the previous project, doing that does not teach me how iis is actually working, and why files from a website that no longer exists in iis are still being accessed from remote computers.
So, please teach me something about the internal workings of iis, and how it chooses to access the different application pools and websites.
Again, please word your answers for complete newbies, because I know a little but not enough to get real technical.
I have been reading posts on stackexchange.com and other sites; links to microsoft docs etc. That's not helping as those docs are expecting too much prerequisite knowledge, and speaking in terms that are not really explaining things in a way I can understand.
You have described several different problems. I will try to address each of them (contrary to S/O recommendations).
First, when you make changes, and they don't seem to show up, it is usually because of caching. IIS always wants to cache files/configs. So does your web browser. So, to force an accurate test, you need to dump your browser cache and cycle IIS (to make sure it drops its cache and loads new files and configs). Start there.
Second, IIS is designed for settings inheritance. Which means, each app and each folder will inherit settings and permissions from the parent, unless you override them. Overriding them can be done by files and/or IIS configs (application vs folder). The IIS configs are the stronger of the two.
Also, the IIS config for "default files" might have come into-play for your test. If you didn't set up MyIndex.html as the top-most default file, then IIS would look for other files first. In fact, if you don't have MyIndex.html in the list of default files, IIS would have to depend on your app to choose that as a default page (MVC routing, etc).

I have copied files via FileZilla to Azure but the index page doesn't show

I shall try not to be subjective so as not be closed.
This is my first foray into Azure and it really is NOT like my dedicated server on another hosting company. Suffice it to say, what takes me minutes to deploy a site via FTP, then to IIS to set it up, has taken me WEEKS!
I don't want to set up any of the "pre-packaged" Quickstart solutions. I simply want my INDEX.HTML file to DISPLAY.
I copied all the files via Filezilla to Azure, quite easily, but yet, when I go to the URL, I keep getting:
Your App Service app has been created
Go to your app's Quick Start guide in the Azure portal to get started or read our deployment documentation.
Everything is set up on Azure perfectly.
Here's what it looks like under the appSettings Tab:
**Virtual applications and directories**
/ site\wwwroot Application …
/wwwroot site\wwwroot\mynewsite Application …
The directory, site\wwwroot\mynewsite has an index.html but it will not display when I type in the URL.
I already built the site and the company I'm working for wants it on AZURE.
A dedicated server takes under 15 min. This has taken weeks.
UPDATE:
Thiago, thank you... so here's the file structure below...
Reveals EXACTLY what my directory looks like. Under /thingblugrow is where "the fake name" mynewsite exists. I thought it'd be easier to just show you what I really have.
So, /thingblugrow has an index.html file....
If your want to visit http://yoursitename.azurewebsites.net/mynewsite/index.html,
The appsetting we need config it as following in your case:
Virtual applications and directories
/ site\wwwroot Application …
/mynewsite site\wwwroot\thingblugrow Application …
You also can refer to another SO Thread to get more info about creating Virtual applications and directories
You're adding an extra level, so in your case you'll be able to see the index through:
http://yoursitename.azurewebsites.net/mynewsite/index.html
Just move all the content from "mynewsite" folder to the parent directory (wwwroot).

Error 403.14 when serving page from IIS

This is very simple to reproduce:
Create a new VM (xtra small in my case, tried both Windows 2012
and 2008R2)
Install IIS using default config.
Create a Web Site using IIS Manager specifying a folder such as
C:\inetpub\simple.
Using Windows Explorer, create a new file called index.txt
Rename the file to index.htm
Edit the file with Notepad to make it a basic but valid html5
document and Save.
From IIS Manager, select the new website and click the Browse
Website link on the right side of the screen.
I get:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Now look at the Contents of the web site in IIS Manager and you will see that the file has a .txt extension pasted onto the end : index.htm.txt
This does not happen on my local server.
I am new to Azure and probably missing something very basic but right now I feel like I am going insane. Can anyone put me out of my misery?
This is IIS configuration issue, not Azure specific. And I would not even say it is an issue at all.
index.html is not in the list of default documents for IIS. And has never been. index.htm however is. You get 403.14 forbidden, because Directory Browsing is by default forbidden in IIS. Again, absolutely typical IIS configuration which hasn't changed for ages!
Your solutions:
Configure index.html to be in default documents (read how to do this here)
enable directory browsing (read how to do it here)
For the sake of others as stupid as me, this is all down to Windows Explorer configuration. Normally, the first thing that I do with a new Windows install is to turn off 'Hide known filename extensions'. This time I forgot.

Does ASP.NET MVC 4 application have to be in the root folder of a site on IIS 8?

iI have a ASP.NET MVC 4 application based on the VS 2012 Basic template. Using VS 2012, I can deploy the app into a root of an IIS server, such as c:\inetpub\wwwroot. Then, I can go to [http://]mymachine/ and see the app.
But, if I try to move the app to c:\inetpub\wwwroot\Test, an attempt to access [http://]mymachine/Test results in "HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory."
I tried to move the folder both manually, and also by deploying to that folder from VS 2012, but there was no difference. I tried to move the web.config file into c:\inetpub\wwwroot while leaving the rest of the app under c:\inetpub\wwwroot\Test, but that also doesn't work. I have to move global.asax, global.asax.cs and the bin folder into the site root, but then the whole app is again in the root folder, which is not what I wanted.
Does anyone know whether what I'm trying to do is possible? Thanks.
PS.: Sorry about the link formatting - I used the square brackets around [http://] to prevent stackoverflow from treating the example URIs as links.
You need to ensure that the sub-folder has been converted (or created) as an application in IIS. Load the IIS manager and locate the folder under the website node in the tree, right-click and select convert to application. If it's not listed, use the add application option.
Keep in mind that the child application will inherit web.config settings from it's parent by default (among other things). More information can be found on MSDN.

Directory Listing Denied in Orchard

I have a new Orchard site which successfully runs the setup and database configuration when running locally. But when I tried to deploy it to the actual server and point a browser to the site, I get a "Directory Listing Denied" error.
Anyone seen this and fixed it?
I figured it out. Running on a shared web server, if IIS is configured for my site to use the default app pool, Orchard is precluded from reading its own files. (Remember that Orchard uses libraries and needs deep read/write access to subdirectories).
So the solution was simply to configure the site to run in its own isolated application pool.
Looks like this on my site's control panel:
Hope this solution helps someone down the line.
My guess is that you deployed the whole source code instead of src/orchard.web.

Resources