473,785 Members | 2,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't quite get the Membership/Roles configured to work on SQL 2005

Hello,

I need some help in getting my simple web app to work. I can't seem to get
the configuration of the Membership/Roles working by pointing my website to
a SQL 2005 database as opposed to the default App_Data\ASPNET DB.MDF file.

I've got two boxes, one with XP & VS2005 and the other is windows 2003 with
IIS 6.0, ASP.NET 2.0 & SQL Server 2005 (Not SQL 2005 Express).

My app simply has one user called 'administrator' assigned with the role
called 'Administrator' . This user can logon, and some of the pages show the
administrator-specific content. Otherwise, its just anonymous view. I've
used the Web Site Administration Tool to configure this.

I can get the administrator to login (Using the ASP.NET login control), but
it doesn't show the Administrator-specific content.
Here is a typical web page:

<asp:LoginVie w ID="LoginViewMa in" runat="server">
<RoleGroups>
<asp:RoleGrou p Roles="Administ rator">
<ContentTemplat e>
... Administrator-specific content goes here ...
</ContentTemplate >
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView>

And when I browse to a page like this, the local PC whirrs away, and it
creates the App_Data\ASPNET DB.MDF file. It shouldn't do this - I think it's
not pointing to the server correctly??

I've run the aspnet_sqlreg file which created the ASP.NET-specific tables in
my database, and I put the related connection string in the web.config. I
know it connects, because anonymous users can see content comming from my
content tables in this database.

My web.config has:

<authorizatio n>
<allow roles="Administ rator" />
<allow users="?" />
</authorization>

<roleManager enabled="true"/>

<authenticati on mode="Forms" />

<membership>
<providers>
<clear/>
<add name="AspNetSql MembershipProvi der"
connectionStrin gName="MyConnec tionString"
type="System.We b.Security.SqlM embershipProvid er, System.Web,
Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a" />
</providers>
</membership>

And it all seems to be OK.

Can anyone suggest why it creates the App_Data\ASPNET DB.MDF during execution
when it should authorize against the SQL2005 database?

Regards,
Jack.


Aug 13 '06 #1
0 1008

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1633
by: Dan Sikorsky | last post by:
Can I use SQLServer 2000 with ASP.NET 2.0 instead of SQLServer 2005, and use the .Net 2.0 Membership functionality? I've setup my Login page, controls, etc., and now it's time to use the Web Site Administration Tool (WAT) but it won't sense my SQLServer 2000 database.
6
1899
by: Scatir | last post by:
Hi, I have a membership problem I couldn't resolve. I have set up membership as most of tutorial instructed, and I am able to log on, but cannot stay log on for some reason. ex: when I log on, the log in become log on, but when I access the protected page, it still prompt me for log in. Please help! I am using SQL to store the membership, the code in web.config is as follow, <roleManager enabled="true"/>
1
1213
by: John | last post by:
Hi I have looked in help but am not clear how to do the following in vb.net code. 1. Check if a user belongs to a specific role. 2. Change user's password. Is it possible to do it without knowing the old/existing password?
5
1666
by: JP.Gantlin | last post by:
I want to have a login page where the new user self-registers, giving some simple info like Real Estate Agent #. Do I need to used the membershiop/roles thing, or profiles? Are profiles part of the membership thing, or how are they tied together? Thanks
5
2909
by: Mahernoz | last post by:
Hi Everyone! I have a problem here. I have used the latest asp.net membership & profiles functionality in my site. I have 2 roles admin and user. I also have a user named admin. Now, my website is running perfectly, but i want to deploy it.
2
5905
by: Brandon Holliday | last post by:
Hello, I have a problem that I need some help on. I am creating a website that utilizes the builtin membership functionality in Asp.net 2.0. By default, the "AspNetSqlProvider" is used and the membership data is stored in "AspNetDB.mdf". However, instead of using this mdf file, I would like to store the membership data in Sql Server, using the "SqlMembershipProvider". I have already run the "regsql.exe" file, but I'm not sure of...
4
8237
by: alexandis | last post by:
There are tons of articles about custom role and provider membership, but they just tear me apart and confuse :( The situation is following: I use DB2, so I wrote custom role + membership providers. Membership provider seems to work. I use forms authentication, so as articles say, I need to do some magic to be able to get roles for current user, because microsoft mechanism works only for windows authentication...
1
3015
by: =?Utf-8?B?ZVByaW50?= | last post by:
Asp.Net v2.0 I have created a web application and I am using it from a single website and database. The web application has different ‘portals’ – each independent and I am using the Membership & Roles ApplicationName to separate out my different groups of users within the membership database. I had been having problems with ‘random’ bugs - as though my Membership database was 'sharing' information between users and...
4
1039
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i just ran aspnet_regsql on my database server. now, will all my applications use this single database or do i need to run aspnet_regsql for each new application? thanks, rodchar
0
10319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7496
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.