Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i have an asp.net application that uses windows authentication.

however i am having trouble with it:

  <location path="default.aspx">
    <system.web>
      <authorization>
        <deny users="mlabs\ksmith"/>
        <allow roles="mlabs\Group2Users" />
      </authorization>
    </system.web>
  </location>

when i run it, i am getting this error:

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS1061: 'ASP.default_aspx' does not contain a definition for 'SqlDataSource1_Selecting' and no extension method 'SqlDataSource1_Selecting' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?)

Source Error:


Line 143:            </ItemTemplate>
Line 144:        </asp:FormView>
Line 145:        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
Line 146:            ConnectionString="<%$ ConnectionStrings:qcvalues_testConnectionString %>" 
Line 147:            SelectCommand="SELECT * FROM [batchinfo]" 

Source File: c:\Documents and Settings\agordon\My Documents\Visual Studio 2008\Projects\EnterData\EnterData\Default.aspx    Line: 145 


Show Detailed Compiler Output:

Show Complete Compilation Source:


Version Information: Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.3618

does anyone know what i am doing wrong?

share|improve this question
    
Why do you think this is related to authentication? It explicitly states your code is at fault. –  Ben Pilbrow Aug 23 '11 at 16:50
    
@ben great question - because when i remove the authentication it works –  Артём Царионов Aug 23 '11 at 16:53
add comment

1 Answer

up vote 1 down vote accepted

That doesn't look like it's related to authentication - the yellow screen of death doesn't even mention authentication, and quite explicitly points to your code.

It mentions SQL so have you got your connection strings set up right?

Alternatively, SqlDataSource1_Selecting sounds like an event - are you handling it correctly or have you even declared that method?

In any case, I'd say this is your code at fault, not the authentication mode.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.