ASP.NET and IIS - Folder Name Causing and Exception (Think this is a bug)

D

Donny Mack

Hello,

Got an issue with the following server setup:
Windows 2003 Std.
ASP.NET 1.1

In the newsgroups section of our site we name archive folders the same as
newsgroup names. In this case it is
http://www.dotnetjunkies.com/newsgroups/microsoft.public.dotnet.languages.vb
well we get an exception when going there:

This type of page is not served.

Even if you manually type in:
http://www.dotnetjunkies.com/newsgroups/microsoft.public.dotnet.languages.vb/default.aspx

You get the same error.

I know exactly why it is doing this is because the folder's last three chars
are .Vb which i belive ASP.NET is interpreting as a class file, but this is
wrong behaivor, it should know it's a folder even more if i put the
/default.aspx.

So how do we get around this? Is there an IIS 6.0 or asp.net setting that we
can use to enable it for this directory?

Please help, at the moment no one can access the vb newsgroups from our
site.

Thanks,

Donny
 
N

Nicole Calinoiu

Donny,

Removing the IIS application mapping of the .vb extension to
aspnet_isapi.dll should do the trick. To do this, open the properties
dialog of the IIS application or site (not the .NET app pool) to which the
target folders belong. In the properties sheet, click the "Configuration"
button to open the application configuration dialog. In the list on the
"Mappings" tab, remove the entry for the ".vb" extension, confirm it all,
then be very, very careful what you put in the app folders.

HTH,
Nicole
 
D

Donny Mack

Thats what I was afraid of. We don't have an issue with that, but others may
be ignorant enough to upload thier class files to the webserver :)


Can Microsoft confirm that this is a bug?

thanks
 
D

Donny Mack

Did the trick, thanks Nicole!


Nicole Calinoiu said:
Donny,

Removing the IIS application mapping of the .vb extension to
aspnet_isapi.dll should do the trick. To do this, open the properties
dialog of the IIS application or site (not the .NET app pool) to which the
target folders belong. In the properties sheet, click the "Configuration"
button to open the application configuration dialog. In the list on the
"Mappings" tab, remove the entry for the ".vb" extension, confirm it all,
then be very, very careful what you put in the app folders.

HTH,
Nicole
 
N

Nicole Calinoiu

WRT to the possibility of class uploads, as a safer longer-term solution, it
may also be possible to rename the directories and use an HttpModule to
implement URL rewriting. However, the feasibility of this may depend on how
far upstream the ASP.NET engine is rejecting the ".vb". If it can't be
overridden, another potential approach would be to create a custom ISAPI
filter, but that's starting to get into the realm of the truly ugly,
particularly if it has to handle URLs like
http://www.dotnetjunkies.com/newsgroups/microsoft.public.dotnet.languages.vb/default.aspx.

Best long-term solution would still be to convince Microsoft that a folder
whose name ends in ".vb" shouldn't be handled as if it were a file. <g>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top