I have IIS installed on a server.
It is currently on the intranet as http://mySite which has a few basic html pages that load when you go to that URL
I've made a virtual directory called MyWebApp, which sits at http://mySite/MyWebApp
How do I go about making MyWebApp the default site when you type mySite into the browser?
I don't want it to come up as mySite/MyWebApp when you visit the page either.. I just want it to always say mySite.
Wouldn't it just be simpler to build your app in your root directory? However, you can change the root directory of your IIS6 website by:
To change the home directory of a Web site using IIS Manager
In IIS Manager, expand the local computer, expand the Web Sites directory, right-click the Web site you wish to change, and click Stop.
Use Windows Explorer, to rename the LocalDrive:\Inetpub\Wwwroot directory to the name of your choice. Alternatively, you can copy the entire \Wwwroot directory tree to a new location.
Related
I've created a new web site in IIS on my machine for testing purposes. Beneath the root I have a folder called documents where I have a bunch of pdf's that should be downloadable. However, when I hit the URL localhost:54510/documents/file.pdf I get a 404 error (Chrome, IE and Firefox).
I've added IIS_IUSRS permissions for the specified folders and the service is running since I can access my ASPNET WebApi - localhost:54510/api/whatever-service-function.
I can't grasp my head around what causes this.
PDF is specified in MIME-types as Application/pdf.
Another thing is, when I add the documents folder as a virtual directory in the Default web site then it works to download it from localhost:80/documents/file.pdf.
I have also tried to add the documents folder as a virtual directory in my web-site and set my local user as the authenticator to see if it had anything to do with permission.
I'm running on IIS 10.
Does anyone have any ideas?
I want to use IIS the way I use Apache. With that, I mean to, for example, create a simple html file, with only a "hello" message, put this file inside the IIS folder and then be able to access this html page thru eg.: localhost/mypage.html.
I can't figure it out how to make this. I've searched on Google, but nine has helped me.
My doubts are:
The IIS server is turned on, I saw this on the IIS Manager. So, what are the folder that I should place my html file and what are the default port that IIS uses so I can access my html file via localhost?
Create a new website and point to the folder where your html file resides
GO to IIS Manager->Right Click on Sites -> Add Website
Are you getting the localhost default screen
Restart Your server as whole,
See if the IIS Worker Process is running on the task manager,
I can create a Website in IIS 6 just fine. But can't find out how to browse to it. I created a Website called TestWebSite and I try
http://myservername/TestWebsite
but it does not work.
But if I create a virtual directory under my website called TestVirtual I can browse to it.
Why can't I browse to the Websitename?
I'm dealing with an issue where there was a site setup, and the default.htm used an iframe which pointed to an ASP directory. It seems like the ASP directory isn't readable and not processed - is there anything special that needs to be done to the ASP directory like permissions-wise?
wwwroot/sitename
<iframe src="ASP/file.asp"></iframe>
wwwroot/sitename/ASP/file.asp exists, and several other asp files but they aren't getting referenced by the iframe.
Update: I'm getting a 404..
The page cannot be found
I think I have to create a virtual directory and name it ASP. I never use IIS though - does anyone know how this works? And would I need to restart IIS after creating the virtual directory?
Update #2: More info..
Execute permissions: Scripts Only
Application name: asp
For Authentication Methods, "Integrated Windows authentication" is checked
Local Path: Read
Update #3: I can access asp/file.htm file fine. Can anyone provide code for a simple test I could do to see if its working properly ( I have no ASP/VBScript experience )..
one of the top of the pages contains <%# LANGUAGE="VBSCRIPT"%>
Is this IIS6 by any chance? In IIS, under Web Sites there is a folder called Web Service Extensions. Make sure Active Server Pages are set to Allow and not Prohibited!
When you create a virtual directory for an ASP site in IIS, you have to make sure it is allowed to execute scripts. What version of IIS are you using? In 5.0 and 6.0, there should be a checkbox Run Scripts (such as ASP). Make sure that's checked.
Try putting a test.html file in the root directory of the site and then try to open it through wwwroot/sitename/asp/test.html - .html files won't be processed by asp.dll and so should display if the site is setup correctly even if there is some kind of asp.dll problem.
If you can't see a html file then I guess you will need to configure the website in IIS (not sure if a virtual directory is necessary from the information given) - check the 'home' tab to see if the path to the application is correct first.
If you can see the html file then I'd guess that asp is not properly installed (but that is a guess).
We've just moved our website to win2008 and IIS7 from win2000 with IS5 and I have some problems.
I have a folder that in it is an ASP page that upload a file to an upper folder, in the old IIS, I gave to the folder with the ASP page the permissions of the administrator and it's work fine, the files could be uploaded to an upper folders. BUT in the IIS7 I can't do it, I give to the folder with the asp code all the writing permission and it's not working. It's only work if I give a writing permissions to the upper targert folders. I don't wont to give to the target folders a full permission because those are the main web site folders.
So how can I do it? How can I give a folder a permission to write also to an upper folder that doesn's have this permmision?
Thanks
One possible reason is that you are attempting to access the parent with a MapPath and this is failing because Parent Paths haven't been enabled.
Since IIS6 the ability for code to access parent folders is by default blocked. To do this it is necessary to enable parent paths. In IIS7 parent paths can be enabled at Server, Site, Application or Folder level. In IIS manager click on the site, application or folder you want to enable this for, double click the ASP icon, in the Behavour section set 'Enable Parent Paths' to True.