Installation problems

Apr 19, 2009 at 10:46 PM
So I am trying to install the blog software and I am encountering some problems.

1. Just setting up as a directory and loading files create this error. 

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: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 7:  	</configSections>
Line 8:  	<BlogEngine>
Line 9: <blogProvider defaultProvider="XmlBlogProvider">Line 10: 			<providers>
Line 11: 				<add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core"/>



I found the post the has some solutions to this issue. I checked with the hosting provider and then I set up a virtual directory and it is set up as seperate web appliaction. When we did that we got an error that was missing a reference(<add namespace="CommerceBuilder.Utility"/>).

The hosting support tried adding 
<namespaces>
<clear />
</namespaces>

Now we have a new error:
 

Server Error in '/test' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'EventArgs' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 28:   /// </example>
Line 29:   /// </summary>
Line 30: void Application_Start(object sender, EventArgs e)Line 31:   {
Line 32:     ArrayList codeAssemblies = Utils.CodeAssemblies();

Source File: d:\hosting\dynamiinternational\silversentimentscom\blog\Global.asax    Line: 30


Can anyone tell me what I am doing wrong?

Andreas
Coordinator
Apr 20, 2009 at 12:20 AM
So the blog is in a sub-folder and is now a sub-application of your main website?

If so, the blog is probably inheriting settings from the parent application.  You can either remove each reference individually in the blog's web.config file, or if you have access to the parent application's web.config file, you can tell it to not propagate its settings down to child applications.  For this second option, you would want to wrap the <system.web> section in the parent application's web.config file in a <location> tag with these settings:

<location path="." inheritInChildApplications="false">
   <system.web>
     ....
   </system.web>
</location>

That <location> tag goes into the parent application's web.config file.

For the first option I mentioned above, you can manually remove references.  The standard ASP.NET web.config file doesn't actually have a "namespaces" section.  Maybe this section was registered as a section in the parent application's web.config file.  So, instead of clearing ALL namespaces like you tried, you can remove them one at a time.

<namespaces>
  <remove namespace="CommerceBuilder.Utility" />
</namespaces>

I'm not entirely sure if that syntax is correct since I'm not sure how the <namespaces> section is setup.
Coordinator
Apr 20, 2009 at 12:24 AM
Edited Apr 20, 2009 at 12:33 AM
Oops, I think I was mistaken.  I said the standard ASP.NET web.config file doesn't have a <namespaces> section.  But it can actually have one.  It looks like it goes within <system.web><pages>.  So please ignore that statement I made :)
Apr 20, 2009 at 4:08 AM

thanks for the help Ben.

i am not sure i am making the changes corretly. When I tired adding the <location path="." inheritInChildApplications="false"> it didn't wrok. was I supposed to change the path="."? It also ended up making the rest of the site not work.

then I tried the removal of the namespace, but I could't get that to work either.

thanks.

Coordinator
Apr 20, 2009 at 4:54 AM
If you use the <location> tag, it should wrap around the existing <system.web> section in the parent application's web.config file.  The path should be what I had in my message -- path=".".

But you should only need to do either the <location> tag in the parent app's web.config file, or the <remove namespace> in the blog web.config file -- not both.

If you go with <remove namespace> in the blog's web.config file, the only thing I can think of to watch out for is that the <namespaces> section is in the right place.  The default BE web.config file has an existing <pages> element in it (it looks like what's below).  So, to remove the CommerceBuilder.Utility namespace, you would want to add the part shown in bold below.

<pages enableSessionState="false" enableViewStateMac="true" enableEventValidation="true">
    <namespaces>
        <remove namespace="CommerceBuilder.Utility" />
    </namespaces>

    <controls>
        <add namespace="Controls" tagPrefix="blog"/>
    </controls>
</pages>

After adding that <namespaces> section as shown above, what error message are you getting?  It's possible there may still be other namespaces that need to be removed.  In that case, you'll hopefully get an error message with those other namespaces in the message like you did with this namespace.
Apr 20, 2009 at 4:52 PM

Thanks for the input. I understood that they were two seperate solutions.

so here is where I am at with the namespace removal solution:

1. When I added the code remove  <remove namespace="CommerceBuilder.Utility" />  another error would pop up with a differnet namespace. so I continued this process and ended up with a list of  17 all starting wiht commerce.builder

2. Now I get the following error:

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 'CommerceBuilder.Services' or one of its dependencies. The system cannot find the file specified. (d:\hosting\dynamiinternational\silversentimentscom\web.config line 111)

Source Error:

Line 109:		<httpModules>
Line 110:			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 111: <add name="AbleCommerceHttpModule" type="CommerceBuilder.Services.AbleCommerceHttpModule, CommerceBuilder.Services"/>Line 112:		</httpModules>
Line 113:		<authentication mode="Forms">

Coordinator
Apr 20, 2009 at 6:50 PM
We're making progress :)

The error you're seeing now is one I've seen more often than the first one you were getting -- but they're basically the same thing.  You've been removing namespace declarations in your BE web.config file.  Now there are some HttpModules that need to be removed to.  There might even be some HttpHandlers as well.  To remove the HttpModule you're seeing an error about now, in the <httpModules> section, you'll want to add:

<httpModules>
   <remove name="AbleCommerceHttpModule"/>
   ....  existing modules ....
