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

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Finally solved the secuity error on 1and1 shared host installFinally solved the secuity error on 1and1 shared host install
Previous
 
Next
New Post
11/2/2007 12:45 AM
 

For anyone who has been frustrated with the security errors from dotnetnuke when running on a 1and1 MS Business Shared host account I finally have a workaround. I I was getting an error every time the application started up. The were usually something like this:

AssemblyVersion: 04.06.02
PortalID: 0
PortalName: MaineSGNA
UserID: 3
UserName: Paul
ActiveTabID: 48
ActiveTabName: Event Viewer
RawURL: /Admin/LogViewer/tabid/48/Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://www.mainesgna.org/Admin/SiteLog/tabid/44/Default.aspx
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: ea6d7295-ff79-4d6b-a37f-d170913384e4
InnerException: Attempt to access the method failed.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Reflection.MethodBase.PerformSecurityCheck
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Attempt to access the method failed. ---> System.MethodAccessException: Attempt to access the method failed. at System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at System.Web.Handlers.ScriptResourceHandler.EncryptString(String s) at System.Web.Handlers.ScriptResourceHandler.RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl(Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) at System.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) at System.Web.UI.ScriptReference.GetUrl(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) at System.Web.UI.ScriptManager.RegisterScripts() at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) at System.Web.UI.Page.OnPreRenderComplete(EventArgs e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
Server Name: NTXPWUS58

 

After looking at the code I've determined that there is either a flaw in the code that determines if AJAX is installed in the GAC or 1and1 has AJAX installed in the GAC but it is not working correctly. There are two ways to work around the problem depending on if you are a developer and can build the DNN framework. The first can be done without a full source installation.

1. Comment out loading AJAX in default.aspx.vb

            If AJAX.IsInstalled Then
                'AJAX.AddScriptManager(Me)
            End If

2. added a lookup in web.config for new setting  to DisableAJAX.

Revise this method in AJAX.vb:

Private Shared Function ScriptManagerType() As Type
If m_ScriptManagerType Is Nothing Then
If Not m_Initialized Then
m_ScriptManagerType = Reflection.CreateType("System.Web.UI.ScriptManager", True)
End If
m_Initialized = True
End If
Return m_ScriptManagerType
End Function
after:
Private Shared Function ScriptManagerType() As Type
If Not Config.GetSetting("DisableAJAX") = "true" Then
If m_ScriptManagerType Is Nothing Then
If Not m_Initialized Then
m_ScriptManagerType = Reflection.CreateType("System.Web.UI.ScriptManager", True)
End If
m_Initialized = True
End If
Return m_ScriptManagerType
Else
Return Nothing
End If
End Function

This allows me to change the setting if needed without code changes. When I get a chance, I'm going to investigate further if 1and1 has the ajax libraries installed in the GAC and is fooling the ajax loading code. I'll reply here with my findings.

 

Paul T

 
New Post
1/27/2008 5:11 PM
 

Replying to my post so it won't be missed by users who don't see it because of the "show no replies" filter.

 
New Post
3/11/2008 4:33 PM
 

I have the same problem with 1and1 (DNN 4.05).  This workaround only for build 4.6 and above? 

 

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Finally solved the secuity error on 1and1 shared host installFinally solved the secuity error on 1and1 shared host install


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