473,725 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

membership not working when using IIS

Hi all

I'm developing a website with Visual web developer in C#. Everything
works fine when testing using ctrl+F5. Also, IIS runs ASP.NET pages
without any problems. The problem I'm facing now is that standard
ASP.NET membership is not working when not using the visual studio
testing webserver. I just get the message that logging in has failed.

Any suggestions?

Thnx!

Jan

Aug 3 '06 #1
3 2309
Make sure that you have added membership services to your database or you
have configured the membershipt services correctly in your web.config.
it is working fine with me.

if you findout what is the problem, please share it with us
regards
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications

Aug 3 '06 #2
I get this error:

System.Data.Sql Client.SqlExcep tion: Cannot open user default database.
Login failed.

Aug 3 '06 #3
Then as I told you, check your configuration for your membership provider.
1)first if you are using your own database, you have to install membership
services on your database using aspnet_resql tool

2)you have to configure your connection string for your membership database
if it another database, or use your owen database connection string
confguration in web.config

3)Example:
<connectionStri ngs>
<remove name="LocalSqlS erver" />
<add name="Connectio nStringName"
connectionStrin g="SERVER=YourS erver;DATABASE= YourDatabase;UI D=YourUserID;PW D=YourPassword" />
</connectionStrin gs>

<system.web>
.....
<membership>
<providers>
<remove name="AspNetSql MembershipProvi der" />
<add connectionStrin gName="Connecti onStringName"
enablePasswordR etrieval="false "
enablePasswordR eset="true" requiresQuestio nAndAnswer="tru e"
applicationName ="/"
requiresUniqueE mail="false" passwordFormat= "Hashed"
maxInvalidPassw ordAttempts="5"
minRequiredPass wordLength="7" minRequiredNona lphanumericChar acters="0"
passwordAttempt Window="10" passwordStrengt hRegularExpress ion=""
name="AspNetSql MembershipProvi der"
type="System.We b.Security.SqlM embershipProvid er, System.Web, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a" />
</providers>
</membership>
.....
</system.web>

be sure to change YourXXXX in the example.

Regards
Aug 3 '06 #4

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

Similar topics

2
3559
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the custom membership provider fine and removes the security question/answer fields as designated in the custom provider. The problem is that when I try to create a new user in the create user wizard by entering the info and pressing the 'create...
9
2174
by: Paul Keegstra | last post by:
Hi, I am currently working on an asp.net 2.0 web site that is a replacement of a classic asp web site. The current web site uses a Commerce Server 2002 database for storing user information. It does not currently use any of the Commerce Server 2002 functionality with the exception of the user authentication features. I have written my replacement application to use a custom login form and custom connection string so that I can use...
0
1473
by: Andy | last post by:
Hi, I've created a .net 2.0 web app that uses Sql Server 2005 express as its backend. I used microsoft's database tool to create all of the membership, roles, etc. need for my website. Everything is working fine except when I try to delete a user using the Membership.DeleteUser(username as String) function. The error I get is: The DELETE statement conflicted with the REFERENCE constraint "FK__aspnet_Me__UserI__173876EA". While I understand...
5
2040
by: Vishal Gupta | last post by:
Hi This is Vishal this side.I have been trying to create a new sample website using the new Membership Provider Class. Now when I try to a create a new website and then hit on the Website Administrator Tool and then hit on Security I get this error "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
2
1745
by: Michael | last post by:
Hello, I am using the Membership control in my asp.net application. When a person registers, I set the account to not active. CreateUserWizard1.Enabled = false; Then I send them an email with a link for them to click on to activate their account. Got it all working, but do not know how to programaticly activate the
3
4159
by: jason | last post by:
I've been playing around with new (for 2.0) membershp functionality. I was able to build a simple login form that secures a directory on a project I built locally on my development desktop. However, when I attempt to follow the same steps on the remote test server (a website I access via filesystem security accross my lan ).. I get the following when I attempt to select the security tab from the administer selection of the login...
4
4733
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= | last post by:
I have been having some trouble with implementing a custom Membership Provider. We have a custom data store and business logic that pulls user information. I need some level of functionality above and beyond what the prodiver currently allows. I need the ability to access a user id and the user's permission id. With Forms authentication in 1.1, I would just create a custom identiy and principal and store the information in the identity....
3
1936
by: GaryDean | last post by:
I have serveral applications now running that are using the MembershipProvider classes and they are each using their own security tables in SQL Server 2005 instead of the express databases - they are all work well. Now we have a need to have many different asp.net websites and web services use a single security database because they all share the same user and administrator community. It doesn't seem there will be a problem with all of...
8
3773
by: Nick | last post by:
Hi there, Membership.GetNumberOfUsersOnline() works great the first time, then jumps up to the number of users registered in the system. I have tried enumerating through each user individually and checking IsOnline which done likewise, first result was 4, then 22 every time after that and it's only be debugging locally using VS. Either I'm doing something seriously wrong or this function is a
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
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
9257
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...
1
9179
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6702
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
6011
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
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
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.