YAFLogo

Elrinth
  • Elrinth
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
ok so I successfully tried a YAF-forum in a comepletely separate solution.

But when I try to add to an already existing website I get trouble. I keep on reading and it's all about running it as a separate application. So it's not possible to test it within visual studio if it's in the same folder structure as my already existing project?

I tried to getting it running; I put YAF in a subfolder called forum and copied chunks of it's website config and added to my already existing website but the system web part got enclosed within a ....

Also copied the binaries to the root bin folder. Also made sure connectionstring was there and every appsetting from yaf in the right place.

When running my normal site worked nicely.. but when changing folder to the forum, it instantly complains about the web.config and says :

"It's wrong to use a chapter which is registered as allowDefinition=MachineToApplication outside it's usage level. This error can occur by a virtual directory not being configured as an apply-program in IIS." I don't know if this is what you guys see, because I'm getting my error message in swedish :)

Wrong is marked for:

I'm using 1.9.3 of YAF. I'm using VS2008. I'm trying to get it running in visual studio together with my other site. Is that even possible!?

Thanks for any help!

Sponsor
Elrinth
  • Elrinth
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
Well? In which way, do you other guys setup your forums?
Elrinth
  • Elrinth
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
I got it working magically on our local server.. but on the live server it won't work... no matter what I do...

I get:

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.

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:

[SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.]

System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0

System.Security.CodeAccessPermission.Demand() +58

System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) +99

also another question.. Must the forum really run with dbo?

Elrinth
  • Elrinth
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
removed all files for yaf, and copied over clean yaf 1.9.3-files, manually entered password into app.config, copied recommended config from webconfigs dir.. let the database be and now I get:

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

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:

[NullReferenceException: Object reference not set to an instance of an object.]

YAF.Classes.Utils.YafBoardSettings.get_Name() +14

YAF.Classes.Base.ForumPage.GeneratePageTitle() +203

YAF.Classes.Base.ForumPage.ForumPage_Load(Object sender, EventArgs e) +56

System.EventHandler.Invoke(Object sender, EventArgs e) +0

System.Web.UI.Control.OnLoad(EventArgs e) +99

System.Web.UI.Control.LoadRecursive() +50

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

Elrinth
  • Elrinth
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
When setting forum works on our local not on level="Medium".

Why can't it run under medium?

On the live server we can't set trust level at all because it says it's been locked via location.

I'm trying to contact admins about this. But seriously, why can't the forum run in Medium trust?

Elrinth
  • Elrinth
  • 55.4% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
Some help to others who may stumble upon same problems as me:

For folder restrictions.. Ask your web hotel provider to read this: http://www.west-wind.com/WebLog/posts/2153.aspx 

Make sure Security Account used has read/write/modify to folders you wish to upload, write over files to.

Also regarding the trust issues.

Read about it here:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/1f7959af-2eac-4418-91a3-56006ea6eb07.mspx?mfr=true 

Make sure the web.config in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG (depending on where you installed windows)

has allowoverride="true"

This might also depend on which asp.net version you're using. Not sure. But this should be able to help you.

Now you can set in your forum web.config inside the tags.

Hope this helps someone. Ciao!

Gofer01
  • Gofer01
  • 100% (Exalted)
  • YAF Commander
14 years ago

Well? In which way, do you other guys setup your forums?

Elrinth wrote:

Crete a vitural directory. If you are using Visual Studio Express open up the main site. Then select add new site. Then selext ASP.NET empty web site. The path will look something like this C:\Inetpub\wwwroot\WebSite1 or http://localhost/WebSite1. Rename website1 to anything that you want, Then install the forum software has a stand alone web site. Do the same thing as you did before installing the software in the root

Before you press enter on creating the vitual directory make sure the dropdown menu at top right is highlighted with ASP.NET 3.5 The language should be C#

You should end up with two web applications or projects in the same solution. If you created a phyical directory off the root of the web delete this directory before creating a vitural directory.

UserPostedImage

UserPostedImage

UserPostedImage


unit541
  • unit541
  • 51.2% (Neutral)
  • YAF Forumling
14 years ago

Make sure the web.config in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG (depending on where you installed windows)

has allowoverride="true"

This might also depend on which asp.net version you're using. Not sure. But this should be able to help you.

Now you can set in your forum web.config inside the tags.

Hope this helps someone. Ciao!

Elrinth wrote:

Any ideas for those of us who are hosted in a shared environment where we can't modify the trust settings? Been hassling with this for 2 days now. Hate to go with something else, but can't afford any more time on this. It's a shame it won't run on medium trust out of the box.

LondonPop
13 years ago

Any ideas for those of us who are hosted in a shared environment where we can't modify the trust settings? Been hassling with this for 2 days now. Hate to go with something else, but can't afford any more time on this. It's a shame it won't run on medium trust out of the box.

unit541 wrote:

Same problem for me upgrading from 1.91 to 1.94

All seems to work correctly except the trust issue everyone is talking about. Get the error: (System.Security.SecurityException: Request failed) just entering admin.

I have hope for a resolution as the earlier version works fine on my reseller hosting plan. The hosting company we use now based in London is very good so changing is not really an option for me.

Is there any chance we could get a resolution with paid support? If so, I am interested.

Thanks in advance,

LondonPop