user778929
user778929

Reputation: 33

Save file locally from asp.net without "save as.."? Is ActiveX the only solution?

I'm in the process of building a web application in ASP.NET MVC C# (including ajax/jquery) and have to save a file locally to the client's hard drive.

I have another application that polls a directory for new files, so it's essential the files from the website ends up at that location so therefore showing a "save as.." won't work.

What alternatives do I have? (Sadly I can't rewrite that external application to work in any other way.) Should I write the web application in silverlight instead? Should I use an ActiveX object? ActiveX feels so 1995 though.. Are there any other variants nowadays?

Upvotes: 3

Views: 1472

Answers (2)

Matías Fidemraizer
Matías Fidemraizer

Reputation: 64933

I'll vote for Silverlight solution.

But instead of developing your site entirely with Silverlight, just write a small and hidden Silverlight component that would receive a remote file location and stores it in user's local file system.

Check this other answer in Stackoverflow:

And watch this movie:

Upvotes: 2

Wouter Simons
Wouter Simons

Reputation: 2906

This would be a security feature in the browser. It is not acceptable to give a website access to a local folder without some sort of dialog. ActiveX may work, because it is much less secure.

Can you not find a different approach?

In the past I have made a local application in C# that simply uses HTTP requests to download files in a client-server model.

Upvotes: 0

Related Questions