|
| Creating ASP.NET project gives "Web Access Fail" error |
|
|
|
|
| Messages |
|
Related Types |
This message was discovered on microsoft.public.vsnet.general.
| ben |
| GOOD ANSWER |
Hi,
When I create a new ASP.NET project, it fails and gives me a "Web Access Fail" error. and I get this:
Unable to create Web project 'WebApplication1'. The file path 'c:\inetpub\wwwroot\WebApplication1' does not correspond to the URL 'http://localhost/WebApplication'. The two need to map to the same server location. HTTP Error 404: Object Not Found
I am running this on windows 2003 .net ....
|
|
|
| |
|
|
| |
| |
| Bill Cheng [MSFT] |
| GOOD ANSWER |
Hi Ben,
The problem may be that Internet Information Server 6.0 blocks all extensions that are not explicitly mapped (for security purposes), while VS.Net tests whether the URL and UNC path match by writing a file with the ".tmp" extension to the server and then requesting it back via an http call. Since Internet Information Server 6.0 blocks .tmp file the call fails with a 404 error.
Workaround
1. Launch the Internet Information Services MMC. 2. Right click on your web site and click properties. 3. In the 'HTTP Headers' tab click 'MIME Types...' button. 4. Add a new MIME type by clicking 'New...' button. 5. In the 'Extension' edit control type (without the quotes) '.tmp'. 6. In the 'MIME type' edit control type (without the quotes) 'temp'.
Or run the following command at command prompt:
%systemdrive%\inetpub\adminscripts\adsutil.vbs set /w3svc/MimeMap .tmp,temp
The above steps will allow .tmp files to be served up by IIS. On a development machine where web project are created this is usually not an security concern. However if you have .tmp which contain sensitive data which you do not want exposed, you will have to reverse the above 6 steps.
If the mime entry for .tmp file is deleted after creating the project you will receive a http 404 error when you try to reopen the project. So you will have add .tmp mime type before you open the project and remove it after opening the project.
This posting is provided "AS IS" with no warranties, and confers no rights.
Regards,
Bill Cheng Microsoft Support Engineer -------------------- | Content-Class: urn:content-classes:message | From: "ben" <Click here to reveal e-mail address> | Sender: "ben" <Click here to reveal e-mail address> | Subject: Creating ASP.NET project gives "Web Access Fail" error | Date: Mon, 3 Feb 2003 17:56:24 -0800 | Lines: 16 | Message-ID: <0b5501c2cbf0$9f155480$8ef82ecf@TK2MSFTNGXA04> | MIME-Version: 1.0 | Content-Type: text/plain; | charset="iso-8859-1" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 | Thread-Index: AcLL8J8StKW4NNutTY++NEC63ofAYg== | Newsgroups: microsoft.public.vsnet.general | NNTP-Posting-Host: TK2MSFTNGXA04 10.40.1.52 | Path: cpmsftngxa06!cpmsftngxa10!cpmsftngxa08 | Xref: cpmsftngxa06 microsoft.public.vsnet.general:4706 | X-Tomcat-NG: microsoft.public.vsnet.general | | Hi, | | When I create a new ASP.NET project, it fails and gives | me a "Web Access Fail" error. and I get this: | | Unable to create Web project 'WebApplication1'. | The file path | 'c:\inetpub\wwwroot\WebApplication1' does not correspond | to the | URL | 'http://localhost/WebApplication'. The two need to map to | the same server | location. HTTP Error 404: Object Not Found | | I am running this on windows 2003 .net .... | |
|
|
|
| |
|
|
| |
|
|
|
|
|
|
|
|
BootFX
Reliable and powerful .NET application framework. |
|
|
|
|
|
|