Home All Groups Group Topic Archive Search About
Author
24 Nov 2005 2:12 PM
Bob
The web.config file is a pure XML file.  Would people who visits my website
built on ASP.NET 2.0 be able to access my web.config file?  i.e. can they do
http://mywebsite/web.config ?

I'm thinking of storing the DSN info in there and I definitely don't want
people to see my connection string.

Author
24 Nov 2005 2:22 PM
Mark Rae
"Bob" <spamfree@nospam.com> wrote in message
news:OcXrG9P8FHA.3544@TK2MSFTNGP09.phx.gbl...

> The web.config file is a pure XML file.  Would people who visits my
> website
> built on ASP.NET 2.0 be able to access my web.config file?  i.e. can they
> do
> http://mywebsite/web.config ?

What happened when you tried this for yourself...?

> I'm thinking of storing the DSN info in there and I definitely don't want
> people to see my connection string.

Why don't you use encryption?
Are all your drivers up to date? click for free checkup

Author
24 Nov 2005 2:24 PM
Karl Seguin
No, the .config file is mapped to ASPX inside IIS, and within asp.net, it's
mapped to the ForbiddenHandler

so it goes

request for .config
  iis --> asp.net
    asp.net --> forbidden access


I hate to point out the obvious, but why not just try it out? :)

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


Show quoteHide quote
"Bob" <spamfree@nospam.com> wrote in message
news:OcXrG9P8FHA.3544@TK2MSFTNGP09.phx.gbl...
> The web.config file is a pure XML file.  Would people who visits my
> website
> built on ASP.NET 2.0 be able to access my web.config file?  i.e. can they
> do
> http://mywebsite/web.config ?
>
> I'm thinking of storing the DSN info in there and I definitely don't want
> people to see my connection string.
>
>
Author
24 Nov 2005 3:25 PM
Wouter van Vugt
Ehr Karl,

that's what I said...

and the .config file is not mapped to ASPX. It is mapped to the ASP.NET
isapi dll which kick starts it all.

Oh well..
Author
25 Nov 2005 2:34 PM
Bob
Excellent.  Thanks, guys.

In other words, I can create my own custom .config file (i.e.
myusers.config) and rely on IIS to protect it from prying eyes for me?


Show quoteHide quote
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%23XLmFMQ8FHA.132@TK2MSFTNGP15.phx.gbl...
> No, the .config file is mapped to ASPX inside IIS, and within asp.net,
it's
> mapped to the ForbiddenHandler
>
> so it goes
>
> request for .config
>   iis --> asp.net
>     asp.net --> forbidden access
>
>
> I hate to point out the obvious, but why not just try it out? :)
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
> "Bob" <spamfree@nospam.com> wrote in message
> news:OcXrG9P8FHA.3544@TK2MSFTNGP09.phx.gbl...
> > The web.config file is a pure XML file.  Would people who visits my
> > website
> > built on ASP.NET 2.0 be able to access my web.config file?  i.e. can
they
> > do
> > http://mywebsite/web.config ?
> >
> > I'm thinking of storing the DSN info in there and I definitely don't
want
> > people to see my connection string.
> >
> >
>
>
Author
25 Nov 2005 3:10 PM
Karl Seguin
yes

--
MY ASP.Net tutorials
http://www.openmymind.net/


Show quoteHide quote
"Bob" <spamfree@nospam.com> wrote in message
news:uBoOvtc8FHA.2364@TK2MSFTNGP12.phx.gbl...
> Excellent.  Thanks, guys.
>
> In other words, I can create my own custom .config file (i.e.
> myusers.config) and rely on IIS to protect it from prying eyes for me?
>
>
> "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
> wrote in message news:%23XLmFMQ8FHA.132@TK2MSFTNGP15.phx.gbl...
>> No, the .config file is mapped to ASPX inside IIS, and within asp.net,
> it's
>> mapped to the ForbiddenHandler
>>
>> so it goes
>>
>> request for .config
>>   iis --> asp.net
>>     asp.net --> forbidden access
>>
>>
>> I hate to point out the obvious, but why not just try it out? :)
>>
>> Karl
>>
>> --
>> MY ASP.Net tutorials
>> http://www.openmymind.net/
>>
>>
>> "Bob" <spamfree@nospam.com> wrote in message
>> news:OcXrG9P8FHA.3544@TK2MSFTNGP09.phx.gbl...
>> > The web.config file is a pure XML file.  Would people who visits my
>> > website
>> > built on ASP.NET 2.0 be able to access my web.config file?  i.e. can
> they
>> > do
>> > http://mywebsite/web.config ?
>> >
>> > I'm thinking of storing the DSN info in there and I definitely don't
> want
>> > people to see my connection string.
>> >
>> >
>>
>>
>
>
Author
24 Nov 2005 2:27 PM
Wouter van Vugt
Hi Bob,

no, you can't request a web.config file. The ASP.NET framework has
attached a page handler to this file which serves a HTTP-Forbidden to
the client.

You can encrypt your config file if you don't want people to be able to
read it.

Grtz, Wouter

Trainer - Info Support
www.dive-in-it.nl

Bookmark and Share