PTWeb Administration Tool Error

PTWeb Administration Tool Error

Old forum URL: forums.lhotka.net/forums/t/1979.aspx


Jav posted on Thursday, December 14, 2006

If you open the WebSite.AspNet Cofiguration Tool in PTWeb, and click Security Tab, you get the following error:

The following message may help in diagnosing the problem: C:\Documents and Settings\Jav\My Documents\Visual Studio 2005\Projects\csla20vb\ProjectTracker20vb\www\PTWeb\App_Code\PTMembershipProvider.vb(11): error BC30451: Name 'PTPrincipal' is not declared.

I am trying to create a custom Membership provider in my own App, and I keep getting a different version of a similar error.  In may case the message says that it cannot load type MyMemberShipProvider.

That is even though I have created the MyMembershipProvider class just like the PTMemebrshipProvider and have modified the Web.Config. 

There is only one difference in my set up (and it may be significant): I am using a Web Application Project - which does not support App_Code folder.  Therefore, my MyMembershipProvider class is sitting in the main website directory.  Perhaps I should add it to one of BizObj projects.

Jav

RockfordLhotka replied on Thursday, December 14, 2006

Make sure you are NOT using the ASP.NET web development server (Cassini). You MUST use IIS when building custom membership providers due to a (bug/feature) in the way Cassini loads (or fails to load) assemblies...

Jav replied on Thursday, December 14, 2006

Rocky,

Thanks for your help.  My website is in IIS.  I originally had everything set up as a standard Website.  Only recently I created a Web Application Project and moved everything into it. 

If, in the Web Config, I set the type="System.Web.Security.SqlMembershipProvider", I can configure everything - but then my code, ValidateUser in MyMembershipProvider class does not get executed.  If I set it up with type=MyMembershipProvider, I get a runtime error that  MyMembershipProvider cannot be found.  I thought that the lack of an App_Code folder had something to do withit.  But I have not added the class to one of my other librariaes and still the same error. 

Jav

Jav replied on Thursday, December 14, 2006

correction: I have now added the class to one of my other libraries ....

Jav

skagen00 replied on Tuesday, January 02, 2007

Jav, have you solved your problem?

I have written a "custom" membership provider myself and find that remoting may throw a minor wrench into things. I find that if I run the ASP.Net web site admin tool from the remoting web site I'm able to do the configuration of users without a problem (provided I have the application name set properly).

If I run the tool from the Web site itself it fails when it invokes the remoting portal.

 

dstarkey replied on Tuesday, February 19, 2008

Did you ever solve this issue?  If so I need your help, specifically with the placement of the custom membership provider since I cannot use the App_Code folder.  Your help is greatly appreciated.

Thanks, Don

dstarkey replied on Tuesday, February 19, 2008

Please disregard last post.  Silly error on my part in web config.

Copyright (c) Marimer LLC