</httpModules>
Apr 20, 2009 at 7:01 PM
Getting there. Next error ( is this a handler?):

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 'CommerceBuilder.Paypal' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 103:			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
Line 104:			<!-- AJAX -->
Line 105: <add verb="*" path="ProcessPayPal.ashx" type="CommerceBuilder.Payments.Providers.PayPal.IpnProcessor, CommerceBuilder.Paypal"/>Line 106:			<add verb="*" path="Captcha.ashx" type="CommerceBuilder.Web.CaptchaGenerator, CommerceBuilder.Web"/>
Line 107:			<add verb="GET" path="WebChart.axd" type="WebChart.CachedImageService, WebChart"/>
Coordinator
Apr 20, 2009 at 7:07 PM
Yes, it's a handler.  To remove it, you might just need to specify the 'path', but it doesn't hurt to be more thorough:

<httpHandlers>
    <remove verb="*" path="ProcessPayPal.ashx"/>
    .... existing handlers .....
</httpHandlers>
Apr 20, 2009 at 7:12 PM
okie dokie...

ended up removing 3 handlers. Now 

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: Theme 'AbleCommerce' cannot be found in the application or global theme directories.

Source Error:

Line 34: 	<system.web>
Line 35: 		<customErrors mode="Off"/>
Line 36: <pages theme="AbleCommerce" enableEventValidation="false" validateRequest="false">Line 37: 			<controls>
Line 38: 				<!-- AJAX -->
Coordinator
Apr 20, 2009 at 7:16 PM
I *think* just setting a blank (empty string) theme attribute in the BE web.config file will work:

<pages enableSessionState="false" enableViewStateMac="true" enableEventValidation="true" theme="">
Apr 20, 2009 at 7:22 PM
ok so I added that little bit to that existing code and now the following:

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 'Validators, Version=1.0.0.0' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 68: 			</namespaces>
Line 69: 			<tagMapping>
Line 70: <add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="Sample.Web.UI.Compatibility.CompareValidator, Validators, Version=1.0.0.0"/>Line 71: 				<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="Sample.Web.UI.Compatibility.CustomValidator, Validators, Version=1.0.0.0"/>
Line 72: 				<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="Sample.Web.UI.Compatibility.RangeValidator, Validators, Version=1.0.0.0"/>

Coordinator
Apr 20, 2009 at 7:24 PM
<pages enableSessionState="false" enableViewStateMac="true" enableEventValidation="true" theme="">
    <namespaces>
       .... existing ....
    </namespaces>
    <controls>
        <add namespace="Controls" tagPrefix="blog"/>
    </controls>
    <tagMapping>
        <remove tagType="System.Web.UI.WebControls.CompareValidator"/>
    </tagMapping>

</pages>
Apr 20, 2009 at 7:49 PM

Removed 8 tagmapping items.... now

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 type 'CommerceBuilder.Web.UI.WebControls.DynamicSiteMapProvider'.

Source Error:

Line 120:				<add name="StoreSiteMap" type="System.Web.XmlSiteMapProvider" siteMapFile="~/Web.sitemap"/>
Line 121:				<add name="AdminMenuMap" type="System.Web.XmlSiteMapProvider" siteMapFile="~/Admin/menu.sitemap" securityTrimmingEnabled="true"/>
Line 122: <add name="AdminBreadCrumbsMap" type="CommerceBuilder.Web.UI.WebControls.DynamicSiteMapProvider" siteMapFile="~/Admin/breadcrumbs.sitemap" securityTrimmingEnabled="false"/>Line 123:			</providers>
Line 124:		</siteMap>

Coordinator
Apr 20, 2009 at 7:54 PM
There's a <siteMap> section in the BE web.config file.  We just need to remove these other sitemaps defined in the parent application.

<siteMap defaultProvider="PageSiteMap" enabled="true">
    <providers>
        <remove name="AdminBreadCrumbsMap"/>
        .... existing providers ....
    </providers>
</siteMap>
Apr 20, 2009 at 8:18 PM

Survey Says......ding ding ding... It works... yeah haw!!!

You rock! I am so psyched becasue I have reaed some positive things about this blog and I am looking forward to using it.


thank you so much for your help.

Oh this may sound like a stupid question, but does anything i posted here pose any type of security issue for the site? Or is it pretty benign?

Coordinator
Apr 20, 2009 at 8:33 PM
Edited Apr 20, 2009 at 8:34 PM
That's great to hear.

No, there shouldn't be any security issues.  The parent application was using some of those extra functions and features.  All those features are probably defined in the parent application's web.config file.

The BE application was inheriting the settings to use those features, but because the blog is running as a separate web application, the various functionality for those features (possibly contained in DLLs and/or CS/VB files) isn't accessible to the blog.  So we just told the blog to not try and use those features since we don't need them, and the files for them aren't even available to the blog.

Hopefully new features like those aren't added to the parent application too often ... just because you might need to 'remove' them from the blog application like we've been doing.  Similarly, if you were to remove one of those features from the parent application, you would probably need to remove the "remove" tags for that feature that we've been adding into the blog's web.config file.  Otherwise the blog will complain that you're trying to remove something that wasn't already there.  Hopefully that's not too confusing!

Good luck.
Apr 20, 2009 at 8:46 PM
Not confusing at all. I am slowly evolving into a part time developer by osmosis.
You are right though. Nothing worse than a complaining blog, the close cousin of the ever polpular whining blog!