By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,536 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

Help with <location> element in web.config

P: n/a
Hi. I need to deny unauthenticated users from accessing an excel file
located within my webapp at SecurePages/ExcelFile1.xls. I've added the below
<locationelement to my web.config, but it allows unauthenticated users to
access the file. What am I doing wrong? Cannot .xls files be protected this
way?

<location path="SecurePages/ExcelFile1.xls">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
Jun 7 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I think you will have to map the xls extension to the asp.net DLL in IIS to
get this to work, so the request is being processed by asp.net and not just
by IIS.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Mike" <Mi**@discussions.microsoft.comwrote in message
news:BD**********************************@microsof t.com...
Hi. I need to deny unauthenticated users from accessing an excel file
located within my webapp at SecurePages/ExcelFile1.xls. I've added the
below
<locationelement to my web.config, but it allows unauthenticated users
to
access the file. What am I doing wrong? Cannot .xls files be protected
this
way?

<location path="SecurePages/ExcelFile1.xls">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>

Jun 7 '07 #2

P: n/a
On Jun 7, 11:04 pm, Mike <M...@discussions.microsoft.comwrote:
Hi. I need to deny unauthenticated users from accessing an excel file
located within my webapp at SecurePages/ExcelFile1.xls. I've added the below
<locationelement to my web.config, but it allows unauthenticated users to
access the file. What am I doing wrong? Cannot .xls files be protected this
way?

<location path="SecurePages/ExcelFile1.xls">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
It would work with Windows Authentication only.

Jun 7 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.