Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAD was working, now its notAD was working, now its not
Previous
 
Next
New Post
2/16/2006 11:31 AM
 

I am running DNN 3.2.2.  I had AD working, but then about 2-3 days ago, it just stopped.  Coincidentally, it just happened to stop working after I added a new module to DNN through the Host|Module Definitions menu.  However, I had not actually added the new module to any pages.  On the final Update/Save (whatever the link is to upload a new module) is when the problem started.  I got and still get the following error message:

StartIndex cannot be less than zero. Parameter name: startIndex

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: StartIndex cannot be less than zero. Parameter name: startIndex

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex]
   System.String.Substring(Int32 startIndex, Int32 length) +118
   DotNetNuke.Security.Authentication.Configuration..ctor() +177
   DotNetNuke.Security.Authentication.Configuration.GetConfig() +70
   DotNetNuke.HttpModules.AuthenticationModule.OnAuthenticateRequest(Object s, EventArgs e) +25
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87

Since then, I have deleted the module from DNN and not surprisingly, it makes no difference.

Now, if I comment out the following line in web.config to disable AD, DNN works just fine and I can login with host/admin.  But if I keep the line in, I get that error message.  Here is the web.config line I am referring to:

<add name="Authentication" type="DotNetNuke.HttpModules.AuthenticationModule, DotNetNuke.HttpModules.Authentication" />

So, anyone know what is wrong?

Thanks.
 

 
New Post
2/21/2006 6:19 PM
 

Can anyone tell me where the source code is for DotNetNuke.Security.Authentication.Configuration?  Since no one has responded, I thought I would take a look at the source code and try to determine what condition would cause this.  But, I can't even find the source code.

Any help would be appreciated.  I was on the verge of rolling this out on our intranet and the AD broke on me.  I can't roll this out until I get it resolved.

Thanks.

 
New Post
2/22/2006 9:47 AM
 

dotnetnuke\Components\Authentication\Configuration.vb is where that module is located on my 3.2.2 source installation.  (I've been trying to figure out if a failure to read LDAP is what is causing my woes with the AD support.)

Sorry to hear about the error on your system- that's not something I've seen before, though.  If I had to start tracing, I'd remove the AD from the mix if I could and see if it's integral to the error - go back to Forms and comment out the HTTP module for ADSI even.  Good luck.

 
New Post
2/22/2006 10:35 AM
 

I don't have an Authentication directory in my DotNetNuke\Components directory.  Are you sure you have the path correct?  Could you email me the source for that module?  joe at rattz dot com

Yes, AD is the problem.  I have already done exactly what you suggested and removed the web.config line for the AD authentication.  When I comment it out, DNN works fine.  When its not commented out, I get the error I posted in my original post.  Its baffling because it was working for about a week, and then suddenly, bam!  I was just about to roll the portal out too.  I guess it is better that it broke now than after I rolled it out though.  But I sure wish someone could tell me how to fix it.

Thanks for responding. 

 
New Post
3/3/2006 5:58 PM
 

Hallelujah!!!  Hallelujah!!!  Hallelujah!!!

First, thanks to all that responded, especially rfreese who sent me the source code I requested.  I now realize that the source code distributon is a different distribution than the install version.

I finally got around to looking at the source code today and examining the dump I posted above.  The problem was that somehow, the admin user's email address was set to "admin".  The code is expecting/demanding an email address with an @ sign in it.  I consider this a bug and will post it in the appropriate place.  The code should handle this problem better.

From the Configuration.vb module, here is the offending line in the DefaultEmailDomain() property:

                Return _portalEmail.Substring(_portalEmail.IndexOf("@"))

Obviously, if your admin user's email address doesn't have an @ sign, you are in trouble here.

I can't really say what the admin's email address was from the begining of my installation, but since my DNN install worked for months, even weeks since the last upgrade to 3.2.2, I will assume it got changed somehow.  Furthermore, although I considered it a coincidence at the time, I now suspect the module I installed when this first happened is the culprit.  Unfortunately, that was long enough ago that I don't remember which module it was.  Darn it.

Also, the error above is what I saw when I had AD turned on and I got it just trying to get to the site.  Coincidentally, and I never noticed this, I also got the same error message, but presented differently, if I had AD turned off and gave the wrong password or an invalid user id.  In this case, the error only occurs when you actually try to login, and it's handled differently.  Apparently the code is catching this exception in this case and just presenting the error message in one of the skin's panes.  You can read more about this scenario in this post:

http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/89/threadid/23110/scope/posts/Default.aspx

Thanks to all those that helped.

 

 

 

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAD was working, now its notAD was working, now its not


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out