Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Problem when Multiple UserRole in my asp.net application
anilp
#1 Posted : Tuesday, October 26, 2010 5:13:16 AM(UTC)
Groups: Member
Joined: 10/26/2010(UTC)
Posts: 4
Location: Jaipur

My application works fine on my local and when i logged with the administrator role i am logged in. but when i try to login whit another role i am unable to login. Where is the problem
I already do some testing in the webconfig file.
here is my system.web text.
Code:

<system.web>
<sessionState timeout="2000">
</sessionState>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</buildProviders>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms"/>
<!--<authentication mode="Forms">
<forms defaultUrl="~/index.aspx" loginUrl="~/login.aspx" timeout="50000000">
</forms>
</authentication>-->

<authorization>
<allow users="*" />
</authorization>
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="120">
<providers>
<clear/>
<add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="DefaultConnectionString" applicationName="MyApplication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" maxInvalidPasswordAttempts="50" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" passwordFormat="Hashed"/>
</providers>
</membership>

<roleManager enabled="true" defaultProvider="SqlRoleManager">
<providers>
<add connectionStringName="DefaultConnectionString" applicationName="MyApplication" name="SqlRoleManager" type="System.Web.Security.SqlRoleProvider"/>
</providers>
</roleManager>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages theme="Blue">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
<httpHandlers>
<remove path="*.asmx" verb="*" />
<add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
validate="false" />
<add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
validate="false" />
<add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
validate="false" />

</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
Ultidev Team
#2 Posted : Tuesday, October 26, 2010 7:04:48 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi!

Do you run your application only with UltiDev Cassini, or also with IIS and/or Visual Studio development server? Could you please try your application with either IIS or VS dev server, just to rule out your application as a source of the problem. Also what kind of message do you get when you are unable to log in?

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
anilp
#3 Posted : Tuesday, October 26, 2010 7:22:46 AM(UTC)
Groups: Member
Joined: 10/26/2010(UTC)
Posts: 4
Location: Jaipur

I am using Cassini and i am getting error "Your login attempt was not successful. Please try again." when in click on login button..
Ultidev Team
#4 Posted : Tuesday, October 26, 2010 8:47:49 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi!

What does make you suspect that the problem is with the web server, rather than the application?

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
anilp
#5 Posted : Tuesday, October 26, 2010 9:00:35 AM(UTC)
Groups: Member
Joined: 10/26/2010(UTC)
Posts: 4
Location: Jaipur

It suspect error from the Cassini. because when i run this application on Visual Studio it works fine. Where is the problem please tell me. In my application User Role is dynamically created by administrator.
Ultidev Team
#6 Posted : Tuesday, October 26, 2010 9:43:00 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Forms authentication is done by ASP.NET and is completely web server-independent. We strongly suspect that something is going on with the application. To help you troubleshoot, could you please confirm that when running in Visual Studio web server and UltiDev Cassini *on the same machine with the same codebase and test data* you get different results?

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
anilp
#7 Posted : Wednesday, October 27, 2010 12:51:28 AM(UTC)
Groups: Member
Joined: 10/26/2010(UTC)
Posts: 4
Location: Jaipur

Thanks for the reply.
When in run this application its work fine. not getting any error but while hosting this application on Cassini unable to login with the other Role user. Only admin can login with this account.
Ultidev Team
#8 Posted : Wednesday, October 27, 2010 5:59:14 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi,

Quote:
To help you troubleshoot, could you please confirm that when running in Visual Studio web server and UltiDev Cassini *on the same machine with the same codebase and test data* you get different results?


Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.