I've encountered an error deploying a site to a server. When trying to load the home page, or access authentication on the new site in IIS, I get the error:
Config Error: This configuration section cannot be used at this path.
This happens when the section is locked at a parent level. Locking is
either by default (overrideModeDefault="Deny"), or set explicitly by a
location tag with overrideMode="Deny" or the legacy
allowOverride="false".
More detail can be found here, in Scenario 7 matches my hex error code.
The solution given on the linked site above is to set Allow for overrideModeDefault in the section mentioned in my error, in the applicationHost.config file. In my case, under Security in system.webServer. But if I look at the applicationHost.config on my local computer, where the site is properly deployed already, that section is set to Deny.
If this solution is correct, how is my local instance running just fine with the same web.config? According to my applicationHost.config, that section should be locked, but it's not. I'd prefer to not change the applicationHost.config file, because there are many other sites running on that server. Is there another solution?
I had the same problem. Don't remember where I found it on the web, but here is what I did:
Click "Start button"
in the search box, enter "Turn windows features on or off"
in the features window, Click: "Internet Information Services"
Click: "World Wide Web Services"
Click: "Application Development Features"
Check (enable) the features. I checked all but CGI.
btw, I'm using Windows 7. Many comments over the years have certified this works all the way up to Windows 10 and Server 2019, as well.
You could also use the IIS Manager to edit those settings.
Care of this Learn IIS article:
Using the Feature Delegation from the root of IIS:
You can then control each of machine-level read/write permissions, which will otherwise give you the overrideMode="Deny" errors.
For Windows Server 2012 and IIS 8, the procedure is similar.
The Web Server (IIS) and Application Server should be installed, and you should also have the optional Web Server (IIS) Support under Application Server.
Browse to “C:\Windows\System32\inetsrv\config” (you will need administrator rights here)
Open applicationHost.config
Note: In IISExpress and Visual Studio 2015 the applicationHost.config is stored in $(solutionDir).vs\config\applicationhost.config
Find the section that showed up in the “config source” part of the error message page. For me this has typically been “modules” or “handlers”
Change the overrideModeDefault attribute to be Allow
So the whole line now looks like:
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
After saving the file, the page loaded up fine in my browser.
Warning:
Editing applicationHost.config on 64-bit Windows
You need to unlock handlers. This can be done using following cmd command:
%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/handlers
Maybe another info for people that are getting this error on IIS 8, in my case was on Microsoft Server 2012 platform. I had spend couple of hours battling with other errors that bubbled up after executing appcmd. In the end I was able to fix it by removing Web Server Role and installing it again.
1. Open "Turn windows features on or off" by: WinKey+ R => "optionalfeatures" => OK
Enable those features under "Application Development Features"
Tested on Win 10 - But probably will work on other windows versions as well.
I ran these two commands from an elevated command prompt:
%windir%/system32/inetsrv/appcmd unlock config /section:anonymousAuthentication
%windir%/system32/inetsrv/appcmd unlock config /section:windowsAuthentication
As per my answer to this similar issue;
Try unlocking the relevant IIS configuration settings at server level, as follows:
Open IIS Manager
Select the server in the Connections pane
Open Configuration Editor in the main pane
In the Sections drop down, select the section to unlock, e.g. system.webServer > defaultPath
Click Unlock Attribute in the right pane
Repeat for any other settings which you need to unlock
Restart IIS (optional) - Select the server in the Conncetions pane, click Restart in the Actions pane
This Did the trick for me, for IIS 8 Windows server 2012 R2
Go to "Turn on Features"
Then go to all default setting , Next, Next, Next etc..
Then, select as shown below,
Then reset IIS (optional) but do it safer side.
This is an additional solution as its a generic problem everyone have different of problem and thus different solution. Cheers!
The best option is to Change Application Settings from the Custom Site Delegation
Open IIS and from the root select Feature Delegation and then select Application Settings and from the right sidebar select Read/Write
On Windows Server 2012 with IIS 8 I have solved this by enabling ASP.NET 4.5 feature:
and then following ken's answer.
To fix this open up the IIS Express applicationhost.config. This file is stored at C:\Users[your user name]\Documents\IISExpress\config\applicationhost.config
Update for VS2015+: config file location is $(solutionDir).vs\config\applicationhost.config
Look for the following lines
<section name="windowsAuthentication" overrideModeDefault="Deny" />
<section name="anonymousAuthentication" overrideModeDefault="Deny" />
<add name="WindowsAuthenticationModule" lockItem="true" />
<add name="AnonymousAuthenticationModule" lockItem="true" />
Change those lines to
<section name="windowsAuthentication" overrideModeDefault="Allow" />
<section name="anonymousAuthentication" overrideModeDefault="Allow" />
<add name="WindowsAuthenticationModule" lockItem="false" />
<add name="AnonymousAuthenticationModule" lockItem="false" />
Save it and refresh Asp.net Page.
In our case on IIS 8 we found the error was produced when attempting to view Authentication" for a site, when:
The server Feature Delegation marked as "Authentication - Windows" = "Read Only"
The site had a web.config that explicitly referenced windows authentication; e.g.,
Marking the site Feature Delegation "Authentication - Windows" = "Read/Write", the error went away. It appears that, with the feature marked "Read Only", the web.config is not allowed to reference it at all even to disable it, as this apparently constitutes a write.
Seems that with IIS Express and VS 2015, there's a copy of the applicationHost.config file at $(solutionDir).vs\config\applicationhost.config so you'll need to make changes there. See this link: http://digitaldrummerj.me/iis-express-windows-authentication/
Make sure these lines are changed per below:
<section name="windowsAuthentication" overrideModeDefault="Allow" />
<section name="anonymousAuthentication" overrideModeDefault="Allow" />
<add name="WindowsAuthenticationModule" lockItem="false" />
<add name="AnonymousAuthenticationModule" lockItem="false" />
In my case it was that on server was not enabled "HTTP Activation" under .NET Framework Features. So for Windows Server 2012 the solution which worked for me was:
Server Manager -> Add roles and features -> Features -> make sure that under .NET Framework of version you want to use is checked "HTTP Activation"
The Powershell way of enabling the features (Windows Server 2012 +) - trim as needed:
Install-WindowsFeature NET-Framework-Core
Install-WindowsFeature Web-Server -IncludeAllSubFeature
Install-WindowsFeature NET-Framework-Features -IncludeAllSubFeature
Install-WindowsFeature NET-Framework-45-ASPNET -IncludeAllSubFeature
Install-WindowsFeature Application-Server -IncludeAllSubFeature
Install-WindowsFeature MSMQ -IncludeAllSubFeature
Install-WindowsFeature WAS -IncludeAllSubFeature
The error says that the configuration section is locked at the parent level.
So it will not be directly 1 config file which will resolve the issue,
we need to go through the hierarchy of the config files to see the inheritance
Check the below link to go through the File hierarchy and inheritance in IIS
https://msdn.microsoft.com/en-us/library/ms178685.aspx
So you need to check for the app config settings in the below order
ApplicationHost.config in C:windows\system32\inetsrv\config. Change the overrideModeDefault attribute to be Allow.
ApplicationName.config or web.config in the applications directory
Web.config in the root directory.
Web.config in the specific website (My issue was found at this place).
Web.config of the root web (server's configuration)
machine.config of the machine (Root's web.config and machine.config can be found at - systemroot\MicrosoftNET\Framework\versionNumber\CONFIG\Machine.config)
Go carefully through all these configs in the order of 1 to 6 and you should find it.
I noticed one answer that was similar, but in my case I used the IIS Configured Editor to find the section I wanted to "unlock".
Then I copied the path and used it in my automation to unlock it prior to changing the sections I wanted to edit.
. "$($env:windir)\system32\inetsrv\appcmd" unlock config -section:system.webServer/security/authentication/windowsAuthentication
. "$($env:windir)\system32\inetsrv\appcmd" unlock config -section:system.webServer/security/authentication/anonymousAuthentication
I needed to change the SSL settings on a subfolder when i got this nice message. In my case following action helped me out.
Opened C:\Windows\System32\inetsrv\config\applicationHost.config
And changed the value from overrideModeDefault="Deny" to "Allow"
<sectionGroup name="system.webServer">
...
<sectionGroup name="security">
<section name="access" overrideModeDefault="Allow" />
</sectionGroup>
In my case, I got this error because I was operating on the wrong configuration file.
I was doing this:
Configuration config = serverManager.GetWebConfiguration(websiteName);
ConfigurationSection serverRuntimeSection = config.GetSection("system.webServer/serverRuntime");
serverRuntimeSection["alternateHostName"] = hostname;
instead of the correct code:
Configuration config = serverManager.GetApplicationHostConfiguration();
ConfigurationSection serverRuntimeSection = configApp.GetSection("system.webServer/serverRuntime", websiteName);
serverRuntimeSection["alternateHostName"] = hostname;
in other words, I was trying to operate on the website's web.config instead of the global file C:\Windows\System32\inetsrv\config\applicationHost.config, which has a section (or can have a section) for the website. The setting I was trying to change exists only in the applicationHost.config file.
In my case, it was something else.
When I loaded the solution in a new version of Visual Studio, VS apparently created a new project-specific applicationhost.config file:
MySolutionDir\.vs\config\applicationhost.config
It started using the settings from the new config, instead of my already customized global IIS Express settings.
(\Users\%USER%\Documents\IISExpress\config\applicationhost.config)
In my case this was the setting that needed to be set. Of course it could be something else for you:
<section name="ipSecurity" overrideModeDefault="Allow" />
Received this same issue after installing IIS 7 on Vista Home Premium. To correct error I changed the following values located in the applicationHost.config file located in Windows\system32\inetsrv.
Change all of the following values located in section -->
<div mce_keep="true"><section name="handlers" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"</div>
<div mce_keep="true"><section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"</div>
Can You try this:
Go to application path where you're getting deny error, right click
Properties->Security tab
In that, change the permissions and check the checkbox read and write. Then it will work without any error hopefully.
For Windows Server 2008 and IIS 7, the procedure is similar.
please refer to this:
http://msdn.microsoft.com/en-us/library/vstudio/bb763178(v=vs.100).aspx
in add role service, u will see "Application Development Features"
Check (enable) the features. I checked all.
In my case I was getting this error when attempting to update the authentication settings in IIS also in addition to browsing. I was able to remove this error by removing the authentication setting from the web.config itself. Removing a problematic configuration section may be less invasive and preferable in some cases than changing the server roles and features too much:
Section Removed:
<security>
<authentication>
<windowsAuthentication enabled="true" />
</authentication>
</security>
I had the similar issue, but I used the following powershell script which helped me to achieve above steps in on button click.
#Install IIS
Import-Module ServerManager
Add-WindowsFeature Web-Server, Web-Asp-Net45, Web-Mgmt-Console, Web-Scripting-Tools, NET-WCF-HTTP-Activation45, Web-Windows-Auth
the list of features can be added or removed based on the requirement.
I had an issue where I was putting in the override = "Allow" values (mentioned here already)......but on a x64 bit system.......my 32 notepad++ was phantom saving them. Switching to Notepad (which is a 64bit application on a x64 bit O/S) allowed me to save the settings.
See :
http://dpotter.net/technical/2009/11/editing-applicationhostconfig-on-64-bit-windows/
The relevant text:
One of the problems I’m running down required that I view and possibly edit applicationHost.config. This file is located at %SystemRoot%\System32\inetsrv\config. Seems simple enough. I was able to find it from the command line easily, but when I went to load it in my favorite editor (Notepad++) I got a file not found error. Turns out that the System32 folder is redirected for 32-bit applications to SysWOW64. There appears to be no way to view the System32 folder using a 32-bit app. Go figure.
Fortunately, 64-bit versions of Windows ship with a 64-bit version of Notepad. As much as I dislike it, at least it works.
I had the same issue.
Resolved it by enabling Application Server feature. Restarted iis
after that.
This worked for me
Also in IIS 8 you can solve this problem by changing the server to IIS Express. Goto debug->Properties
In the Web select the server as IIS Express from the dropdown and then rebuild the solution
To make a change at Application Level (Web.Config):
Please remove the Trust Level from the web.config:
Actually I was getting this error when I was trying to host my Website on the Hosting Server where I don't have control on their Server. Removing the above line from my Application web.config solved my issue.
Related
I want to upload my own asp.net website on IIS with IIS Manager. But when I do this, I get the following error
HTTP Error 500.19 - Internal Server Error The requested page cannot be
accessed because the related configuration data for the page is
invalid
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070005
Config Error Cannot read configuration file due to insufficient permissions
Config File \\?\C:\Users\Yasso\Documents\Visual Studio 2008\WebSites\WebSite5\web.config
I searched many times for a solution for this error, but none of the solutions solved the error.
I have a problem with my IUSR account. I can't see this account in the "group or user names" in the properties of the web.config.
What is the problem?
This can also happen if the site is configured to use the IIS URL Rewrite module but it is not installed.
Finally, I got the solution for my problem. The ASP.net account did not appear in the IIS manager, because I didn’t check its checkbox in IIS. To do this in Windows 7 follow the steps:
Open control panel
Click on “program” link (not uninstall programs)
Click “turn windows features on/off” link
Locate “Internet Information services IIS” in the pop up window and expand its node
Expand the “World Wide Web Service” node
Expand “Application Development Features” node
Check the check box of “ASP.NET”
Then click ok button
Now, you will see the ASP.net account on the IIS manager and by default you will see the IIS account. Now, you should move your ASP.net website from “my document” to another place where the IIS have permission to access it (i.e. to another partition on your computer). Now, browse your website from the IIS manager and it should work.
Thanks a lot for Jeff Turner for the solution.
The message is saying that your configuration file is corrupt in some way. However it also says that it can't actually access the config file. So I'd ignore the original message about corruption/lack of validity as this is most likely just the effect of not being able to read the file due to a lack of authorization.
The reason it cannot read the config file is because the process running your web app does not have permission to access the file/directory. So you need to give the process running your web app those permissions.
The access rights should be fairly straightforward, i.e. at least Read, and, depending on your app, maybe Write.
Above, you mention IUSR etc. not being in the properties for web.config. If by that you mean that IUSR is not listed in the security tab of the file then it's a good thing. One doesn't want to give IUSR any kind of permission to web.config. The role IUSR is an anonymous internet user.
The file web.config should only be accessible through your application.
The problem is you haven't said which OS and IIS version you are using so it's difficult to advise which steps to take.
I.e. in IIS 7.5, the error message you're quoting is likely to occur due to your ApplicationPoolIdentity not being assigned the permissions. Your web application belongs to an application pool and so you need to give the permissions to the OS account that your web application's application pool runs under. Often this is something like NetworkService but you may have customized it to run under a purpose made account. Without more info it's difficult to help you.
I was having the same problem, here is the solution that worked for me.
IIS Manager
Right clicked on that Website
Edit Permissions
Added user 'IIS_IUSRS' from Security tab
Gave full permissions to User 'IIS_IUSRS'
Set the Application Pool's Identity to 'ApplicationPoolIdentity'
For Visual Studio (VS) developers:
As hinted at by Harvey Darvey, Savage, and Snives, your Application Host Configuration may be pointing to the wrong application physical path. Search for virtualDirectory within /.vs/config/applicationhost.config to change the physicalPath if it is incorrect.
Make sure the physicalPath is correct:
Just to chip in, I received the same kind of error and my problem was quite simple: I was missing the .NET Core Hosting Bundle. Once I installed the tool and restarted the server, it was fine.
You can find the manual to host asp.net core on windows here: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2
To resolve this, make sure you installed the hosting bundle.
https://dotnet.microsoft.com/download/dotnet-core/3.1
Facepalm alert:
You will also get this error if the path to the config file is wrong. Double-check it to make sure the physical path is entered correctly in IIS.
You need to assign permissions for IIS_IUSRS on the local machine (but you don't have to assign for IUSR, in fact it will work even if you explicitly deny permissions).
To assign permissions, just right click on the folder and on the security tab make sure to grant the correct permissions, and if the user is not listed then click "ADD", and enter IIS_IUSRS (and make sure that under "domain" the local computer is selected, or enter in the name field YourLocalComputerName\IIS_IUSRS), and then you are good to go.
If you want you can instead of assigning permissions to the IIS_IUSRS group, you can instead assign to the app pool which should in general be "IIS APPPOOL\ app pool name".
The same thing happened with me , Try checking this by double clicking on the Connection strings on the right pane of IIS 7 when you select a website.
It will give you an error (that there is some problem with web config file), because you have used URL rewrite rules and the respective component is not installed.
Install “Microsoft URL Rewrite Module 2.0 for IIS 7” and this should fix your problem
Install ASP.NET Core module
Download the installer using the following link:
https://www.microsoft.com/net/permalink/dotnetcore-current-windows-runtime-bundle-installer
Nothing here worked for me, I found this command in another SO answer though and it solved my problem. Just start command prompt as an administrator and run this command:
run->cmd
run "c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i"
Credit: User Vicxx
Ehm. I had moved my site/files to a different folder. Without changing the path in the IIS website.
You may all laugh now.
I do these steps to solve this problem in
Windows Server 2012, IIS 8.5. Should work for other versions too.
Go to server manager, click add roles and features
In the roles section choose: Web Server
Under Security sub-section choose everything (I excluded digest, IP restrictions and URL authorization as we don't use them)
Under Application Development choose .NET Extensibility 4.5, ASP.NET 4.5 and both ISAPI entries
In the features section choose: NET 3.5, .NET 4.5, ASP.NET 4.5
In the web server section choose: Web Server (all), Management Tools (IIS Management Console and Management Service), Windows
Make sure you have the application pool set to the correct version of the framework. You'll also need to make sure your aspnet, IIS_IUSRS, or IUSR users have read access to the application's directory.
Try installing the 'Application Development' sub component of IIS as mentioned in this SO
Click "Start button" in the search box, enter "Turn windows features
on or off"
in the features window, Click: "Internet Information
Services"
Click: "World Wide Web Services"
Click: "Application
Development Features"
Check (enable) the features. I checked all but
CGI.
One other possibility that fixed this problem for me:
IIS -> Edit Permissions -> Security Tab -> Give "Users" appropriate permissions (or IIS_IUSRS, depending on your setup)
This also happened to me when I had a default document of the same name (like index.aspx) specified in both my web.config file AND my IIS website. I ended up removing the entry from the IIS website and kept the web.config entry like below:
<system.webServer>
<defaultDocument>
<files>
<add value="index.aspx" />
</files>
</defaultDocument>...
Sometimes this message has can be missing components in your IIS environment e.g. a particular framework, or an IIS feature like dynamic compression, rather than permissions to web.config.
If this is the case, a solution can be to install and use the Microsoft Platform Installer and install those missing components - you might have to take a stab at what exactly is missing because the error log and message don't tell you.
Actually, any missing module can lead to this problem. In my case, it was CORS Module. So read the web.config and seek for any addon module that you specified in it and check that it is installed, or install it otherwise. Unfortunately, the error message does not help finding the problem at all.
Pretty straight forward, IIS doesn't have access to your web.config. I'd start by taking the site out of your documents folder. Verify it has r/w permissions then as well.
You need to set permission for your Website folder or copy they to wwwroot folder :)
- If set permission, have 2 way:
+ Right click to Your Website folder
+ Or right click to Your Website in IIS
=> select Edit permission and Add a permission (IUSR - default iis user)
Good luck ;-)
You can get this error if you have a synax error or issue in your web.config file.
For me, it was a stray ampersand in a URL that I was using in the AppSettings.
In my case, it caused by application physical path point to a non-existent folder in IIS.
got this problem with mapped drives, IIS doesn't work with mapped drives. Just use the unmapped drive.
I had the issue as I copied my web.config file down from prod, changed everything not prod related except the Rewrite rules which were rewriting to httpS.
Removed those rules and ran fine.
I too had the similar issue and i fixed it by commenting some sections in web.config file.
The project was earlier built and deployed in .Net 2.0. After migrating to .Net 3.5, it started throwing the exception.
Resolutions:
If your configuration file contains "<sectionGroup name="system.web.extensions>", comment it and run as this section is already available under Machine.config.
On the IIS 7.5 error page you get click on 'View more Information' at the bottom of the page and in this case it will take you to the following Microsoft link:
http://support.microsoft.com/kb/942055
The 0x80070005 Error Code seems to be permissions related and following the steps in Resolution 2, Method 2 assigning the correct accounts with permissions on relevant folders should fix it - I spent 3 days looking for a solution until I came across it, worked straight after.
Explore the folder where your website is store and see you will get one extra folder "aspnet_client" delete that folder and it will work for you.
I tried this my problem is solved.
If it works for you please make it as answer so that some body else will also get solution.
None of this worked for me, but I finally have a solution which worked for me:
remove this line in web.config:
<compilation debug="true" targetFramework="4.5"/>
don't remove this line
<compilation debug="true"/>
What I'm doing:
Opening Visual Studio Community 2015
File -> New -> Project
Under Visual C#: Web -> ASP.NET Web Application
Web Application
And press f5 for the popup error "unable to connect to web server 'IIS Express'."
Deleting applicationhost.config, located in Documents\IISExpress\config, doesn't change the error message. (There's also an IISExpress folder in program files and program files (x86).)
Something I noticed, and I don't know if it's a problem:
Referenced file 'lib/jquery-validation/jquery.validate.js' not found.
I got a dump with rawcap but I don't notice much in there. Some of what was there:
"Framework":{"FrameworkName":"DNXCore,Version=v5.0","FriendlyName":"DNX Core 5.0","ShortName":"dnxcore50","RedistListPath":null}
I don't notice a problem, but I have the network data if that can help figure out why I cannot connect to the web server. I get a RST,ACK immediately so I'm guessing the port is closed and whatever this web server is, isn't being setup.
More on this problem: 800700c1 error from /trace:error
I've tried:
deleting applicationhost.config (and changing port number)
running visual studio as administrator
deleting IISExpress folder in Documents (changes error message until the folder is reinstalled)
toggling ssl off and on, copying url to launch box. (note: I'm not using ssl)
clearing all sfc /scannow errors
starting iisexpress with x86 version and 64-bit version
After installing Update 2 for Visual Studio 2015 I started getting the same error. I tried everything above with no luck. However, I found a solution that works for me:
Delete YourSolutionFolder\\.vs\config\applicationhost.config file (note: .vs is a hidden folder)
Open Visual Studio, right-click on web site > Properties > Debug tab > Web Server Settings > App URL - change port number.
If you have IIS configured to use the same port, (stop the application / use different port) and try again.
Exit VS and delete the (project)\.vs\applicationhost.config file. Restart VS. It should start working.
Try using a different port. I just set up a new Core 1.0 RC1 project and got the same error.
Right click web project
Debug tab
Toggle Enable SSL off and on again, it should generate a new random port
Copy the SSL URL and paste into Launch URL box
Run the project
Worked for me (TM).
Answer from: https://stackoverflow.com/a/28650554/134761
I had this issue on .net core 2.1, visual studio version 15.9.6. When i deleted the .vs folder, i reopened visual studio and the problem was still there. The solution that worked for me below:
Delete .vs folder (it is a hidden folder).
Restart Computer.
Other Solutions:
Close Visual Studio, delete bin and obj folders from the project folder. Open Project then rebuild solution.
Try running Visual Studio as Administrator.
Clean Solution then rebuild
Clean Solution. 2) Exit Visual Studio. 3) delete .vs folder 4) Re-open Visual Studio
Restart machine (if you can afford to)
Copied my comment to an answer by request.
For Net Core 2.2 project - After a MASSIVE struggle and trying everything from deleting .vs folder, deleting IIS Express configs, changing port numbers, changing bindings, and to running VS as admin I FINALLY fixed issue by
closing VS,
deleting launchSettings.json
opening VS which re-generated launchSettings.json.
It was not apparent that the file was corrupt or incorrect or even when it changed to cause failure.
I faced this issue in .net core 2.0 when I update my project's port number.
I was able to sort out issue in two steps :
STEP 1 : DELETE .vs folder which is hidden inside main solution folder. (close visual studio before this) then when you start again visual studio, this folder and file (applicationhost.config) inside it will automatically create by visual studio.
STEP 2 : For multiple startup projects, if you are still facing issue then one by one run project as startup, and then run as multiple startup project.
I had the same issue, i was able to solve it by changing the Port number.
Right click on the project and select properties
Go to the Debug section
Under Web Server Settings change App URL port [just increase by one :)]
In my case that was some other application listening on the same port which IIS Express trying to attach to. I have to run netstat -ao to see PID of process which is use same port and shutdown application. In my case application was Viber.
I just changed my profile from "IIS Express" to "MyProjectName" (which I think is using kestrel as the http server instead of IIS) and now it's working fine:
Run VisualStudio with administrator privilegies and run the project. Then close VisualStudio and all errors and run VisualStudio again with the normal user.
This did it for me.
Looks like that IIS has to write something to some config with admin privilegies (port 80 didn't work with normal user but port 6767 worked fine).
Many of these answered don't fully address the issue at hand. The real problem for me was that I had two bindings using the same port in my applicationhost.config file AND I hadn't opened up the port to my second (non localhost) binding. VS will allow you to still run under these circumstances but only if you are in admin mode (hence all of the answers above).
You are essentially creating two IIS express instances of your app on the same port, so changing one of the ports in your applicationhost.config file will allow you to proceed. There are two different applicationhost.config files however. You will want to select the one that has the binding IP and port that you see in your project's properties
.
Go to the folder where you can see your project solution and project folders (show hidden items in File Explorer). Navigate into your hidden .vs folder -> "YourAppName" folder -> config. It should contain the binding info you saw in your project's properties.
Example:
<bindings>
<binding protocol="http" bindingInformation="*:7000:127.0.0.1" />
<binding protocol="http" bindingInformation="*:7000:192.168.0.5" />
</bindings>
Change one of those port numbers to something other than "7000" so that you aren't trying to use the same port.
In my case, I'm using a 192 address which is not a localhost address, so I need to use some netsh commands to open that port and ip up. Here is a Link that shows how to open up ports for IIS Express to allow remote connection. Running as a normal user will not work unless you run those netsh commands listed.
Here are the netsh commands:
netsh http add urlacl url=http://192.168.1.42:58938/ user=everyone
netsh advfirewall firewall add rule name="IISExpressWeb" dir=in protocol=tcp localport=58938 profile=private remoteip=localsubnet action=allow
Copy those commands and run them in cmd with ADMIN privileges and with YOUR ip address and port number.
TO CLARIFY
Really a lot of answers here are the same and say something like "Restart and it magically works again".
Well, 9 out of 10 times people have this issue like the OP it is because THE IP-ADDRESS IS ALREADY IN USE.
ANSWER
There could be 2 ip-addresses that are in use. Both of them you can find by:
1) Right-clicking on the start-up project
2) Click on "Properties"
3) Click on the "Debug" tab
Here you see your "App URL" and your "SSL URL".
If your "App URL" is in use, just change it there and save it and it should work again.
If your "SSL URL" is in use, close down VS, delete the "applicationhost.config" file in the hidden .vs folder of your project and open VS up again.
The solution that worked for me was to:
Close the VS project
In File Explorer, navigate to the project and delete the entire ".vs" folder
Restart the project
Run as "Debug"
Works
Apparently, it has something to do with the "applicationhost.config" file.
Enjoy!
If you can afford to restart your machine then do it 👌, this fixed my issue after almost an hour of trying to fix this issue with no hope 🤯.
I was able to toggle this error by changing a single thing. In my ASP.Net Core 1.0 RC2 Web Application project's launchSettings.json file:
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:18177/",
"sslPort": 0
}
},
to
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:18177/",
"sslPort": 0
}
},
I had changed to https in an attempt to run the project using that protocol. Apparently this is not the place to make that change. I suspect it is creating multiple bindings on the same port, and IIS Express doesn't like that.
I had this same issue, but the way I fixed it was by going to the applicationhost.config and remove a port which was not added by me (IIS Express I would guess) which placed my specific port site on another port.
Here is what the config file had for my bindings:
<bindings>
<binding protocol="http" bindingInformation="*:54764:localhost" />
<binding protocol="https" bindingInformation="*:44360:localhost" />
</bindings>
I removed the first bindings item as the only port I wanted was 44360. My config file now looks like this:
<bindings>
<binding protocol="https" bindingInformation="*:44360:localhost" />
</bindings>
Now I don't see the error when I debug.
I also noticed my second API in my project had port 80 also assigned to it, I removed that as well.
delete bin and obj folders from the project folder and rebuild.
For me the problem was that an other process was using the same port. (In my case it was outlook that was using the same port as my site and thus my site couldn't start)
Yes you can change the local port, but if you are running an API or something that other applications need, you don't always want to do this.
To get a list of what applications are using what port open CMD and type "netstat -aon"
You will get a list of ports. Find the port that your site should use, or that you want to use and write down / remember the PID.
Now open task manager and click on the tab 'details'. Find the process with your PID and end it. Now you should be able to start IIS Express with that port.
I just Cleaned my solution, Then Re-Built it and finally hit F5 and it worked! So simple.
I won't pretend to fully understand what MS bug creates this problem, but here is another potential solution:
In the .vs/config/applicationHost.config file, find the section for <system.applicationHost><applicationPools>. Under the pools, ensure that the managedRuntimeVersion attribute value matches the value which is in the IIS config for the system (and/or the version of the .NET framework which is installed).
For example, you may find (as I did) that the generated file has:
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
In my case, you would replace this with:
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0.30319" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" />
Note the replacement from "v4.0" to "v4.0.30319". This resolved the issue.
What appears to be going on:
I believe that VS is generating an applicationHost.config file with "default" versions for the .NET framework, which may not match the specific version which is installed/configured on the system. You can debug/observe this issue by tracing the execution in Process Monitor, and finding the command line for iisexpress.exe. Running this command with /trace:error added yields a more informative message about a failure to preload the CLR with version v4.0. To wit:
Starting IIS Express ...
Failed while trying to preload CLR version v4.0. hr = 80131700
Failed to initalize the W3WP_HOST hr = 80131700
Process Model Shutdown called
Unable to start iisexpress.
Anyway, figured this might be helpful to someone else, since it's common enough to have multiple references online with bad information, and I've personally hit it a few times now.
For me, IIS Express was not accessible when I added iplisten on DOS Prompt like this: netsh http add iplisten MyIPAddress. I fixed it by deleting the iplisten like this: netsh http delete iplisten MyIPAddress.
If you are using VS 2017 or VS 2019 with ASP.Net Core, you can directly go to launchSettings.json under Properties folder and just change the Port number of applicationUrl key for iisSetting.
I just encountered the same problem and I killed all the "iisexpress.exe" processes that were still running. That worked for me!
Try this first if it was working and suddenly stopped:
Close Visual Studio
Kill iisexpress.exe processes
Reopen Visual Studio
Mine happens as soon as I add a new binding inside the applicationhost.config, running as administrator fixed the problem.
Just close the visual studio and reopen and execute.
It worked for me.
My solution (for .net core 2.0) was that i had forgot to add the port number in the applicationUrl, under iisExpress in launchSettings.json
"iisExpress": {
"applicationUrl": "https://localhost:50770",
"sslPort": 50770
}
I was able to resolve this by restarting my computer. I tried a few things unsuccessfully and finally gave up and restarted my computer. It has been working well now for a couple of days after I restarted. Probably the result of some process that was hung.
For me, it was a mixture of following these instructions:
Delete your web application’s .vs\applicationhost.config and try
again.
And then, perhaps most importantly, running Visual Studio with admin privileges.
I added .UseUrls("https://localhost:<some port>/") to the Program.cs. This seemed to do the trick for me!
I have a web project in my solution file that is "unavailable" when I open the solution. When I right-click on the web project and reload the project, I get the following error:
The Web Application Project mycompany.myapp.mywebproject is configured to use IIS. The Web Server 'http://localhost/MyWebApp could not be found.
I have not manually set up virtual directories for this web application.
Per colleagues, Visual Studio should prompt me to create virtual directories but I am not getting prompted.
I installed VS2010 before installing IIS on my dev machine.
Here is my development machine setup:
Windows 7 Enterprise
Service Pack 1
64 bit OS
Visual Studio 2010 Enterprise Service pack 1
IIS version 7.5
Since the accepted answer requires IIS Manager, and IIS Express doesn't have IIS Manager or any UI, here's the solution for you IIS Express users (and should work for everyone else too):
When you open Visual Studio and get the error message, right-click the project Solution Explorer and choose "Edit {ProjectName}.csproj"
In the project file, change the following line:
<UseIIS>True</UseIIS>
to
<UseIIS>False</UseIIS>
Save the file.
Now reload your project.
Done.
You'll then be able to open your project. If at this point, you want to use IIS, simply go to your project properties, click the "Web" tab, and select the option to use IIS. There's the button there to "Create Virtual Directory". It may tell you that you need to run Visual Studio as an administrator to create that directory, so do that if needed.
Open the project folder and delete {Project}.csproj.user, then reload the project on Visual Studio.
When this happens the easiest solution is to make the virtual directory manually.
First of all, you need to make sure you have the right version of ASP.Net installed and that you have installed the IIS extensions.
To do this, go to the relevant .net version's folder in C:\(Windows)\Microsoft.NET\Framework\(dotnetver)\
(substituting the bracketed folders for the right folders on your PC) and run this command
aspnet_regiis.exe -i
Next once that's run and finished, sometimes running
iisreset
from the command line helps, sometimes you don't need to.
Next, go to your IIS Manager and find you localhost website and choose add a folder.
Browse to the folder in your project that contains the actual ASP.Net project and add that.
Finally, right click on the folder you added and you should have an option that says 'convert to application' or 'create virtual directory' or something similar.
!!Make sure the Virtual directory has the name 'MyWebApp'!!
Reload your solution and it should work.
Please be wary; this isn't a programming question (and shouldn't really be posted here) but I've posted this guidance as it's a common problem, but the advice I've posted is generic; the commands I've listed are correct but the steps you need to do in IIS may vary, it depends on your version and your account privileges.
Good luck!
This solution worked for me: Right click the Project and select edit and find the following code as shown below in the picture.
change the <UseIIS>True</UseIIS> to <UseIIS>False</UseIIS>
OR
change the <IISUrl>http://example.com/</IISUrl> to <IISUrl>http://localhost/</IISUrl>
For my project, I had to delete these two lines from .csproj file
<ProjectGuid>{3AA499DF-4A65-43B7-8965-D08A4C811834}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
I tried deleting only the first one, but it wasn't enough.
EDIT: As many users have pointed out, this can change your project type or mess with your source control program. I can't investigate these issues as it was a school project I do not have anymore.
Please be careful when trying this. At least make a copy of what you delete.
Edit the .csproj or vbproj file. Find and replace these entries
<UseIIS>true</UseIIS> by <UseIIS>false</UseIIS>
<UseIISExpress>true</UseIISExpress> by <UseIISExpress>false</UseIISExpress>
In my case, this problem was caused by broken IIS bindings. Specifically, my 'http' binding had been deleted. Recreating it fixed the problem.
Cause: The IISURL inside project.csproj is not correctly reflected in the project setting, and the virtual directory was not created.
Solution: Change the Project URL to correct PORT and create the Virtual Directory to make the missing PORT available.
Follow Below Steps:
Step 1: Right click on the project file to Edit the project.csproj file.
Step 2: Search IIS and modify from <UseIIS>True</UseIIS> to <UseIIS>False</UseIIS>
Step 3: Right Click Project to Reload the Project. After Reload successfully, right click Project and select Properties.
Step 4: Locate Project URL option under Properties => Web
Step 5: Change the Project URL to IIS URL indicated both on the Error Message and on the <IISURL>http://localhost:8086 </IISURL> from project.csproj file. Then Click Create Virtual Directory. Save All
Step 6: Redo Step 2 so it doesn't impact the remote codebase and the server deployment settings.
This worked for me:-
Make all your IIS websites point to localhost(All Unassigned) only
Try opening Visual Studio with Administrator privileges. In my case, it gave access to the IIS site and made this error go away. I was then able to switch the project to use IIS Express which doesn't seem to need administrator privileges.
If you are connected via TFS, open your project.csproj.user file and check for
<UseIISExpress>false</UseIISExpress>
and change it to true.
<UseIISExpress>true</UseIISExpress>
You will not believe that, start visual studio as Administrator
as obvious from the message
The Web Server 'http://localhost/MyWebApp' could not be found.
could not be found because may it has no privileges to see it
so Just restart visual studio as Administrator
You can load the project without setting the value of attribute UseIIS to true.
Simply follow the below steps:
In the mywebproject.csproj file--
Delete the tag < IISUrl>http://localhost/MyWebApp/< /IISUrl> and save the file.
The application will automatically assign the default port to it.
In my case I wanted to switch from http to https, so I had deleted http from IIS. In my .csproj.user file found that I still had:
<IISUrl>http://localhost/</IISUrl>
So I changed it to:
<IISUrl>https://localhost/</IISUrl>
In my case I was able to open the solution in offline mode just running the command:
iisreset
For you Win8 users out there, if you follow the steps in the accepted answer, console spits out a message at you saying "thou shalt not use the command-line to execute this command" (paraphrasing). Instead, access the Programs & Features via Control Panel (or Windows + R > appwiz.cpl), click 'Turn Windows features on or off', and make sure you have the following installed:
Internet Information Services
> World Wide Web Services
> Application Development Features
> ASP.NET 4.5
This will check a bunch of other options as well. As soon as I installed these features, and ran VS2012 with elevated permissions, I was able to launch my app successfully.
This happens with me when I tried to open a project from the .csproj file, but I get over it by opening the project from VS:
File> Open> Web Site
and select the directory which include my project.
I had this error, too. I thought everything was setup correctly, but I found out that one thing was missing: The host name I used for my project was not (yet) resolvable.
Since my app determines the current client's name from the host name I used a host name like clientname.mysuperapp.local for development. When I added the development host name to my hosts file, the project was loadable again. Obviously, I had to this anyway, but I haven't thought that VS checks the host name before loading the project.
Check if IIS Express is installed. If IIS Express is missing, Visual Studio might discard the setting <UseIISExpress>false</UseIISExpress> and still look for the express.
in my case, make sure you have a "Default" website
In my case, the "Default Web Site" in IIS didn't have a binding for localhost on port 80.
You should have a binding for whatever your value in the .csproj file is.
I fixed this simply by reinstalling IIS Express after downloading from below link:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=48264
Turns out my IIS was working on localhost:8181.Had to configure the {Project}.csproj file.
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>7386</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>**http://localhost:8181/ProjectName**</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile><EnableWcfTestClientForSVCDefaultValue>True</EnableWcfTestClientForSVCDefaultValue>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
In my case, the url referenced in the csproj file was incorrect.
It needed to be prefixed with www.
I made the changes, saved the file and the project loaded fine.
I ran into this issue when the <ProjectTypeGuids> element in the .csproj file contained the unit test project GUID: {3AC096D0-A1C2-E12C-1390-A8335801FDAB}.
Removing it made the project load without problems.
For DNN users my issue was I needed a binding for dnndev.me at port 80. I have multiple installs that run on different ports and VS requires that that particular Url to exist on port 80 (not 86 like mine was).
Follow this completed solution step by step. it's works for me in VS 2017.
Open Command prompt in administrator mode
Open File explorer and got to .NET Framework folder
Eg:C:\Windows\Microsoft.NET\Framework\v4.0.30319
v4.0.30319 this is my .NET folder. you want to select your relevant folder.
in CMD - Go to .NET folder path
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
Execute below command in CMD
aspnet_regiis.exe -i
You can see this message finally - Finished installing ASP.NET (4.0.30319.0)
iisreset
You can see this message finally - Internet services successfully restarted
Open IIS in your computer (if not config Follow this)
Go to Site and right click
Add WebSite
Fill - Site name and select physical path
Then type port number (you can find port number in .csproj file and port number must equal with (IISUrl)
EG : <IISUrl>http://localhost:15724/</IISUrl> my port is 15724
Note : you cannot create port 80 number. because it used default IIS page
Click Ok
Open visual studio with administrator permission
Then right click and reload your project
Your Problem may be solved.
This may help some people in 2020. The main issue is that the IIS settings in the CSPROJ file don't match with the configuration for the machine. For example, if you had the Web Application Project pointing to localhost:12345, and a virtual directory isn't set up on the machine on that port, you'll get this error.
Using VS2019, I had this same issue, and the IIS settings in the CSProj file were being ignored. The reason for this is a new property in the CSProj file called "SaveServerSettingsInUserFile":
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<SaveServerSettingsInUserFile>True</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
<UserProperties UseAjaxifiedTemplates="True" UseJQuerySupport="True" />
</VisualStudio>
</ProjectExtensions>
When this is set to TRUE, the IIS/Web server properties are in the
.CSPROJ.User file of the same project name.
This allows individual users of a project to have their own IIS settings, provided this file is not checked into source control.
You can control where the settings are stored using Visual Studio GUI in the properties for the project under "Web", "Apply server settings to all users"
When this is on, the IIS settings are stored in CSPROJ, when off, they are stored in CSPROJ.User
I bought the Windows Developer hosting package from fasthosts.co.uk, which I believe is a bog standard shared hosting package. It has ASP.NET 3.5 and, according to their support, also has SP1 installed.
I have developed my web app using ASP MVC 2 preview 1 (which by the way is awesome and I'm looking forward to getting stuck into preview 2) and it works fine on my dev machine, on which I have preview 2 installed via the installer package.
As the server doesn't have MVC installed, I followed
Phil Haacks bin deployment method which doesn't seam to have worked as the following happens...
When I deploy it and copy the files over to the server I get a plain useless "Server Error 500 - Internal server error". So I modified my web config so that customErrors mode="Off" which made no difference so I figured something is happening that is stopping it from even getting to the customErrors bit.
I then proceeded to take out bits of the web config until it gave me a decent error message. I found that it would only give me an error message if the following bits were taken out the config -
The entire configSections sectionThe entire httpHandlers sectionThe entire system.codedom sectionThe handlers and defaultDocument sections of the system.webServer section
I'm using the standard web config that MVC generates with no changes except my own connection string - which I took out for this testing.
Now that I got it to give me an error message, I get the "Could not load file or assembly System.Web.Mvc..." message and I'm stuck! - any suggestions?
Edit:
I bought a new hosting package with someone else and it all worked fine! I was certain it was Fasthosts fault when I deployed an empty MVC app, thanks to Phils suggestion, and then an empty normal web forms app - and they both gave the same errors.
I'm currently in the process of trying to convince them it's their fault, but they keep reassuring me that the problem is with my web config. Tried cancelling my hosting with them but I'm apparently in a 12 month contract even though I opted to pay monthly - oh well.
I guess don't go with Fasthosts would be the one thing to take away from this.
It sounds like it's possible you're not deploying to a webroot. Is that the case? Try deploying an empty MVC project.
I know this is way out of date but I found this Q&A when trying to set up a MVC 5 site on Fasthosts shared hosting platform. The way I got it to work in the end was to add runAllManagedModulesForAllRequests="true" to my web.config like:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="FormsAuthenticationModule" />
</modules>
</system.webServer>
And it all works great!
Update it turns out that this is a bit like cracking a nut with a sledgehammer and can have performance implications. Colin Farr correctly points out that this can be solved more elegantly by modifying your modules section of your web.config to include:
<modules>
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
<!-- any other modules you want to run in MVC e.g. FormsAuthentication, Roles etc. -->
</modules>
The error happens because fast host do not allow system.webserver part of the configuration part to interact with the webserver (Very Annoying). I have bin deployed an MVC website to a fasthost account and it partially works... you can view the index page but routing does not work. To get rid of the errors simply comment out the system.webserver section. I have been unable to get the routing to work using .aspx or .mvc extensions :(
I got my MVC site working as follows:
I added the aspx extension to my default routing map:
routes.MapRoute(
"Default", // Route name
"{controller}.aspx/{action}/{id}", // URL with parameters
new { controller = "Front", action = "Default", id = UrlParameter.Optional }
);
routes.MapRoute(
"Root",
"",
new { controller = "Front", action = "Default", id = "" }
);
I don't think the Root one actually works because I got a 403, 'No directory listing' error, so I added a default.aspx page to the site which just does a redirect in OnInit to "~/Front.aspx/Default" (note that my default controller is renamed to Front instead of Home).
I changed the three Mvc dlls to be Copy Local so that they were deployed to my site's bin directory.
I used HtmlAction for all my page links so that they automatically got the aspx extension.
I noticed that the site was slower on initial load than using webforms but apart from that everything seems to be okay.
Double check your Global.asax and code-behind ... I think this kind of error happens when the application can't even start (hence you have no other error besides 500).
Have you tried putting in a simple, stand alone ASPX page with no code-behind or anything? If so, do you get the same error? If so, I think ASP.NET 3.5 is not configured for your virtual directory, properly, and you'd have to ask tech support to reinstall/repair or set the version in the ASP.NET tab of the IIS virtual directory properties.
You need the ASP.Net MVC 2 dll on the server. In your project, select the dll under properties, change "Copy Local" to true.
how can i make it that when i go to (for example) http://localhost:60288/ it does not show me a directory listing but rather opens the Index.aspx page? This works with http://localhost:60288/Index.aspx but i don't wish to have Index.aspx shown every time.
i also need links like http://localhost:60288/?a=1 to work like http://localhost:60288/Index.aspx?a=1 without the Index.aspx shown.
this used to work when i created a website project in visual studio, but now i'm using application project. how can I set this up?
i want / need this to work for all sub folders as well e.g. http://localhost:60288/SubFolder/ should work as if it was linked to http://localhost:60288/SubFolder/Index.aspx
thnx
edit still did not manage it
Cassini (the built-in webserver used by Visual Studio) doesn't allow you to configure the Default Document that's used if you don't specify a filename in your URL. The 'Set as Start Page' option isn't the same thing, as you've found, since that only affects which page is first opened when you run the project, and doesn't affect subsequent page-loads.
However, Cassini does have a list of Default Documents - it just isn't configurable, and the list only contains "default.aspx" and "default.htm". The only way you could achieve what you want in Cassini is to rename all your "index.aspx" files to "default.aspx".
The easiest way for me to do this was to use a mapping. Inside your Web.config, insert the following:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<urlMappings enabled="true">
<add url="~/" mappedUrl="~/index.aspx" />
<add url="~/default.aspx" mappedUrl="~/index.aspx" />
</urlMappings>
</system.web>
</configuration>
Go into the IIS manager (in control panel - administrative tools)
Right click - properties on the default website
Documents tab - ensure that 'enable default document' is ticked, and that index.aspx is in the list of default documents, up the top preferably.
Home directory tab - make sure you've got an application created (application name shouldn't be blank). Click the 'create' button if you need to.
asp.net tab - check that you've selected the correct version of the framework that you want.
Let me know how you go.
You can remove or rename your index.aspx , so that it will show the directory listing when runs unless you set another page as start page.
For the second thing, u can use ASP.NET URL masking feature
You can use IIS Manager to set the Default document(s) for your site/application.
Cassini (the development web server integrated in Visual Studio) doesn't support the possibility to change the default document.
And yes, you do need to be an administrator to configure IIS.