Configuration Error on secondary domain

Aug 3, 2008 at 9:55 AM

Hi Guys,

I'm new to blogengine.net, I first installed it as a test on my local IIS and was very impressed so I decided to upload it to my website. Everything is A-OK and i'm having no problems on my primary domain. However, i'm also sharing my hosting with another website and since the upload of blogengine.net the other web site has a configuration error. Blogengine.net is installed into the root directory of the primary domain and the secondary domain is configured to read from a folder within the root directory.

Please help as this secondary site belongs to a friends business and I don't know why this is happening.

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: Could not load file or assembly 'BlogEngine.Core' or one of its dependencies. The system cannot find the file specified. (d:\hosting\cvandal\web.config line 97)

Source Error:

[No relevant source lines]

Aug 3, 2008 at 10:27 AM
That error means your secondary domain  can't find the BlogEngine.Core.DLL

Make sure their is a "bin" directory in your secondary domain, just like in the primary. If not create. 

Also make sure there is a copy of the BlogEngine.Core.DLL in the bin directory of the secondary domain. 
Aug 3, 2008 at 11:35 AM
I created the Bin directory within my second domain and uploaded the BlogEngine.Core.DLL file and the error changed. It now reads...

Could not find file 'd:\hosting\primary_domain\secondary_domain\App_Data\settings.xml'.

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.

So, of course as before I uploaded the settings.xml file to that directory yet it still gives me this error. I also tried settings the same permissions to the App_Data folder as I did with blogengine.net
Aug 3, 2008 at 11:49 AM
Are you trying to have two seperate domains point to the same BE.net installation?  if you are your going about it the wrong way.  If you are not, I would suggest that you don't put secondary domain as a sub directory of Primary domain... If you have to have it that way and you are looking two have a different version for each domain, then you'll need to copy all the files in primary domain to secondary domain, and also make sure that Second Domain is configured as an virtual directory+application in IIS
Jul 8, 2009 at 12:42 AM

I have this same problem with shared hosting on GoDaddy.  I have BE hosted at the root of my web server with a secondary site completely unrelated to BE in a subdirectory of the root.  I am getting the cannot find BlogEngine.Core error message on the secondary (non BE) domain.  I tried dropping in another web.config for my secondary site with no such luck.  Is there any way to make this work?

Coordinator
Jul 8, 2009 at 5:59 AM

There's two things I would do.

In the web.config file of the child (non-BE) site, I would explicitly remove the 4 HTTP Modules that BE has registered.  If you're on IIS6, you will only need to remove the modules from the <httpModules> section.  If you're on IIS7, you'll want to do the same thing in the <modules> element in the <system.webServer> section.  If you're on IIS7, it won't hurt to remove the modules from both the <httpModules> section as well as the <modules> section.

<system.web>
    <httpModules>
        <!-- below modules are from parent app -->
        <remove name="WwwSubDomainModule"/>
        <remove name="UrlRewrite"/>
        <remove name="CompressionModule"/>
        <remove name="ReferrerModule"/>
        <!-- above modules are from parent app -->
        <!-- ..... add any modules you need in your child app here ...... -->
    </httpModules>
</system.web>

<system.webServer>
    <modules>
        <!-- below modules are from parent app -->
        <remove name="WwwSubDomainModule"/>
        <remove name="UrlRewrite"/>
        <remove name="CompressionModule"/>
        <remove name="ReferrerModule"/>
        <!-- above modules are from parent app -->
        <!-- ..... add any modules you need in your child app here ...... -->
    </modules>            
<system.webServer>
        
If you have access to the web.config file in BE, I would wrap the existing <system.web> section in the <location> tag as shown below.  This will prevent some of the BE settings from propagating down to the sub-applications.
        
<location path="." inheritInChildApplications="false">
    <system.web>
    
         <!--  all the existing settings  -->
    
    </system.web>
</location>

Jul 12, 2009 at 4:09 PM

Worked perfectly, thanks so much BenAmada!

Jan 3, 2010 at 5:35 PM
Edited Jan 4, 2010 at 6:11 PM

I am also facing the same issue.

Parser Error Message: Could not load file or assembly 'BlogEngine.Core' or one of its dependencies. The module was expected to contain an assembly manifest. (C:\Inetpub\vhosts\jobglance.com\httpdocs\blog\web.config line 97)

Line 95:
Line 96:       <httpModules>
Line 97:         <add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule, BlogEngine.Core"/>

I tried with alternate solution that is suggested by BenAmada. I have tried on domain as well subdomain but it not working

In localhost, it is working but on production, it is not working. it is shared hosting.

 

Jan 16, 2010 at 8:37 AM

Hi Guys,

I am still waiting for your help.

Parser Error Message: Could not load file or assembly 'BlogEngine.Core' or one of its dependencies. The module was expected to contain an assembly manifest. (C:\Inetpub\vhosts\jobglance.com\httpdocs\blog\web.config line 97)

 

Mar 22, 2011 at 1:02 AM
Edited Mar 22, 2011 at 1:03 AM

BenAmada --- Thank you for your information on dealing with subdomain web applications. I am on shared hosting with GoDaddy. In my case I had BE in the root, and another non-BE application in the subdomain.  I followed your instructions precisely and it worked.

Jul 16, 2011 at 10:33 AM

I did the same but it doesn't work, in my sub domain: http://leech.code2code.info is PHP code

Note: I use godaddy hosting with IIS7.

Please advice me!
Thanks

Feb 11, 2013 at 6:29 AM
Edited Feb 11, 2013 at 6:29 AM
I have made the <location> tag change and my subdomains working fine, But am not able to open admin side of the blogengine (2.7).

Earlier i tried to integrate the subdomain with same installation but it was taking much memory and hosting provider stopped the application pool.