The text string you give here is not coming from IIS. - Kristofer Gafvert |
Thursday, March 08, 2007 10:20 AM
|
The text string you give here is not coming from IIS. So there has to be a
configuration on your server preventing mdb files from being served. Could
it be that you have mapped the mdb extension to ASP.NET? It looks like that.
In that case, you need to edit your web.config file.
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info |
 |
iis 6 won't serve mdb file - kpg |
Thursday, March 08, 2007 12:30 PM
|
OK. mdb files are mapped (by default) to asp.net. I found the
httpHandler
in the web.config file in the system .net configure folder, and it was
using the forbidden handler.
I made several faied attempts to edit the local web.config file to
remove
the httpHandler but then I got a page not found error.
So I ended up removing the mdb mapping for that web site, which has the
same effect as mapping it but then allowing access.
I suppose ideally I would like to use the <location> section to only
allow
mdb files for a particular page - but like I said the edits I tried in
the
web.config file did not produce the desired results.
this:
seemed to remove the handler, but since the file was still mapped
I got a page not found error.
this:
type="System.Web.DefaultHttpHandler" validate="True" />
and this:
type="System.Web.DefaultHttpHandler" validate="True" />
had the same effect, which puzzles me somewhat.
Removing the mapping by clicking configure on the directory tab
of the web site properties worked - but I think the web.config
technique is slightly more desirable (if possible).
thanks
kpg |
 |
mdb files are not mapped to ASP.NET by default. - Kristofer Gafvert |
Thursday, March 08, 2007 2:57 PM
|
mdb files are not mapped to ASP.NET by default. At least not on any system
i have used. Why would you desire to use ASP.NET to serve the file? It
requires more resources on the server, and i can see no benefit at all
using this technique for serving static files.
I think you need to consult the ASP.NET newsgroup for ASP.NET specific
problems.
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info |
 |
iis 6 won't serve mdb file - kpg |
Monday, March 12, 2007 8:22 AM
|
hmmmm...perhaps we are using different terminology.
When I say .mdb files are mapped to asp.net, what I mean is that
from the IIS configuration snapin, right clicking on the web
site tree node, going to properties, select the Home directory
tab, click configure, select the Mappings tab, .mdb files are
handled by C:\windows\ms.net\fw\v2.0.50727\aspnet_iisapi.dll.
This is true for all machines I have asp.net 2.0 installed on.
The site in question is a generic file transfer site, used in lieu
of an ftp site, designed to allow my clients to upload and download
files to me. Sometimes the file will be an mdb file.
I use an asp.net app for this becuase my clients can use a web
browser but are often not technical enough to use an ftp site,
plus I use SSL and a custom login for security.
My dilemma stemmed from the fact that my users could not download
mdb files. By removing the "mapping" they can now download mdb files.
Indeed, mdb files were being handled by the httpforbidden handler
due to the mapping.
In any case you have guided me to the solution,
thanks again |
 |
won't serve mdb file - Hugh |
Wednesday, April 18, 2007 12:28 PM
|
You say you were guided to the solution. Could you share the solution? I am using a shared hosted server and the only option I have is to use a web.config. Everything I have searched on says to change the ISS settings but I do not have that option. |
 |
Solution - Hugh |
Wednesday, April 18, 2007 1:56 PM
|
put a web.config in the directory or directory structure you want to allow the access database to download from.
The solution required that you first remove the system default and then add your own as aparentlly you can't just overwrite it (I tried). I had to figure out what the system default was since the remove has to match exactlly. |
 |
Last post lost code due to open brackets make sure you put them back inremove - Hugh |
Wednesday, April 18, 2007 1:58 PM
|
Last post lost code due to open brackets make sure you put them back in
remove verb="*" path="*.mdb" />
add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler"/> |
 |
re solution - Hugh |
Wednesday, April 18, 2007 2:03 PM
|
<configuration> <br />
<system.web><br />
<httpHandlers><br />
<remove verb="*" path="*.mdb" /> <br />
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler"/><br />
</httpHandlers><br />
</system.web><br />
</configuration> |
 |