Visual Studio tries to write/read a .HTM file (I believe called "test.htm")
to test whether a given Web Project can open/operate correctly. If that
fails, then you get the error you state below.
It sounds like since you made ASP.Net protect .htm files and require custom
authentication, Visual Studio now fails to open that file since Visual
Studio cannot negotiate arbitrary custom authentication. It works ok if it
was standard basic/Windows/Kerberos/etc.
Thus, I do not think what you want to do is simultaneously possible without
further configuration.
One solution could be that you will just run with .htm unprotected while
developing with Visual Studio, and then switch on the .htm protection with
aspnet_isapi on the deployment server for testing.
One possible hack I can think of:
For every single application that has .htm protected in a non-standard
manner, add a special IIS configuration for test.htm such that it is NOT
protected by the non-standard authentication scheme. This allows Visual
Studio to work while .htm settings are secured for everything else EXCEPT
that test.htm (which you're not using, anyways).
You can do this with:
cscript %systemdrive%\inetpub\adminscripts\adsutil.vbs create
w3svc/1/root/[ApplicationName]/test.htm IIsWebFile
cscript %systemdrive%\inetpub\adminscripts\adsutil.vbs set
w3svc/1/root/[ApplicationName]/test.htm/ScriptMaps ""
This will set /[ApplicationName]/test.htm on website ID 1 (usually Default
Website) to not be protected by any scriptmapped settings (such as your
aspnet_isapi.dll mapping to .htm) -- so it should use standard
authentication and succeed with Visual Studio.
I believe the file used by Visual Studio is called /test.htm -- you can find
out in the IIS Web Log file for the exact name used by Visual Studio -- go
to %SYSTEMROOT%\System32\LogFiles\W3SVC#\*.log and find the entry made after
you open the Web Project with Visual Studio. You should see a whole bunch
of requests logged in there, but the first one should be to
/[ApplicationName]/test.htm
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Jason Moore" <JasonMoore RemoveThis @discussions.microsoft.com> wrote in message
news:DD83010D-D5FF-4549-976F-FFEAACA837B1@microsoft.com...
When I set aspnet_asapi.dll to process .htm files, I get an error when
attempting to open an asp.net website that says:
"Unable to open Web project 'StarbranchesLogin'. The file path
'C:\Inetpub\wwwroot\StarbranchesLogin' does not correspond to the URL
'http://localhost/StarbranchesLogin'. The two need to map to the same server
location."
I already have aspnet_asapi.dll processing .html file fine, but as soon as I
try to do the same thing with .htm, I get the error listed above... Any
Ideas? I need to have aspnet_asapi.dll process all htm and html files
because
I am trying to password protect the site, and it is too large to recreate in
asp.net right now.
Any Ideas or suggestions would be greatly appreciated.
TIA
Jason Moore
>> Stay informed about: Problem with ASP.NET & IIS using aspnet_asap.dll to proces..