YAFLogo

bogy
  • bogy
  • 53% (Neutral)
  • YAF Forumling Topic Starter
16 years ago
Is there anyone who successfully configured the web.config file to work with the MS Business shared account from 1and1?

I'm getting all the time error at line 108 from the default web.config (recommended-web.config) file?

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: YAF.Providers.Membership.YafMembershipProvider..ctor()

Source Error:

Line 106:

Line 107:

Line 108:

Line 109:

Line 110:

Source File: E:\kunden\homepages\30\d2XXXXXXXX\web.config Line: 108

Sponsor
test2005
16 years ago
Search this forum for "1and1", I'm sure this problem has come up before. If all else fails, ask 1and1 for a "recommended config file format" document.
.....the man in black fled across the desert..........and the gunslinger followed.....

bogy
  • bogy
  • 53% (Neutral)
  • YAF Forumling Topic Starter
16 years ago

Search this forum for "1and1", I'm sure this problem has come up before. If all else fails, ask 1and1 for a "recommended config file format" document.

test2005 wrote:

I've went trough they web.config but the issue retains.

Here is what they have posted under the 1and1 FAQ section regarding web.config:

urgentFlushThreshold="1" regularFlushInterval="Infinite" urgentFlushInterval="00:01:00"

maxBufferThreads="1" />

urgentFlushThreshold="1" regularFlushInterval="Infinite" urgentFlushInterval="00:01:00"

maxBufferThreads="1" />

urgentFlushThreshold="100" regularFlushInterval="00:05:00"

urgentFlushInterval="00:01:00" maxBufferThreads="1" />

regularFlushInterval="00:30:00" urgentFlushInterval="00:05:00"

maxBufferThreads="1" />

buffer="false" bufferMode="Notification" name="SqlWebEventProvider"

type="System.Web.Management.SqlWebEventProvider,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />

custom="" />

custom="" />

profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00"

custom="" />

provider="EventLogProvider" profile="Default" minInstances="1"

maxLimit="Infinite" minInterval="00:01:00" custom="" />

startEventCode="0" endEventCode="2147483647" />

startEventCode="0" endEventCode="2147483647" />

startEventCode="0" endEventCode="2147483647" />

startEventCode="0" endEventCode="2147483647" />

startEventCode="0" endEventCode="2147483647" />

startEventCode="0" endEventCode="2147483647" />

startEventCode="0" endEventCode="2147483647" />

startEventCode="0" endEventCode="2147483647" />

startEventCode="0" endEventCode="2147483647" />

startEventCode="0" endEventCode="2147483647" />

predicateClass="System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlPageAdapter"

predicateMethod="DeviceQualifies"

pageAdapter="System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlPageAdapter">

predicateClass="System.Web.UI.MobileControls.Adapters.HtmlPageAdapter"

predicateMethod="DeviceQualifies"

pageAdapter="System.Web.UI.MobileControls.Adapters.HtmlPageAdapter">

inheritsFrom="WmlDeviceAdapters"

predicateClass="System.Web.UI.MobileControls.Adapters.UpWmlPageAdapter"

predicateMethod="DeviceQualifies"

pageAdapter="System.Web.UI.MobileControls.Adapters.UpWmlPageAdapter">

predicateClass="System.Web.UI.MobileControls.Adapters.WmlPageAdapter"

predicateMethod="DeviceQualifies"

pageAdapter="System.Web.UI.MobileControls.Adapters.WmlPageAdapter">

inheritsFrom="HtmlDeviceAdapters"

predicateClass="System.Web.UI.MobileControls.Adapters.ChtmlPageAdapter"

predicateMethod="DeviceQualifies"

pageAdapter="System.Web.UI.MobileControls.Adapters.ChtmlPageAdapter">

type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

name="AspNetSqlPersonalizationProvider" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

2shorts
  • 2shorts
  • 50.6% (Neutral)
  • YAF Forumling
16 years ago
After having this error myself earlier. I managed to get it working by removing the membership entries in my /main/forum/web.config. NB however that may only be because i also have some membership entries already setup in my /web.config.

However I have done somthing that won't let my board open at all since then (I just get a Internet Explorer cannot display the webpage message now)

I'm going to try some more hack slash, again when my son gets off the computer 😶

JF26068
  • JF26068
  • 51.2% (Neutral)
  • YAF Forumling
15 years ago
I have the exact same issue with RC2... it works great when run locally but fails with the same error shown in post #1 above when uploaded to 1and1 web hosting. The suggestion shown immediately above only causes a different error.

Here's some background on what I've done, but to no avail (my app.config and web.config are attached)...

