Thanks you. It is really useful.
I want to save data ASPNETDB in SqlServer.
I attach this data to sqlserver and add connectionstring in webconfig
Then I create some user, I open table aspnet_Users but I can't see user that I created .
Can you tell me the Why?
I'm using asp membership authentication, few days i created it it was working fine, lately i cannot log in anymore i recieve the invalid password error even if the password is correct. But other operations work's fine like creating new user and password recovery. Nothing is a problem on the database i check columns no account IsLockedOut then true.
I have this code on web config file which i realise is the one not allowing users to log in
<add name="connString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"/>
<credentials passwordFormat="Clear" />
<add connectionStringName="connString1" applicationName="Application1"
minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" name="Provider1" type="System.Web.Security.SqlMembershipProvider" />
Any help will be highly appreciated
When I run the website on my Pc, works fine, but when the website is uploaded in a remote server I get this error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I find this very interesting, but how can someone deploy the membership information database with the setup.msi. I have try to manual add the App_Data, but not working. My application was confused to identify the database when running IIS 6.0 , since I also have connectionstring to ODBC in my web config file.What should I do to accomplish this.
Also I want to know if it is possible to use web site administrative tool in window 3003 server or other OS without installing VS 2005.
hello sir, I have one problem in PasswordRecover. When I type user name and Questions...then submit .....this page can not display next page "your password has sent to you" . I also follow your project. all functions in login toolbox are working but only PasswordRecover. Would you help me!. I'am student. I need this for my project. thanks
Nice article. Good job. But one problem. This method works only with localhost. Try to publish the site and deploy the same on IIS. It doesn't work. The registered users get some error that Sign-in was not successful.
I have tried so many things with this. But to no good. Google says to modify the Web.config file. But no use(or I might be doing it wrong). Am working on a project which needs this login control. And my website is used by many people. I don't know how to solve it out. Please show me how to deploy the same on IIS so that it works fine. Urgent.
is it possible to use login controls without explicit login page. I want to display username/ password textbox on my default page itself.
Can I still use this control?
When I add following
i get login error. But when I use this code, i'm automatically navigated to login.aspx. Is there any way to change navigateurl?
I'm using oracle db for my website. In that I already have user table. How to synchronise access user table with oracle table. It has some extra not null columns. So how to use create user wizard in that case?
Finally, the web administration tool is worked successfully and I played around, created some users and rules.
I am looking for a way to assign a permission for some page in some folder to a specific registered user.
I mean, I wanna add 5 pages into some folder like "MEMBERS" mentioned in the article, and then I wanna assign one user for each page in this folder, I don't want all registered users to see all pages in the members folder, each user should see his page.
It's not possible, in this article Mr.Shreekuma shows that how to protect pages for particular group only. means when you create a access rule, that rule applies for entire folder but not for individual page.
1] say you've folder named MEMBERS and 2 pages in it such as page1 and page2.
2] if you have create a new access rule for MEMBERS folder; it applies for both page1 and page2. because the rule is created for FOLDER not for individual pages in that folder.
so, finally you can't set individual rules for particular pages in same folder. instead, you can create different folders for different pages
this is not useful when you wanna build an application or website for some institution where there are many users and pages.
it will be confused if you have many folders to have many access rules.
Is there any other idea to have many access rules in the same folder?
Please dont bother about the reason why this functionality is required by a person. Question is, can we configure our application this way. I mean, can we allow/deny access to a particular page to a particular user.
I have been asked this question many a times in interviews
And still Im not sure this can be done or not.
I've followed the steps step by step, but when I go to Security Tab in the Web Site Administration Tool, a problem appear says:
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Unable to connect to SQL Server database.
and when I click on the button "Choose data source", a new screen appear having two options:
Select a single provider for all site management data
Select a different provider for each feature (advanced)
I selecte the first option (Select a single provider for all site management data), the a new screes having the provider name with Test option beside, the provider name is "AspNetSqlProvider", but when I click on Test link, a new screen having an error with the following text:
Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
I am not using SQL server/ Express, I am using the enterprise edition of SQL server 2005.
I think this article assumes that the SQL server is Express and may be this is the problem, but if this is problem, how can we change the connection string to point any sql server, note that the web.config file has the tags for connectionStrings but their is nothing in. no values for any data source or the DB name , I am confused how the application can figure out where to go.
Come on, Even i too followed the same steps step by step; and i got correct result from this article. All of that configuration was supposedly to have been built automatically..! Micro Soft saves
code for the developer is representing huge investment in knowing internal details
no need to set up SQL server on your local client. Apparently this was all
done by VS.Net 2005. So membership works with very little info in the
web.config when run from the client.
This is good article and work by Shree (Which is also available in MSDN Library) but I am also getting similar problem.
I am using SQL Server 2008. Kindly reply. I want to know the flow of the system of membership and users creation in Asp.Net.
I am having the exact same problem. I have SQL Server 2008 on my machine and somehow I have managed to get the login and create new user controls to work by defining the provider and the connections string in the web.config file. However, I can't get the web site configuration tool to work and when I tried the 'Roles" class to define roles and assign roles it blows a gasket saying it can't connect.
Life in the fast lane is only fun if you live in a country with no speed limits.
This is an outstanding article with lots to offer. How would you handle the case where the membership file is predefined in a SQL database but registration is required. In other words, new registrants must be in the database before they can register (they already know their MemberID)?
You first make a decision that how many roles you would like to manage in your web site, say for example you’ve 2 roles: ADMIN and Guest
Every time when guest user registered in your website through his/her e-mail id; you do followings:
• On the Website menu, click on ASP.NET Configuration.
• Select Security link that enables you to set up and edit users, roles, and access permissions for your site.
• Under users section; click on Manage users link
• Select ACTIVE check box that enables the particular user as an active member to your website. Otherwise uncheck the ACTIVE check box to deactivate particular user
Last Visit: 31-Dec-99 19:00 Last Update: 21-Apr-15 0:14