Link to home
Start Free TrialLog in
Avatar of AnneF
AnneF

asked on

ASP.Net - Adhoc permission on a folder

Hi,
I have a web application where users can click on links to view pdf, word and excel files. This part is working

I also have autocad files (.dwg), and even if they have Autocad or GCad viewer on their machine they cannot view the file. (solution welcome, if you know how to view .dwg files with ASP.NET)

As I haven't managed to open directly the .dwg file, I would like the application to download the file onto the client (in the download folder for instance). Is there a way to request permission from the user to write on the folder.
Like when you download a file from the internet, you are asked to give permission on the download folder.

Thank you in advance for your help

Anne
Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

The browser should do this automatically for an unrecognized file type.  PDFs, etc, open in the browser because the browser has a plug-in that knows how to handle them.  Clicking on a .DWG should cause the browser to prompt the user to download.  Ultimately, this is not a site/server problem, but a browser problem.

What browser are you using?  Can you try a different one?
Do you want to download the file or open it over the internet? Two different items.. the first is a regular download the second goes into your %temp% directory and is opened there.

on your server you have to add the mime type for .dwg for the user to be able to open/view them over the internet.

DWG files: "image/vnd.dwg" with a "dwg" extension
DXF files: "image/vnd.dxf" with a "dxf" extension
DWF files: "drawing/x-dwf" with a "dwf" extension


User generated image
Avatar of AnneF
AnneF

ASKER

I am using Firefox and IE9, and get the same error (error below) with both of them.

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

I get it when I tried to open a dwg file, of course the file is there and available. pdf's in the same location are being opened with no problems.
Do the .DWG file names have any special characters?  Spaces or apostrophes especially.  The "file not found" is a clue here.
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AnneF

ASKER

Thanks, it works :)