Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Aspx Login and Sql Server Problem - Help Me :(

Aspx Login and Sql Server Problem - Help Me :(

Scheduled Pinned Locked Moved ASP.NET
helpasp-netdatabasecsharpsql-server
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    De_Novice
    wrote on last edited by
    #1

    I have a weird problem:- I have a two databases(A and B). Database A is used by the company's site and everything works fine. I created database B that uses the same user as Database A. I have created a base login site ( site B) using SQL membership provider in asp.net2.0 and this site connects to Database B, everything works fine locally but when I publish this site and upload it I cannot get the user log in. 1) I tired testing with the forgot password and I get the error "We were unable to access your information. Please try again. ". So I thought it was the web confog problem, to rule it out I changed the connection in siteB's web config to point to database A and it works fine. If I change the conection to dabase B it doesnt work. 2) I have added the application name setting too in the webconfig Here is the web config:-

    <connectionStrings>
    <add name="dbconnection" connectionString="Data Source=SQLOLEDB.1;Data Source=.;Initial Catalog=DatabaseB;User ID=test;Password=test123"/>

    			<remove name="LocalSqlServer"/>
    	<add name="LocalSqlServer" connectionString="Data Source=SQLOLEDB.1;Data Source=.;Initial Catalog=DatabaseB;User ID=test;Password=test123"/>
    </connectionStrings>
    <system.web>
    	<roleManager enabled="true">
    		<providers>
    			<add name="SqlRoleManager"
    				 type="System.Web.Security.SqlRoleProvider"
    				 connectionStringName="LocalSqlServer"
    				 applicationName="/SiteB" />
    		</providers>
    	</roleManager>
    
    <connectionStrings>
    

    What am I doing wrong? Is there some permission that is not set in the new database. Its a basic SQL Server 2005 database and I used the aspnet sql tool to create the tables for the sql server membership. Please help. I am stuck on this for over 72 hours.

    W S 2 Replies Last reply
    0
    • D De_Novice

      I have a weird problem:- I have a two databases(A and B). Database A is used by the company's site and everything works fine. I created database B that uses the same user as Database A. I have created a base login site ( site B) using SQL membership provider in asp.net2.0 and this site connects to Database B, everything works fine locally but when I publish this site and upload it I cannot get the user log in. 1) I tired testing with the forgot password and I get the error "We were unable to access your information. Please try again. ". So I thought it was the web confog problem, to rule it out I changed the connection in siteB's web config to point to database A and it works fine. If I change the conection to dabase B it doesnt work. 2) I have added the application name setting too in the webconfig Here is the web config:-

      <connectionStrings>
      <add name="dbconnection" connectionString="Data Source=SQLOLEDB.1;Data Source=.;Initial Catalog=DatabaseB;User ID=test;Password=test123"/>

      			<remove name="LocalSqlServer"/>
      	<add name="LocalSqlServer" connectionString="Data Source=SQLOLEDB.1;Data Source=.;Initial Catalog=DatabaseB;User ID=test;Password=test123"/>
      </connectionStrings>
      <system.web>
      	<roleManager enabled="true">
      		<providers>
      			<add name="SqlRoleManager"
      				 type="System.Web.Security.SqlRoleProvider"
      				 connectionStringName="LocalSqlServer"
      				 applicationName="/SiteB" />
      		</providers>
      	</roleManager>
      
      <connectionStrings>
      

      What am I doing wrong? Is there some permission that is not set in the new database. Its a basic SQL Server 2005 database and I used the aspnet sql tool to create the tables for the sql server membership. Please help. I am stuck on this for over 72 hours.

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      One possibility is that the account is locked if you have tried to log in with wrong password for several times. Using Management Studio, open the login properties and see if it's locked (and of course if it is, unlock it :)).

      The need to optimize rises from a bad design.My articles[^]

      1 Reply Last reply
      0
      • D De_Novice

        I have a weird problem:- I have a two databases(A and B). Database A is used by the company's site and everything works fine. I created database B that uses the same user as Database A. I have created a base login site ( site B) using SQL membership provider in asp.net2.0 and this site connects to Database B, everything works fine locally but when I publish this site and upload it I cannot get the user log in. 1) I tired testing with the forgot password and I get the error "We were unable to access your information. Please try again. ". So I thought it was the web confog problem, to rule it out I changed the connection in siteB's web config to point to database A and it works fine. If I change the conection to dabase B it doesnt work. 2) I have added the application name setting too in the webconfig Here is the web config:-

        <connectionStrings>
        <add name="dbconnection" connectionString="Data Source=SQLOLEDB.1;Data Source=.;Initial Catalog=DatabaseB;User ID=test;Password=test123"/>

        			<remove name="LocalSqlServer"/>
        	<add name="LocalSqlServer" connectionString="Data Source=SQLOLEDB.1;Data Source=.;Initial Catalog=DatabaseB;User ID=test;Password=test123"/>
        </connectionStrings>
        <system.web>
        	<roleManager enabled="true">
        		<providers>
        			<add name="SqlRoleManager"
        				 type="System.Web.Security.SqlRoleProvider"
        				 connectionStringName="LocalSqlServer"
        				 applicationName="/SiteB" />
        		</providers>
        	</roleManager>
        
        <connectionStrings>
        

        What am I doing wrong? Is there some permission that is not set in the new database. Its a basic SQL Server 2005 database and I used the aspnet sql tool to create the tables for the sql server membership. Please help. I am stuck on this for over 72 hours.

        S Offline
        S Offline
        SamRST
        wrote on last edited by
        #3

        hi, So with Database A you can connect and with DB B you cant. i hope its the problem with the permission of user to connect with DB B. Check the user permission for that DB. Go to managemt studio, take the Server logins, pick the user id, then check the permissions of that user to Database B. make sure, the user checked as db_owner. Good luck.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups