Which code segment should insert at line 04?

You are creating an ASP.NET application by using the .NET Framework 3.5.

The application contains two security roles named Admins and Webusers. Web.config is configured to block unauthenticated users.

The Web.config file also contains the following code segment. (Line numbers are included for reference only.)

01 <location path=”admins”>

02 <system.web>

03 <authorization> 04

05 <allow roles =”Admins” />

06 <authorization>

07 </systero.web>

08 </location>

You need to prevent users who do not belong to the Admins role from accessing the admins folder.

Which code segment should insert at line 04?

You are creating an ASP.NET application by using the .NET Framework 3.5.

The application contains two security roles named Admins and Webusers. Web.config is configured to block unauthenticated users.

The Web.config file also contains the following code segment. (Line numbers are included for reference only.)

01 <location path=”admins”>

02 <system.web>

03 <authorization> 04

05 <allow roles =”Admins” />

06 <authorization>

07 </systero.web>

08 </location>

You need to prevent users who do not belong to the Admins role from accessing the admins folder.

Which code segment should insert at line 04?

A.
<deny roles-“Webusers” />

B.
<deny roles=”?” />

C.
<deny users5″1″ />

D.
<deny users=”Webusers” / >

Explanation:
There is a error in the question no answhere is correct, C is correct if its on Line 6 A is correct because there are only two roles and unauthenticated users are blocked. So you must be in role Admins or Webusers -> this will not work if a User has no role



Leave a Reply 0

Your email address will not be published. Required fields are marked *