locked
Login control does not work after upload to web host RRS feed

  • Question

  • User1812608968 posted

    Hello all.

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>

    Very much a newbie to asp.net.

    Have created a website on my local machine including a simple login page to restrict users to access. Pulled all the necessary  ASP.NET 2.0 controls into aspx pages.

    I did create a App_Data folder with appropriate .mdf and .ldf.

    Created my allowed clients in the CreateUserWizard.

    Checked the .mdf  file and all my data is there.

    Web.config file created:

    <configuration>

       <system.web>

            <roleManager enabled="true" />

            <authentication mode="Forms" />

       <customErrors mode="Off"/>

       </system.web>

    </configuration>

    All works as a charm in my local machine.

    Upon uploading my site to my webhost, none of the login features work.

    With these errors:

    Server Error in '/' Application. <o:p></o:p>

    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) <o:p></o:p>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: <o:p></o:p>

    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. <o:p></o:p>


    Stack Trace: <o:p></o:p>

    <o:p> </o:p>

    [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)]<o:p></o:p>   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800131<o:p></o:p>   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186<o:p></o:p>   System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +737554<o:p></o:p>   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +114<o:p></o:p>   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +421<o:p></o:p>   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181<o:p></o:p>   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173<o:p></o:p>   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +133<o:p></o:p>   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30<o:p></o:p>   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424<o:p></o:p>   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66<o:p></o:p>   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +494<o:p></o:p>   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82<o:p></o:p>   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105<o:p></o:p>   System.Data.SqlClient.SqlConnection.Open() +111<o:p></o:p>   System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84<o:p></o:p>   System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197<o:p></o:p>   System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121<o:p></o:p>   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105<o:p></o:p>   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42<o:p></o:p>   System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83<o:p></o:p>   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160<o:p></o:p>   System.Web.UI.WebControls.Login.AttemptLogin() +105<o:p></o:p>   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99<o:p></o:p>   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35<o:p></o:p>   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115<o:p></o:p>   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163<o:p></o:p>   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7<o:p></o:p>   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11<o:p></o:p>   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33<o:p></o:p>   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746<o:p></o:p>
    <o:p> </o:p>

    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433<o:p></o:p><o:p> </o:p>I have created a few data bases that can be accessed and viewed on various pages. <o:p></o:p>I thought that the data base created in the App_Data folder would be a standalone db.<o:p></o:p>I am not sure why I continuously receive these errors.<o:p></o:p>Any help with this would be greatly appreciated.<o:p></o:p>

    JH

     

    Tuesday, July 1, 2008 9:09 PM

