Click here to Skip to main content
15,881,092 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
In my application i want to create a folder(name=current date and time) on client machine using code and save files in to it. But it gives permission error when i am trying to save the file.

I don't want save and open dialog box so that client can save on his own.

My requirement is when client(admin) select a set of candidates from a grid view and click on download selected resumes button the resumes will be downloaded to local folder(client machine) along with excel sheet file which contains candidates name and the URL/location path for the resumes of each candidate. So when client open the excel sheet file and click on URL/location path candidate resume will be opened.

Any help will be appreciated.

:)
Posted

You try to do something in a web environment that is impossible - make it into a desktop application!
Why is that so important to you where the files will be stored?! After all is ain't your computer - so it should not be your decision!
If you really have no choice but do desktop-like web application you have to use some technologies made exactly for that, like Java or Silverlight...
 
Share this answer
 
Comments
Sandesh M Patil 9-Jun-14 8:25am    
Oh come on, its a client requirement he dont want to save file on his own. Its his requirement that files will be automatically saved on his machine and he need to open only the excel file to check the candidate resumes
Kornfeld Eliyahu Peter 9-Jun-14 8:39am    
Anyway - client or not, standard HTML/JavaScript based web pages can't do that for you...You have some extensions like Java or Silverlight...
Sergey Alexandrovich Kryukov 9-Jun-14 13:11pm    
Are you sharing this naive and destructive believe that everything should be done as customers require? No matter how stupid a "requirement" can be?

Some parties push this myth, but none of the successful companies use this "principle" in real work, otherwise they would loose the business really soon. And it's your responsibility to speak up against wrong requirements. This is always difficult, but remember that you will be made responsible for damage resulting from implementation of bad requirements, because you did not raise the flag when it wasn't too late.

Saving anything "automatically" is always bad for customers because this is utterly unsafe. But you can always implement saving on request, because downloading is always a viable working choice.

—SA
Kornfeld Eliyahu Peter 9-Jun-14 13:22pm    
"remember that you will be made responsible for damage resulting from implementation of bad requirements" - so true...
Sergey Alexandrovich Kryukov 9-Jun-14 13:55pm    
Can be clearly see from real practice... :-)
—SA
This is no doubt a silly requirement. You must try your best to avoid this requirement.

But, if you can't avoid then, there is a workaround to implement this kind of functionality...

1. Create a service that run on client machine.
2. Invoke this service from webpage.
3. The service will download the file and save at the specified location.

Now, the question arises that, how would you install this service on client machine? The solution may be like this-

1. When you want to save the files, look for the service on the client.
2. If the service is not there (in first run), open service download page and guide to user to download and install the service. (remember it must be lightweight).
3. If the service is there, then invoke the service so that, it downloads and saves the file.

Now, you will think that this is a very long and time consuming process to implement. Yes, it is... So is the requirement you received from client...

So, you have to decide what you are going to do...

IF you need any further help, please write back to me...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900