I created asp.net (VS2005 and NET2.0) application which access Oracle database. Following the Oracle Database 2 Day + .NET Developer’s Guide 11g I enabled my Web site for Authentication:
1. Created web user for application using Oracle Providers for ASP.NET to start the application with login page and allow user to access application if credentials are correct. Users are created with Web Site Administration Tool of VS2005 after I set to use Oracle ASP.NET providers.
Running application from Designer worked great, login, authentication..
We set web site with virtual directory on IIS6 of Server 2003 and we could not login. Each user login attempt failed with "Your login attempt was not successful. Please try again" message, similar as user did not have correct credentials.
Searching online about similar problem I found an article which describes requirement to have "applicationName" property. In this article (Always set the "applicationName" property when configuring ASP.NET2.0 Membership and other Providers) is noted that a membership is usually added in web.config without an “applicationName” attribute and this behavior does not let you login on remote server without error, just with message noted above.
Explanation is that asp.net without applicationName attribute calculates applicationName using vroot path of the web-server. The article says that you can see in aspnet_application table (I guess that table ora_aspnet_applications in OracleMembershipProvider coresponds to AspNetSqlProvider aspnet_application) that stores a unique applicationID for each applicationName and column applicationName (aspnet_application) is filled by as the calculated name of test machine that was used at the time.
I checked table that are part of OracleMembershipProvider and I found ApplicationID has value but applicationName was empty even if I created custom OracleProvided with applicationName set for my application in web config and created users using this provider.
As I still have the same problem to login from web site (IIS and Server2003) via Browser and from my pc it runs ok with default OracleProvider and with the custom OracleProvider with given applicationName attribute I need if somebody can give more light into these issues:
1. Does OracleMembershipProvider provider works in the same way as AspNetSqlMembershipProvider as it is explained in the above noted article?
2. If yes, what I am doing wrong and not have the applicationName column filled in neither case (when I use default OracleProvider with no provided applicationName and also in a case when I use custom OracleMemberShipProvider where I create applicationName)?
3. Column username of table ora_aspnet_memebrship is empty, but applicationID and userID are entered, is this expected behavior?
4. What does actually happen to these tables of OracleMemebrshipProvider (ORA_ASPNET_APPLICATIONS, ORA_ASPNET_MEMBERSHIP, and ORA_ASPNET_USERS) when you create user from Web Site Administration Tool and how they correlate to settings of the provider in web.config? I am using right now just authentication with no need for other features of the provider as role, profiles.
Or if you can give me detailed link where I can read and find answers on these questions I would appreciate.
Please check authentication mode="Forms" in your application config file.
When "passwordFormat"="Clear", the password should be stored in clear text.
You may query ORA_ASPNET_USERS and ORA_ASPNET_MEMBERSHIP to
check the password.
yesterday i decided to deploy Web site project from my Visual Studio environment to IIS 7 and guess what :) i found the described problem after hours of research and trying different things i got your threat. The clue about the application name worked for me(i put and the passwordFormat="Hashed" for the memvership provider). After that i succeed to login but i found another problem with the role provider. I have sitemap with security trimming enabled and it was not render right, cause the problem with the role provider. So in my web.config file i had:
Basically i aded 4 things and after that it worked:
1) added passwordFormat="Hashed" in SomeOracleMembershipProvider properties;
2) added applicationName="/SomeApp" in SomeOracleMembershipProvider properties;
3) Predifiend the roleManeger and added SomeOracleRoleProvider;
4) added applicationName="/SomeApp" in SomeOracleRoleProvider properties;
Thank you soooooo much you help me from the dead line,it works with me..
every thing now regarding the oracle providers with asp.net (sitemap ,role ,membership..) is working in both development and production in iis 7 is working now.
i followed exactly the same steps. the WAT recognizes oracleprovider but when i wanted add user through wizard or WAT i get error ....._create_user not declared
Do i need to do any configurations on Oracle?