 |
|
| .NET DotNet Forum Index » ASP.NET Forum » Prohibiting access to web service resources?... |
|
Page 1 of 1 |
|
| Author |
Message |
| Peter Olcott... |
Posted: Fri Nov 06, 2009 6:16 pm |
|
|
|
Guest
|
I want to build my first web service and I need to know more
about security.
(I already posted to
microsoft.public.dotnet.framework.aspnet.security with no
response).
Specifically, I want to make it completely impossible for
any outside user to have any access to any of the files
stored on the web server. This is to include any data files,
and the web service code. How do I do this? |
|
|
| Back to top |
|
|
|
| Mark Rae [MVP]... |
Posted: Fri Nov 06, 2009 8:06 pm |
|
|
|
Guest
|
"Peter Olcott" <NoSpam at (no spam) SeeScreen.com> wrote in message
news:efOdnTK_QM2nM2nXnZ2dnUVZ_tOdnZ2d at (no spam) giganews.com...
Quote: Specifically, I want to make it completely impossible for any outside user
to have any access to any of the files stored on the web server. This is
to include any data files, and the web service code. How do I do this?
The only way to make files *COMPLETELY* inaccessible is not to host them on
a public website in the first place.
There are lots of things you can do to increase the level of difficulty in
accessing certain files, but you simply cannot 100% guarantee complete
inaccessibility.
E.g. you can use any sort of password protection. But what if by some
billion-to-one chance somebody guesses your password...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net |
|
|
| Back to top |
|
|
|
| Scott M.... |
Posted: Fri Nov 06, 2009 10:11 pm |
|
|
|
Guest
|
"Peter Olcott" <NoSpam at (no spam) SeeScreen.com> wrote in message
news:efOdnTK_QM2nM2nXnZ2dnUVZ_tOdnZ2d at (no spam) giganews.com...
Quote: I want to build my first web service and I need to know more about
security.
(I already posted to microsoft.public.dotnet.framework.aspnet.security
with no response).
Specifically, I want to make it completely impossible for any outside user
to have any access to any of the files stored on the web server. This is
to include any data files, and the web service code. How do I do this?
Every public web server strives to be secure, but that doesn't mean there is
any foolproof way to keep a hacker out. The best you can do is do the best
you can do.
If you were going to host a web service on a Windows web server, you'd most
likely be serving it via IIS. Data files in ASP .NET are typically best
placed in the App_Data folder, which is a folder that IIS knows not to grant
outside access to. Your web.config file (or any file with a .config
extension) is also not served by IIS, and in a production environment, you
wouldn't have your source code (your .vb or .cs files) up on the server
anyway, you'd just have your compiled assembly (.dll), which is also kept in
a protected directory.
So, you really don't have to worry about the sensitive folders and files of
your web service being accessible to the outside world any more than you'd
worry about your entire server being hacked, which is not a .NET issue, but
a server security issue.
-Scott |
|
|
| Back to top |
|
|
|
| Peter Olcott... |
Posted: Sat Nov 07, 2009 8:41 am |
|
|
|
Guest
|
"Mark Rae [MVP]" <mark at (no spam) markNOSPAMrae.net> wrote in message
news:eLWq$Z0XKHA.4704 at (no spam) TK2MSFTNGP02.phx.gbl...
Quote: "Peter Olcott" <NoSpam at (no spam) SeeScreen.com> wrote in message
news:efOdnTK_QM2nM2nXnZ2dnUVZ_tOdnZ2d at (no spam) giganews.com...
Specifically, I want to make it completely impossible for
any outside user to have any access to any of the files
stored on the web server. This is to include any data
files, and the web service code. How do I do this?
The only way to make files *COMPLETELY* inaccessible is
not to host them on a public website in the first place.
There are lots of things you can do to increase the level
of difficulty in accessing certain files, but you simply
cannot 100% guarantee complete inaccessibility.
E.g. you can use any sort of password protection. But what
if by some billion-to-one chance somebody guesses your
password...?
With a 14 character password of random characters it would
be
1 chance in 4,205,231,901,698,742,834,534,301,696.
|
|
|
| Back to top |
|
|
|
| Peter Olcott... |
Posted: Sat Nov 07, 2009 8:43 am |
|
|
|
Guest
|
"Scott M." <s-mar at (no spam) nospam.nospam> wrote in message
news:usfgLf1XKHA.1268 at (no spam) TK2MSFTNGP04.phx.gbl...
Quote:
"Peter Olcott" <NoSpam at (no spam) SeeScreen.com> wrote in message
news:efOdnTK_QM2nM2nXnZ2dnUVZ_tOdnZ2d at (no spam) giganews.com...
I want to build my first web service and I need to know
more about security.
(I already posted to
microsoft.public.dotnet.framework.aspnet.security with no
response).
Specifically, I want to make it completely impossible for
any outside user to have any access to any of the files
stored on the web server. This is to include any data
files, and the web service code. How do I do this?
Every public web server strives to be secure, but that
doesn't mean there is any foolproof way to keep a hacker
out. The best you can do is do the best you can do.
If you were going to host a web service on a Windows web
server, you'd most likely be serving it via IIS. Data
files in ASP .NET are typically best placed in the
App_Data folder, which is a folder that IIS knows not to
grant outside access to. Your web.config file (or any
file with a .config extension) is also not served by IIS,
and in a production environment, you wouldn't have your
source code (your .vb or .cs files) up on the server
anyway, you'd just have your compiled assembly (.dll),
which is also kept in a protected directory.
So, you really don't have to worry about the sensitive
folders and files of your web service being accessible to
the outside world any more than you'd worry about your
entire server being hacked, which is not a .NET issue, but
a server security issue.
-Scott
Great how do I make files and folders inaccessible? |
|
|
| Back to top |
|
|
|
| Scott M.... |
Posted: Sat Nov 07, 2009 9:28 am |
|
|
|
Guest
|
"Peter Olcott" <NoSpam at (no spam) SeeScreen.com> wrote in message
news:qfednY-IqNbz5GjXnZ2dnUVZ_oednZ2d at (no spam) giganews.com...
Quote:
"Scott M." <s-mar at (no spam) nospam.nospam> wrote in message
news:usfgLf1XKHA.1268 at (no spam) TK2MSFTNGP04.phx.gbl...
"Peter Olcott" <NoSpam at (no spam) SeeScreen.com> wrote in message
news:efOdnTK_QM2nM2nXnZ2dnUVZ_tOdnZ2d at (no spam) giganews.com...
I want to build my first web service and I need to know more about
security.
(I already posted to microsoft.public.dotnet.framework.aspnet.security
with no response).
Specifically, I want to make it completely impossible for any outside
user to have any access to any of the files stored on the web server.
This is to include any data files, and the web service code. How do I do
this?
Every public web server strives to be secure, but that doesn't mean there
is any foolproof way to keep a hacker out. The best you can do is do
the best you can do.
If you were going to host a web service on a Windows web server, you'd
most likely be serving it via IIS. Data files in ASP .NET are typically
best placed in the App_Data folder, which is a folder that IIS knows not
to grant outside access to. Your web.config file (or any file with a
.config extension) is also not served by IIS, and in a production
environment, you wouldn't have your source code (your .vb or .cs files)
up on the server anyway, you'd just have your compiled assembly (.dll),
which is also kept in a protected directory.
So, you really don't have to worry about the sensitive folders and files
of your web service being accessible to the outside world any more than
you'd worry about your entire server being hacked, which is not a .NET
issue, but a server security issue.
-Scott
Great how do I make files and folders inaccessible?
Did you not read my message? Your App_Data folder, .dll and .config files
are already protected by IIS. And, you would't publish your source code
files to the production server anyway. There's nothing you need to do to
make this stuff private.
Aside from this, you want to keep the server password private and emply a
strong hardware and software firewall scenario as you would on any
production public server.
-Scott |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Tue Dec 01, 2009 8:21 pm
|
|