My forum is installed in a "Forum" folder (i.e. http://localhost/Forum). This is set up as an application in IIS. The install ran great on my localhost. When I ported the code to 1and1, I also placed it in a "Forum" folder set up as an application root. The install got to the point where you fill out the admin account info, then failed with the provider error shown in post #1.

I tried to change the applicationName field to "Forum" rather than "YetAnotherForum", and that didn't help. Same error. I then backed up my installed and working database from my local machine and restored it to 1and1. Still the same error. I'm at wit's end... please help!!!

mmccann
  • mmccann
  • 51.2% (Neutral)
  • YAF Forumling
15 years ago
Same problem on ServerIntellect shared hosting. I'm baffled and have moved on to other things.
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
15 years ago
Have you guys tried using the ASP.NET membership provided by 1&1 instead of YAF build-in membership? Might work better...
mothswiller
15 years ago
I have the exact same problem. The application works fine locally and on several servers I have across the world. I decided to go with some shared hosting and uploaded the database and the exact release from my development environment and get the same error:

Server Error in '/' Application.

--------------------------------------------------------------------------------

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: YAF.Providers.Membership.YafMembershipProvider..ctor()

Source Error:

Line 99:

Line 100:

Line 101:

Line 102:

Line 103:

---------------------------------------------------------------------------------

Now this error has been reported several times I know - but nobody including the YAF developers have provided a suitable solution. At first glance it would appear that there is some security machine.config setting that prevents the web.config from functioning correctly so before I look into this can any of the YAF developers provide a clear solution?

mothswiller
15 years ago
OK this issue is just as I thought.

You all may be aware that the machine.config file is effectively the web.config for the server(machine) thus it dictates the behaivour of every website that runs on that server.

Many config sections can be overriden in a particular webite by altering those config sections in the site's web.config file providing the machine.config file does not have attributes dissalowing it eg: allowOverride="false".

If you look at the Memebership and Profile machine.config sections of a typical server they will look like this:

(I've omitted the mySQL one for brevity)

Now in YAF we override these sections using:

Unfortuantely CustomProviders that override these sections only work when the server/application is running in full trust. This really isnt a preffered trust level to run in on a shared hosting server.

Commenting out the sections wont work as an object is trying to be created using the values in the config sections so you will no doubt get a 'Object null reference' error.

You can fill in the sections using the default AspNetSqlMembershipProvider and the object will be created - this will allow you to see the homepage and the threads etc BUT any further action where User/Profile objects need to be created will result in an error.

SOLUTION

========

We can try and apply the following Attribute on our custom

membership provider's assembly:

AllowPartiallyTrustedCallersAttribute

this will allow partial trusted caller to load our assembly.

This may work though of have not tried yet - I will post back if I have any joy

mothswiller
15 years ago
OK so I now think we have a solution.

Most hosting companies will run shared environments in Medium Trust so thats that and they will not change!

Recompile the YAF.Providers dll into a strongly named standalone assembly and make sure the assembley is attributed with AllowPartiallyTrustedCallers()

[assembly: AllowPartiallyTrustedCallers()]

Call the hosting company and ask them to vet the assembly and put it into the GAC. They should do this - most companies usually allow custom COM objects on the server providing they pass certain tests - I cant see it being any different with .Net Assemblies.

Now the CustomProvider code will run in medium trust!

mothswiller
15 years ago
OK I have now sorted this issue and can get the application to run on shared servers with Medium Trust.

-----------------------------------------------------------------

This will solve this error that many people are getting

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: YAF.Providers.Profile.YafProfileProvider..ctor()

Source Error:

Line 104:

Line 105:

Line 106:

Line 107:

Line 108:

---------------------------------------------------------------

It does not involve requesting that your host change their environment or install anything in the GAC etc.

SOLUTION

========

1)Make YafProfileProvider and YafMembershipProvider public - they currently have no access modifier so even when we strong name our assemblies and add the [assembly: AllowPartiallyTrustedCallers()] attribute the error will still occur as the classes will be invisible - THIS IS A CODE BUGFIX so take note YAF developers.

2) Make every assembly strong named using a key and add the [assembly: AllowPartiallyTrustedCallers()] attribute to the assembly via the AssemblyInfo.cs for EVERY Assembly

3) Recompile and deploy and VOILA - the application will run in a shared hosting environment with MEDIUM TRUST

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
15 years ago

Many thanks mate; I'll add this to the SVN.


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

JF26068
  • JF26068
  • 51.2% (Neutral)
  • YAF Forumling
15 years ago

SOLUTION

========

1)Make YafProfileProvider and YafMembershipProvider public - they currently have no access modifier so even when we strong name our assemblies and add the [assembly: AllowPartiallyTrustedCallers()] attribute the error will still occur as the classes will be invisible - THIS IS A CODE BUGFIX so take note YAF developers.

2) Make every assembly strong named using a key and add the [assembly: AllowPartiallyTrustedCallers()] attribute to the assembly via the AssemblyInfo.cs for EVERY Assembly

3) Recompile and deploy and VOILA - the application will run in a shared hosting environment with MEDIUM TRUST

mothswiller wrote:

mothswiller,

First, thank you for providing a solution to get the application to run on shared servers with Medium Trust. This should help many. I need further clarification on implementing step 2 above, though.

I started with the source code for the final release of 1.9.3 (dated April 23, 2009) and added a key to all 5 of the 'YAF.Classes' assemblies, the 'YAF.Controls' assembly, and the 'YAF.Providers' assembly. I also added AllowPartiallyTrustedCallers to all of the assemblies.

When I compile, I get errors because some of the other assembly references where source code is not available (namely 'CookComputing.XmlRpcV2' for one) do not have strong names. How did you get around that issue?

mothswiller
15 years ago
Hi JF,

Sorry for not getting back to you on this post - My wife recently had a our baby and consequently I've not been around.

Anyway the issue you have is exactly what I ran into aswell. Because of the dependencies I think it was necesarry to also apply this to the build of the web project aswell. You can do this manually but Visual Studio now provides a quicker way:UserPostedImage

dzenb
  • dzenb
  • 58.4% (Neutral)
  • YAF Forumling
15 years ago
Is somebody solve this problem ?

Is yes , is it possible to put build on SOURCEforge?

Thank you !