﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Role Based Security  » Getting an error on login</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 13:47:08 GMT</lastBuildDate><ttl>20</ttl><item><title>Getting an error on login</title><link>http://forum.strataframe.net/FindPost4124.aspx</link><description>I just "upgraded" my app to use role based security.I think I did everything the Documentation asked however&amp;nbsp;I am getting the following error and need some help on where I might have gone wrong&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Shared&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; ShowLoginAndInitMainForm(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; ShowLoginAndInitFormEventArgs)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Set the login form type to the appropriate form type (optional)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;Login.LoginFormType = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;GetType&lt;/FONT&gt;&lt;FONT size=2&gt;(frmLogin)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Show the login form and set the return value back to e.ShowMainForm&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;' The true value passed to the method tells the method to allow the&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;' end-user to cancel the login form, which will return False from the &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;' method.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;error here--&amp;gt;e.ShowMainForm = Login.ShowLoginAndAuthUser(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;True&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;System.Reflection.TargetInvocationException was unhandled by user code&lt;BR&gt;&amp;nbsp; Message="Exception has been thrown by the target of an invocation."&lt;BR&gt;&amp;nbsp; Source="mscorlib"&lt;BR&gt;&amp;nbsp; StackTrace:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp;amp; canBeCached, RuntimeMethodHandle&amp;amp; ctor, Boolean&amp;amp; bNeedSecurityCheck)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Activator.CreateInstance(Type type, Boolean nonPublic)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Security.Login.ShowLoginAndAuthUser(Boolean AllowCancel)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Payroll.AppMain.ShowLoginAndInitMainForm(ShowLoginAndInitFormEventArgs e) in C:\Action Labor Payroll 2006\Payroll\Payroll\AppMain.vb:line 118&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Application.StrataFrameApplication.Raise_ShowLoginAndInitializeForm(ShowLoginAndInitFormEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Application.StrataFrameApplication.RunApplication()&lt;BR&gt;</description><pubDate>Wed, 08 Nov 2006 08:38:37 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4247.aspx</link><description>Great!&amp;nbsp; Glad to hear it! :)</description><pubDate>Wed, 08 Nov 2006 08:38:37 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4244.aspx</link><description>BTW, it appears my code to swap out roles is working :D&lt;br&gt;
&lt;br&gt;
So, it looks like for now, I have jumped that hurdle.  Thanks again for the help.</description><pubDate>Tue, 07 Nov 2006 21:49:41 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4242.aspx</link><description>Sure...sorry for the delayed response...:blush:</description><pubDate>Tue, 07 Nov 2006 20:43:17 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4240.aspx</link><description>Thanks Trent</description><pubDate>Tue, 07 Nov 2006 19:42:31 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4191.aspx</link><description>Well...it turns out that it is a very simple and easy to fix problem.&amp;nbsp; I will make sure that the template does not have this in it.&amp;nbsp; Open the LoginForm1.Designer.vb file and go to line 112.&amp;nbsp; There is a line of code attempting to set the header image on the gradient form header and pull it from a resource file that does not exist.&amp;nbsp; If you remove this line, the error will go away.&amp;nbsp; Another way to make it disappear it to just set the header image on the gradient form header.</description><pubDate>Tue, 07 Nov 2006 08:56:25 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4187.aspx</link><description>Any ideas on this?</description><pubDate>Mon, 06 Nov 2006 21:36:40 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4134.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;I am getting the same problem on a vanilla application with security project.Here is the sample project.</description><pubDate>Fri, 03 Nov 2006 11:25:46 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4133.aspx</link><description>this is from the inner exception&lt;/P&gt;&lt;P&gt;{"Could not find any resources appropriate for the specified culture or the neutral culture.&amp;nbsp; Make sure "Payroll.FrmLogin.resources" was correctly embedded or linked into assembly "Payroll" at compile time, or that all the satellite assemblies required are loadable and fully signed."}</description><pubDate>Fri, 03 Nov 2006 11:12:14 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4132.aspx</link><description>Oh sure...it is definitely possible :hehe: .&amp;nbsp; One thing you might try is creating a new project off of the StrataFrame Application w/ Security and then look and compare to see if you are missing something.&amp;nbsp; If this doesn't work for you let me know and we can dig a little deeper.</description><pubDate>Fri, 03 Nov 2006 11:11:10 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4131.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;They are both in the same assembly. I used the Template to create the form and have not changed any thing in the template, This application has been in devlopment for awhile so I had to update the appmain following the directions in the Role based help. Is it possible that there is something that the login template form references that my app is missing?&lt;/P&gt;&lt;P&gt;P</description><pubDate>Fri, 03 Nov 2006 11:07:59 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4129.aspx</link><description>I did this just yesterday...so I know it will work :)&amp;nbsp; The error that is being thrown is because Activator.CreateInstance cannot find the specified type...or it is throwing an error when it launches.&lt;/P&gt;&lt;P&gt;Is the custom login form in the same assembly as the Appmain.vb file?&amp;nbsp; It doesn't have to be, but I am just curious.</description><pubDate>Fri, 03 Nov 2006 10:21:56 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4127.aspx</link><description>Yep that works fine. &lt;/P&gt;&lt;P&gt;I used the login template to create the login form. I deleted and re added the custom form and still recieve the same error.</description><pubDate>Fri, 03 Nov 2006 10:18:45 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Getting an error on login</title><link>http://forum.strataframe.net/FindPost4126.aspx</link><description>Well, the problem is coming from Activator.CreateInstance which means that it can either not find the fromLogin or it is not defined off of a SF Login Form template.&lt;/P&gt;&lt;P&gt;If you remove the line of code specifying the custom logon form, does the default logon form come up?</description><pubDate>Fri, 03 Nov 2006 10:10:12 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>