Hi All,
I am working on a web site project.<BR>
And it has the following set up:<BR>
web site name: madhu and <BR>
Local path: C:\madhu\Folder1(uses web.config file which is in Folder1 only).<BR>

But i have one file in C:\madhu\FolderXYZ\FileABC.doc.<BR>

If i try to access the FileABC.doc(Try to open the file) i get the error mentioned below:<BR>
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.<BR>
HTTP Error 404 - File or directory not found.<BR>
Internet Information Services (IIS)

<BR>
I tried with using appsettings, configuration etc but could not able to resolve this bug.
PLEASE do send your ideas as early as possiable.

Thanks and with regards,
Madhusudhan

Dani AI

Generated

A brief diagnosis and concise checklist to complement the thread: IIS will only serve files that fall under the site’s configured content tree (the site’s physical root plus any configured virtual directories). Requests for a file that lives outside those mappings will return a 404 even though the file exists on disk. Several replies already pointed at virtual-folder mapping and whether the file was being requested via a browser (, ); the practical fixes are to either place the file inside the site root or expose its folder to the site via a properly configured virtual directory and correct permissions.

  • Confirm the IIS mapping: the site’s Home Directory (or virtual-directory alias) must point to the physical folder that contains the document. The alias used in the URL must match that virtual directory.
  • Verify the file is actually deployed to the server location being served (an FTP upload or local copy might have been placed elsewhere). (’s hint about upload location applies to remote deployments.)
  • Check NTFS permissions: the anonymous account or application-pool identity needs Read and List Folder rights on the folder and file. For a network share, the virtual directory should be configured with credentials that have access to the share.
  • Inspect configuration that can block access: web.config authorization rules, Request Filtering (IIS7+), or custom handler mappings that route static extensions into a pipeline and inadvertently block them.
  • Use the IIS logs (full status and substatus) to narrow the cause and try a simple text file in the same folder to confirm static-file serving.

Most 404s of this kind are resolved by exposing the folder to IIS (virtual directory or moving the file) and granting the IIS identity read access.

Recommended Answers

All 12 Replies

I think what's probably happening, is it's not being uploaded to the webserver. It would sound like you're using Dreamweaver, so, just in case, open an FTP program and upload it yourself.

Sorry if this is totally not helpful and I'm wrong - also, remember you can just hit [ENTER], you don't need to type <br>.

What does the code look like that is referencing this file in your project? Are you using the UNC or the literal location. Remember that Web address for you file is not what you would use to open the file in Windows.

Hi All,
I am working on a web site project.<BR>
And it has the following set up:<BR>
web site name: madhu and <BR>
Local path: C:\madhu\Folder1(uses web.config file which is in Folder1 only).<BR>

But i have one file in C:\madhu\FolderXYZ\FileABC.doc.<BR>

If i try to access the FileABC.doc(Try to open the file) i get the error mentioned below:<BR>
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.<BR>
HTTP Error 404 - File or directory not found.<BR>
Internet Information Services (IIS)

<BR>
I tried with using appsettings, configuration etc but could not able to resolve this bug.
PLEASE do send your ideas as early as possiable.

Thanks and with regards,
Madhusudhan

Hi Madhu,

Could you please let me know how ur accesing the file. I mean r u creating any File object in you application or U r just navigating to that file using browser.

thanks,
Kedar

Hi Madhu,

Could you please let me know how ur accesing the file. I mean r u creating any File object in you application or U r just navigating to that file using browser.

thanks,
Kedar

Hi Kedar,
I am navigating to that file using browser.
And still i coult not able to solve this issue.

Thanks with regards,
Madhusudhan

Yes, I made it as Virtual (web) folder

Thanks with regards,
Madhusudhan

So just to clarify;

You have this folder C:\madhu which is a Web Project Folder (meaning you have it set as a Virtual Folder under IIS) ?

You have a Sub Folder which contains a file FileABC.doc, making the physical location for this file as c:\madhu\FolderXYZ\FileABC.doc, and you want to access it through the browser?

So to access it with the browser you would have to put this address into the browser address bar: http://localhost/madhu/FolderXYZ/FileABC.doc (Assuming you made the virtual directory under IIS the same name of madhu as you did the physical folder)

Hope this helps, if not please clarify the details so we can resolve this problem you are experiencing.

Hi Kedar,
I am navigating to that file using browser.
And still i coult not able to solve this issue.

Thanks with regards,
Madhusudhan

Could you please send me the URL that ur navagating.

Hi Kedar,
I could not able to send the URL, it is kept with high security in our office.
URL is specific to the user. Need proper Authentication.
I will try and get back to you.

Thanks and with best regards,
Madhusudhan

Hi Paladine,
I basically thought the same, but not implemented :).
I do work on this concept now. And i will keep you updated.

Thanks and with regards,
Madhusudhan

No problem, glad you got it all worked out.

Take care!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.