All replies

  • User-1107949042 posted

    Hi there, 

    the issue is about your connection string can you please send the connection string also

    Tuesday, July 1, 2008 9:50 PM
  • User1812608968 posted

    Thank you for your reply

    How would I create a connection string to the App_Data ASPNETDB.MDF.

    This file was created automatic when I applied the  ASP.NET login control.

    I also used the CreateUserWizard control to enter a few test users.

    I am using the SQL Server management Studio Express to verify the data in th ASPNETDB.MDF file and it is all there.

    All works great on my local machine but again does not work once uploded to webserver.

    Thank you for your help

    Wednesday, July 2, 2008 1:49 PM
  • User1805868254 posted

     web hosting companies almost never  host databases on the same server. So, unless your hosting company offers hosting your database out of the app_data folder, it will not work.

    Wednesday, July 2, 2008 9:35 PM
  • User1812608968 posted

    Thank you for your reply.

    So this ASP.NET login control feature does not work on web hosts?

     

    Wednesday, July 2, 2008 9:48 PM
  • User1805868254 posted

     i would dare to say that on most 3rd party histing it will not work. it is a better way to create your database in sql server or express and work with it that way while developing your site. when you ready to deploy your site, you will need to backup your database and then restore it on your hosting account. you'll have to find out from your host or from your hosting control panel how that works. do not worry, asp.net will make your hair fall out beffore you know. just kidding. good luck.

    Wednesday, July 2, 2008 10:06 PM
  • User1812608968 posted

    Not the news I wanted.

    Have no scripting knowledge so I got quit exited when I got this login feature working on my local machine.

    Was hoping for an easy upload but I guess not.

    To old to start from scratch and learn all the scripting lingo.

    I have no problem developing sql data bases and retreive data in a web page but to make it possible to make changes via a web page seems unreachable.

    Thank you for your help

    Thursday, July 3, 2008 2:56 PM
  • User-1705717250 posted

    I would say to not to passover the membership provider, true it can sometimes take a little time to get it working on a new hosting account, but most of the time no big deal.

    The main problem tends to be remote access to the sql server, which means you can not use visual web developer or sql server management.

    Can I ask what host you are planning on using? It would help to know to give you some steps to follow.

    A very good write up on the membership is at http://aspnet.4guysfromrolla.com/articles/120705-1.aspx

    I plus many more I am sure will be happy to help you step over any problems.

    Hope it helps

    Thursday, July 3, 2008 4:41 PM
  • User1805868254 posted

     uswede, there is no scripting involved. here is what you do.

    1.)  Open SQL Server management studio Express

    2.)  Right click on the "databases" folder and left click on "new database"

    3.)  Name your new database and create your tables

    4.)  Close  SQL Server management studio Express

    5.)  Open Visual Web Developer Express and open the application you are working on

    6.)  Open your web.config file and get rid of your old connection string and make it look like this:

      <add name="GiveAnyNameForYourConnectionStringHere" connectionString="Data Source=YourComputerNameHere\SQLEXPRESS;Initial Catalog=YourDatabaseNameHere;Integrated Security=True" providerName="System.Data.SqlClient" />
    

    7.)  Close web.config

    8.)  Delete the automatically generated database in your app_code folder

    9.)  If you recreated your database exactly the same, all your pages should work fine

    10.) When you are done developing your site, change your connection string according to your hosting providers instructions. It should look something like this:

            <add name="GiveTheSameNameAsAbove" connectionString="Data Source=sql123.yourSiteName.com;Initial Catalog=TheNameOfDb;Persist Security Info=True;User ID=YourUserID;Password=YourPassword" providerName="System.Data.SqlClient" />

    11.) In your hosting provider control panel, create an sql server database and name it like above in the connection string

    12.) Create a backup of your local database and restore the backup to the database you created in your hosting account.

    No matter what technology or language you work with, this would always be the same procedure. Hope this helps you. Unfortunately there is no point and click approach but since you are proficient with SQL Server databases, this should be no problem for you. Good luck.

     

     

     

    Thursday, July 3, 2008 7:56 PM
  • User1812608968 posted

    Thank you for your reply.

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>

    Followed your instructions to the letter. Still receiving same message when uploaded to host site.

    I will try a new approach.

    I have created a simple MSSQL  data base that consists of 3 columns.

    Column 1 is named Id, data type Int. and is the primary key.

    Column 2 is named FirstName, datatype nchar(10)

    Column 3 is named LastName, datatype nchar(10)

    There are two rows of data.

    This database is called “test”

    This data base resides on my web host site (not locally on my machine)

    I can access this test database and make changes to it via SQL server management Studio express. It appears to be working ok.

    I would like to know if it is possible for a novice like me to be able to use this “test” database to be viewed, add data and be edited through a website.

    I have created a simple two page website (one is the default.aspx page and the other is the web.config page.

    Created a new ASP.Net connection to my hosting provider and it did test out without errors.

    My Default.aspx page only contains a DataList ASP.Net Control that is linked to my created ASP.NET connectionString as created in the above mentioned text.

    My web.config file:

    <configuration>

        <connectionStrings>

            <add name="ConnectionString1" connectionString="Data Source=mssql300.ixwebhosting.com;initial catalog=test;Persist Security Info=True;User ID=swedesi_johan;Password=test123"

                providerName="System.Data.SqlClient" />

        </connectionStrings>

    </configuration>

    <o:p> </o:p>

    Any help would be greatly appreciated.

    Johan

     

    Sunday, July 6, 2008 5:29 PM
  • User1805868254 posted

     If it did test out ok remotelly, I do not see why it would not work. Did you upload those two pages and test them on your site?

    Sunday, July 6, 2008 6:31 PM
  • User1812608968 posted

    Server Error in '/' Application.

    Runtime Error

    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>


    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
        </system.web>
    </configuration>

    Thank you for your help.

    I am not sure how I can explain my issue any clearer than in my previous communique.

    My question would again be: How would one create an aspx website that can view, edit an existing mssql database residing on a non local machine.

    Again I gave all the data and info in the prior massage

    My appology if I am not making myself clear

    Cordially Yours

    JH   

    Sunday, July 6, 2008 10:13 PM
  • User-186742165 posted
    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>

     

    Hi

    To figure out what problem you meet now, please display the details of error message as said in bold. We also strongly recommend you read this step by step tutorial before deploy your site on the webhost.

    http://www.asp.net/learn/security/

     

    Monday, July 7, 2008 3:53 AM
  • User1812608968 posted

    Here are my errors:

    Server Error in '/' Application.

    Runtime Error

    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>


    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
        </system.web>
    </configuration>

     

    Config file:

     

    <configuration>
      
        <system.web>
            <customErrors mode="Off"/>
            <customErrors mode="RemoteOnly" defaultRedirect="errorpage.htm"/>
        </system.web>
      
     <connectionStrings>
            <add name="swedesi_testConnectionString1" connectionString="Data Source=mssql300.ixwebhosting.com;Initial Catalog=swedesi_test;User ID=swedesi_johan;Password=test123"
                providerName="System.Data.SqlClient" />
        </connectionStrings>
    </configuration>


    Monday, July 7, 2008 11:18 AM
  • User1812608968 posted

    Thank you for your reply.

    Great site a lot of information that is I am sure directed towards programmers and slightly above my knowledge of scripting in C#,VB etc etc.

    I did find a great video presentation on your suggested site. Thank you.

    Upon following all the steps and again having a perfectly working  web site on my local machine with all the ASP.NET administrative settings including the “forgotten password email return”

    Upon uploading the “working website”to my ASP.Net 2.0 compatible WEBHOST. Once again it returned errors and  for some reason unable to function once on a web host.

    Does anyone know how to upload a fully working ASP.NET web site (on a local machine)  to a compatible ASP.NET 2.0  Web Host????

    Cordially yours.

    JH

     

    Monday, July 7, 2008 8:16 PM
  • User-186742165 posted

    Here are my errors

    Hi

    Sorry, but there is no inner Exception and call stack in your post. For <customErrors> Element, you can get more information from this article.

    http://msdn.microsoft.com/en-us/library/y123fsf7(VS.71).aspx

    Monday, July 7, 2008 10:32 PM
  • User863018716 posted

    In your web.config file did you give connection string. And you can try with the help of Break point in your

    login control whether connection is establish or not.

    Try this and tell me.

     

    -----------------------------------------

    If it is worth full for you mark it as answer. 

    Tuesday, July 8, 2008 2:56 AM
  • User1812608968 posted

    Thank You for your reply.

     

    Here are all the errors I could find.

    Server Error in '/' Application.

    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)

    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:

    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)]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800131
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
       System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +737554
       System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +114
       System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +421
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +133
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +494
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
       System.Data.SqlClient.SqlConnection.Open() +111
       System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
       System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
       System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
       System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
       System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
       System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83
       System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
       System.Web.UI.WebControls.Login.AttemptLogin() +105
       System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
       System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
    

    Web.config file:

     

    <?xml version="1.0"?>
    <!--

    Note: As an alternative to hand editing this file you can use the

    web admin tool to configure settings for your application. Use

    the Website->Asp.Net Configuration option in Visual Studio.

    A full list of settings and comments can be found in

    machine.config.comments usually located in

    \Windows\Microsoft.Net\Framework\v2.x\Config

    -->

    <
    configuration>

    <configSections>

    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

    <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>

    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />

    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

    </sectionGroup>

    </sectionGroup>

    </sectionGroup></configSections>

     

    <appSettings/>

    <connectionStrings/><system.web>

     

    <
    customErrors mode="Off"/>

     

     

    <!--

    Set compilation debug="true" to insert debugging

    symbols into the compiled page. Because this

    affects performance, set this value to true only

    during development.

    Visual Basic options:

    Set strict="true" to disallow all data type conversions

    where data loss can occur.

    Set explicit="true" to force declaration of all variables.

    -->

    <roleManager enabled="true" />

    <compilation debug="true" strict="true" explicit="true">

    <assemblies>

    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    </assemblies>

    </compilation>

    <pages>

    <namespaces>

    <clear />

    <add namespace="System" />

    <add namespace="System.Collections" />

    <add namespace="System.Collections.Generic" />

    <add namespace="System.Collections.Specialized" />

    <add namespace="System.Configuration" />

    <add namespace="System.Text" />

    <add namespace="System.Text.RegularExpressions" />

    <add namespace="System.Linq" />

    <add namespace="System.Xml.Linq" />

    <add namespace="System.Web" />

    <add namespace="System.Web.Caching" />

    <add namespace="System.Web.SessionState" />

    <add namespace="System.Web.Security" />

    <add namespace="System.Web.Profile" />

    <add namespace="System.Web.UI" />

    <add namespace="System.Web.UI.WebControls" />

    <add namespace="System.Web.UI.WebControls.WebParts" />

    <add namespace="System.Web.UI.HtmlControls" />

    </namespaces>

    <controls>

    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    </controls>

    </pages>

    <!--

    The <authentication> section enables configuration

    of the security authentication mode used by

    ASP.NET to identify an incoming user.

    -->

    <authentication mode="Forms" />

    <!--

    The <customErrors> section enables configuration

    of what to do if/when an unhandled error occurs

    during the execution of a request. Specifically,

    it enables developers to configure html error pages

    to be displayed in place of a error stack trace.

    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

    <error statusCode="403" redirect="NoAccess.htm" />

    <error statusCode="404" redirect="FileNotFound.htm" />

    </customErrors>

    -->

     

    <
    httpHandlers>

    <remove verb="*" path="*.asmx"/>

    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>

    </httpHandlers>

    <httpModules>

    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    </httpModules>

     

    </
    system.web>

    <system.codedom>

    <compilers>

    <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"

    type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

    <providerOption name="CompilerVersion" value="v3.5"/>

    <providerOption name="WarnAsError" value="false"/>

    </compiler>

    <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"

    type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

    <providerOption name="CompilerVersion" value="v3.5"/>

    <providerOption name="OptionInfer" value="true"/>

    <providerOption name="WarnAsError" value="false"/>

    </compiler>

    </compilers>

    </system.codedom><!--

    The system.webServer section is required for running ASP.NET AJAX under Internet

    Information Services 7.0. It is not necessary for previous version of IIS.

    -->

    <system.webServer>

    <validation validateIntegratedModeConfiguration="false"/>

    <modules>

    <remove name="ScriptModule" />

    <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    </modules>

    <handlers>

    <remove name="WebServiceHandlerFactory-Integrated"/>

    <remove name="ScriptHandlerFactory" />

    <remove name="ScriptHandlerFactoryAppServices" />

    <remove name="ScriptResource" />

    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"

    type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"

    type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

    </handlers></system.webServer>

     

    <runtime>

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

    <dependentAssembly>

    <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>

    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

    </dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>

    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

    </dependentAssembly>

    </assemblyBinding>

    </runtime>

    <system.net>

    <mailSettings>

    <smtp from="captain@newpaltzrescue.org">

    <network defaultCredentials="true" host="mail.newpaltzrescue.org"

    password="" userName="" />

    </smtp>

    </mailSettings>

    </system.net>

    </configuration>

     

    Thank you for your help

    JH 


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 <!-- [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) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) at System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) at System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) at System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) at System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) at System.Web.UI.WebControls.Login.AttemptLogin() at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.login_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->

    Tuesday, July 8, 2008 12:24 PM
  • User-1705717250 posted

    You have no connectionstring to your sql server or any settings for the membership provider.

    This show you the setting you need to add http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_-property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx

    Hope it helps

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
    Tuesday, July 8, 2008 12:52 PM
  • User-2008565010 posted

    add something like this to you web.config ...

    modify the membership provider as per your settings if you are not using the default one ...

    <connectionStrings>

    <remove name="LocalSqlServer"/>

    <add name="LocalSqlServer" connectionString="yourconnectionstring"/>

    </connectionStrings>

    <system.web>

    <membership defaultProvider="AspNetSqlMembershipProvider">

    <providers> <clear/>

    <add name="AspNetSqlMembershipProvider"

    type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    connectionStringName="LocalSqlServer"

    enablePasswordRetrieval="false"

    enablePasswordReset="true"

    requiresQuestionAndAnswer="true"

    requiresUniqueEmail="false"

    passwordFormat="Hashed"

    maxInvalidPasswordAttempts="5"

    minRequiredPasswordLength="7"

    minRequiredNonalphanumericCharacters="1"

    passwordAttemptWindow="10"

    passwordStrengthRegularExpression=""

    applicationName="/"/> </providers>

    </membership>

    Tuesday, July 8, 2008 12:58 PM
  • User1812608968 posted

    Hello all and thank you all for your assistance.

    The endless strings of code and ASP.NET language.  Most I cannot comprehend at this time.

    I think I started this thread by saying that I am a total novice at ASP.NET. Through web based educational instructional videos I was obviously made to believe that I as a novice  could create a password protected web site.

    Big time wrong.

     Learned MS FrontPage with the ability to protect web pages by login and passwords.

    Have yet to see the “novice” application of his great ASP.NET.

    It may truly be unobtainable to understand and to be used by someone like me. Fairly educated as an Architect with a masters in Civil Engineering.

    Old enough to remember “punch cards” as “memory” media for simple machine language in the early eighties.

    Have found a great love in the cerebrum exercise involving  new challenges. Would like to have some understanding of the ASP.NET  before I pass on.

    So far I have been given links to other sources that contains 50+ pages of information that is certainly written by extraordinary ASP.NET  educated people.

    Again followed steps by multiple videos , signed on to paid web based services  and still is unable to create a simple login website .

    Listened to all you fine people out there willing to hear my questions.

    Still not able to create a simple one page protected web site.

    You are truly a great group of very educated people and I do appreciate all of your work.

    I am not sure where I would turn from here and I am sure wasting all of your time with my mediocre troubles that certainly will not benefit anyone.

    Thank you all and good luck.

    JH

    Ending thread. With no resolution.

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>

    Have no idea what this is….\

    connectionStrings> <o:p></o:p><remove name="LocalSqlServer"/><o:p></o:p><add name="LocalSqlServer" connectionString="yourconnectionstring"/> <o:p></o:p></connectionStrings><o:p></o:p><system.web> <o:p></o:p><compilation debug="true"/><o:p></o:p><authentication mode="Forms"/> <o:p></o:p><membership defaultProvider="AspNetSqlMembershipProvider"><o:p></o:p><providers> <o:p></o:p><clear/><o:p></o:p><add name="AspNetSqlMembershipProvider"<o:p></o:p>type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"<o:p></o:p>connectionStringName="LocalSqlServer"<o:p></o:p>enablePasswordRetrieval="false"<o:p></o:p>enablePasswordReset="true"<o:p></o:p>requiresQuestionAndAnswer="true"<o:p></o:p>requiresUniqueEmail="false"<o:p></o:p>passwordFormat="Hashed"<o:p></o:p>maxInvalidPasswordAttempts="5"<o:p></o:p>minRequiredPasswordLength="7"<o:p></o:p>minRequiredNonalphanumericCharacters="1"<o:p></o:p>passwordAttemptWindow="10"<o:p></o:p>passwordStrengthRegularExpression=""<o:p></o:p>applicationName="/"/> <o:p></o:p>

    </providers>

     

    Tuesday, July 8, 2008 8:39 PM
  • User863018716 posted

     If you use a login control of .net then i will suggest  you . Do a connectivity with database with aspnetmembership provider.

    That will connect your login control with database directly and you can actually connect your all module with database with

    aspnetmembership provider.

     

    But you have to design database according to that. Try this ,this will work.

    -----------------------------------------------------------------------------------------------------------

     If it helps you mark it as answer

     

    Wednesday, July 9, 2008 6:23 AM
  • User672560521 posted

    Great Post.  I've been around awhile but just now going through this.  What a learning experience.  At Item3, instead of new database, I chose "Attach...".  That brings you to a "MDF" form to fill out selecting the MDF file you want.  It will then attach the mdf file allong with all its other files which allows you to back it up .  You can now choose to back that file up.  Then restore it on the MSSQL you created on the Host site using "My Little Backup" software.

    That's where Im at now.  My problem is now, I need to change the Config file and I am having difficult.  I'm going to use your example as it makes sense to me.  I was concerned about the now defunct aspnetdb.mdf file that sits in the App_Data folder.  You solved that for me, by just deleting it. ( I hope). 

    Thanks again....  Chet Force

     

    Tuesday, December 8, 2009 10:21 PM
  • User672560521 posted

    I'm sorry but I originally posted at the wrong place.  I think this is a real important discription given which is hard to come by at times.

    Great Post.  I've been around awhile but just now going through this.  What a learning experience.  At Item3, instead of new database, I chose "Attach...".  That brings you to a "MDF" form to fill out selecting the MDF file you want.  It will then attach the mdf file allong with all its other files which allows you to back it up .  You can now choose to back that file up.  Then restore it on the MSSQL you created on the Host site using "My Little Backup" software.

    That's where Im at now.  My problem is now, I need to change the Config file and I am having difficult.  I'm going to use your example as it makes sense to me.  I was concerned about the now defunct aspnetdb.mdf file that sits in the App_Data folder.  You solved that for me, by just deleting it. ( I hope). 

    Thanks again....  Chet Force

    Wednesday, December 9, 2009 3:32 PM
  • User672560521 posted

    I'm sorry but I originally posted at the wrong place.  I think this is a real important discription given which is hard to come by at times.

    Great Post.  I've been around awhile but just now going through this.  What a learning experience.  At Item3, instead of new database, I chose "Attach...".  That brings you to a "MDF" form to fill out selecting the MDF file you want.  It will then attach the mdf file allong with all its other files which allows you to back it up .  You can now choose to back that file up.  Then restore it on the MSSQL you created on the Host site using "My Little Backup" software.

    That's where Im at now.  My problem is now, I need to change the Config file and I am having difficult.  I'm going to use your example as it makes sense to me.  I was concerned about the now defunct aspnetdb.mdf file that sits in the App_Data folder.  You solved that for me, by just deleting it. ( I hope). 

    Thanks again....  Chet Force

    Wednesday, December 9, 2009 3:34 PM
  • User-379627975 posted

    Sometimes these website hosting or MySQL related problems can be very complicated. A possible solution can be found at http://get-website-hosting.com

    Tuesday, December 22, 2009 8:29 AM
  • User938921855 posted

    I agree with you :) we need more useful info there.thanks

    Wednesday, February 25, 2015 2:54 PM