Serving PDF files with SQL through firewall to ASP.Net

  • Thread starter Thread starter Mitch
  • Start date Start date
M

Mitch

Hello all,

I presently have a SQL Server supplying data using ADO.Net and query
strings through a designated SQL port (opened on my Cisco Pix
firewall) to an IIS server running my ASP.Net applications and then
exposing it all to the web.

I want to be able to expose PDF files with the SQL Server that's on
this side of the firewall to the IIS ASP.Net application on the other
side of the firewall, (hopefully using the same connection strings,
port, etc.)

The PDF files are on the machine with the SQL Server.

I need advise on a basic approach to solve this.

Should I BLOB the PDF files (they are big, there are lots of them and
they change) ?

Can I just store a link in SQL and somehow reference them, yet send
them through my open SQL port?

Should I "Remote" them somehow or send them "streaming" as binary?

It seems there should be some basic design solution here that either
SQL Server or .NET provides that I'm not seeing.

All help is appreciated. Thanks in advance.

Mitch Sanders

:?
 
Mitch said:
Hello all,

I presently have a SQL Server supplying data using ADO.Net and query
strings through a designated SQL port (opened on my Cisco Pix
firewall) to an IIS server running my ASP.Net applications and then
exposing it all to the web.

I want to be able to expose PDF files with the SQL Server that's on
this side of the firewall to the IIS ASP.Net application on the other
side of the firewall, (hopefully using the same connection strings,
port, etc.)

The PDF files are on the machine with the SQL Server.

I need advise on a basic approach to solve this.
you need a fileserver. you can impersonate ASP.NET worker
process to a domain user which can access the share where the files are.
this is not recommended by security experts, but you can
create a special domain and a special user who has access
only to that share.

just access the files using unc names (for some reason network drive
names don't seem to work from asp.net).
 
this may be a good idea if I understand it right.... but you are
talking about changing a user on the IIS (asp.net) side, correct? Or
can I somehow have a SQL user be impersonated on the database side?

Remember, I have the IIS (.NET web app) and the SQL on two different
sides of a strong firewall with only a small special SQL port open
(not 80, I think its 1422 ?)
 
Mitch said:
this may be a good idea if I understand it right.... but you are
talking about changing a user on the IIS (asp.net) side, correct? Or
can I somehow have a SQL user be impersonated on the database side?
you have to impersonate the asp.net worker process. edit machine.config
Remember, I have the IIS (.NET web app) and the SQL on two different
sides of a strong firewall with only a small special SQL port open
(not 80, I think its 1422 ?)
you need a fileserver on a domain. probably close to the iis server,
otherwise
you have to open smb ports.

typically you would just keep the filename on db, and the file itself would
be on the fileserver. if you want to complicate it you can
keep the file as a blob in the db.
 
Back
Top