views:

123

answers:

2

Hi guys,

I'm trying to create an asp .net page to backup and download an mssql db from my remote host on a shared server. I tried using SMO to create a backup and save it the same folder as the .aspx page but it throws an access denied exception, I later found out that the sql server doesn't have permissions to write backups anywhere but its local backup folder which I can't download from.

Is there any alternative method to get this working?

A: 

Can't you have the ASP.NET page read the file from the backup location and stream the file to you?

Of course, you might have to talk to your host about this. They could be explicitly blocking your web site from accessing the SQL Server folders. Why won't they just provide a backup for you? The hosts I've used for shared SQL Server hosting have no problems doing this.

Aaron Bertrand
I don't know if IIS will have the permissions to access SQL server folders but I'll try.Well, its not for me, my employer needs a web interface to do it instead of the hosting management UI
Tarabai
Well like I said, you might have to talk to the web host to make that happen.
Aaron Bertrand
A: 

You may try to use SSIS to create package finish backup job, finish file transfer. Then you create a web service to communicate with SSIS package. Then use your web application call web service to start all action.

machinegone