<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : ASP.NET Security Integration</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : ASP.NET Security Integration</description>
  <pubDate>Tue, 28 Apr 2026 21:39:29 -700</pubDate>
  <lastBuildDate>Mon, 26 Oct 2009 11:30:22 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1529</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>ASP.NET Security Integration : Currently, the default ASPAuthenticatingLoginManager...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1529&amp;PID=5679#5679</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1529<br /><strong>Posted:</strong> 26-Oct-2009 at 11:30am<br /><br /><P>Currently, the default ASPAuthenticatingLoginManager used by DevForce does not throw a LoginException when the user/password is invalid, instead the returned UserBase.IsAuthenticated property is&nbsp;false.&nbsp; This was mostly done for legacy purposes and we are looking at modifying this behavior.&nbsp; For right now, you can easily work around this by creating a custom LoginManager which extends the DevForce ASPAuthenticatingLoginManager and overriding&nbsp; a single method.&nbsp;&nbsp;Here's a complete sample:</P><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>using System;<BR>using System.Web.Security;<BR>using IdeaBlade.EntityModel;</DIV><DIV>namespace Sample {</DIV><DIV>&nbsp; /// &lt;summary&gt;<BR>&nbsp; /// A custom LoginManager extending the DevForce AspAuthenticatingLoginManager.<BR>&nbsp; /// The DevForce implementation currently allows non-authenticated users to be logged in,<BR>&nbsp; /// so this class overrides user validation and throws a LoginException<BR>&nbsp; /// when the user is not authenticated.<BR>&nbsp; /// &lt;/summary&gt;<BR>&nbsp; public class LoginManager : IdeaBlade.EntityModel.Web.AspAuthenticatingLoginManager {</DIV><DIV>&nbsp;&nbsp;&nbsp; protected override bool ValidateUserCore(ILoginCredential credential) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Base class calls Membership.ValidateUser, and returns t/f based on whether<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // the user is authenticated.&nbsp; If not authenticated, we don't actually know why.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // The base class does not throw a LoginException if the user is not authenticated,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // so we do here.</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool isAuthenticated = base.ValidateUserCore(credential);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (isAuthenticated) return isAuthenticated;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var members = Membership.FindUsersByName(credential.UserName);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (members.Count == 0) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new LoginException(LoginExceptionType.InvalidUserName, "Invalid username");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new LoginException(LoginExceptionType.InvalidPassword, "Invalid password");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;&nbsp;&nbsp; }<BR>&nbsp; }</DIV><DIV>}</DIV><DIV></pre></td></tr></table></DIV><DIV>Put the class in a server-side assembly, and add the name of this assembly to the top-level (non-key specific) &lt;probeAssemblyNames&gt; in the config file.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 26 Oct 2009 11:30:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1529&amp;PID=5679#5679</guid>
  </item> 
  <item>
   <title>ASP.NET Security Integration : I am attempting to build a simple...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1529&amp;PID=5675#5675</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=587" rel="nofollow">cjohnson84</a><br /><strong>Subject:</strong> 1529<br /><strong>Posted:</strong> 23-Oct-2009 at 11:12am<br /><br />I am attempting to build a simple Silverlight application that integrates DevForce with ASP.NET Security.&nbsp; I have a simple login page with two text boxes and a "Login" button.&nbsp; I want to authenticate the username and password entered by the user against my SQL Server database.&nbsp; I have run aspnet_regsql.exe against the database and used the ASP.NET Configuration website to create a couple users and roles in the database.<DIV>&nbsp;</DIV><DIV>In separate assemblies I have created an entity framework model of my database (excluding the asp.net authentication table) and the dev force model of my database using the DevForce object mapper.&nbsp; I have modified the web.config of the web application by setting the authentication mode to "Forms" and I have set aspNetCompatibilityEnabled = true.&nbsp; I have also added the connect string to my database:</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>&lt;</FONT></FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>connectionStrings</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>&gt;</DIV><P>&lt;</FONT></FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>remove</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2> </FONT></FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>name</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>=</FONT></FONT><FONT size=2>"</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>LocalSqlServer</FONT></FONT><FONT size=2>"</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>/&gt;</P><P>&lt;</FONT></FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>add</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2> </FONT></FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>name</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>=</FONT></FONT><FONT size=2>"</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>LocalSqlServer</FONT></FONT><FONT size=2>"</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2> </FONT></FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>connectionString</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>=</FONT></FONT><FONT size=2>"</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Data Source=UDSSRV1\UDSLAB1;Initial Catalog=DevForceTest;Persist Security Info=True;User ID=sa;Password=sa</FONT></FONT><FONT size=2>"</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2> </FONT></FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>providerName</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>=</FONT></FONT><FONT size=2>"</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>System.Data.SqlClient</FONT></FONT><FONT size=2>"</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>/&gt;</P><P>&lt;/</FONT></FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>connectionStrings&gt;</P><DIV></DIV><DIV><FONT color=#000000>Is there anything I'm missing here?&nbsp; I run my application and I am able to "login" regardless of what i enter in the username and password textboxes.&nbsp; I get no errors.&nbsp; What do I need to do to at least see my login fail when I run my application in the development environment?</FONT></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Fri, 23 Oct 2009 11:12:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1529&amp;PID=5675#5675</guid>
  </item> 
 </channel>
</rss>