VWD Login Control

Discussion in 'ASP.NET 2.0' started by Lawrence, Aug 28, 2006.

  1. Tip:

    If you can you should avoid screwing around too much with the Visual Web Developer login control. Even minor customizations seems to cause authorizations to fail.

    Drop it on a page and (if you have issues) leave it alone.

    Lawrence
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Yeah.. this is one of those classic Microsoft Problem. I remeber back in the Visual InterDev days, the moment you mess you the source on the design time control, you whole application is ruined.





    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. My issue seems appropriate to this thread since the use of ASP.NET login controls is being discussed....





    I have a test loginsetup - with NO customization - working fine in my local copy of VWD - which as designed in VWD includesthe database (ASPNETDB.MDF) containing the user parameters.
    When I ftp this and try it live, I get:


    ".............Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.


    Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.


    Source Error:
    Line 23: Set explicit="true" to force declaration of all variables.
    Line 24: -->
    Line 25: <roleManager enabled="true" />
    Line 26: <authorization>
    Line 27: <allow users="sl" />



    Source File: E:\web\vcspinfo000\htdocs\dev\web.config Line: 25
    ...................."



    Questions:


    - Is this because I don't have database support in the account? Or is it a setup error specific to DiscountASP? Or?


    - Is there by any chance a way of disconnecting the controls from using this Database? I would simply build a table ( I have few users to maintain!)


    - Otherwise it seems I just would have to ignore these controls and bake my own login code[​IMG]??
     
  4. Thanks Vikram for fixingmy obvious mistake!!- Now for my real problemwhich is what I was afraid of...


    Mytest loginsetupis working fine in my local copy of VWD - which as designed in VWD - and configured usingits web management tool -includesthe database (ASPNETDB.MDF) containing the user parameters. I copied it whole intothe webfolder just as I have it on my machine.


    BUT:


    - DiscountASP is setup so that SQL is extra &amp; on a separate server; and that's what I'm running into here?


    - Is there by any chance a way of disconnecting the <asp:login controls from using this Database? VWD appears to support these controls only with the DB structure... I would simply build a table ( I have few users to maintain!)


    - Otherwise it seems I just would have to ignore these controls and bake my own login code[​IMG]?? (because at this point I can't justify SQL support just for this...)


    SUMMARY OF ERROR MESSAGE


    ".....Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Source Error:





    Code:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [SqlException (0x80131904): An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]

    =========================
     
  5. Did you install Application on the folder where you have all your app. files using the Web Application Tool in the Control Panel?

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  6. Bruce

    Bruce DiscountASP.NET Staff

Share This Page