This project is read-only.

Error with root web.config - Network Solutions setup

Topics: ASP.NET 2.0
Dec 15, 2009 at 3:31 PM

We have a custom build site that loads  products from the database, does url rewriting,etc...   We recently moved to Network Solutions hosting and are now wanting to do some blogging and had the NS account install BlogEngine.NET into a folder called 'toolkit'.   Now when we go to that folder ( an error arises.   When I changed the /toolkit/web.config to be <customErrors mode="Off" /> the error it displays is:

Configuration Error
Parser Error Message: Could not load type 'Sample.SampleSqlInjectionScreeningModuleVB'.

and points to the line: 

 <add name="SampleSqlInjectionScreeningModuleVB" type="Sample.SampleSqlInjectionScreeningModuleVB"/>

if I comment out this line it then is the same error but moves to the next line.  Is it possible to run BlogEngine.NET with other .net applications?  Any thoughts on how to get it to work?


<?xml version="1.0"?>
    <section name="rewriter"
    type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />

		<add key="EMAIL-FROM" value=""/>
    <add key="EMAIL-FROM-DNS" value=""/>
		<add key="EMAIL-SMTP" value="localhost"/>
		<add key="EMAIL-SAVE-EMAILS" value="0"/>
		<add key="EMAIL-LOG-FILE" value="email_log.txt"/>
		<add key="EMAIL-ADMIN" value=""/>
		<add key="MACKey" value="6cd3f73a-870b-415b-9d74-058a74781dde" />
		<clear/><!-- this removes the inherited connectionstring -->
     <add name="DB" connectionString="server=xxxx;uid=uuu;pwd=ppp;database=nameofdb"/> 

            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.

            Visual Basic options:
            Set strict="true" to disallow all data type conversions 
            where data loss can occur. 
            Set explicit="true" to force declaration of all variables.
    <compilation debug="false" strict="false" explicit="true" batch="false" />
        <add namespace="System"/>
        <add namespace="System.Collections"/>
        <add namespace="System.Collections.Specialized"/>
        <add namespace="System.Configuration"/>
        <add namespace="System.Text"/>
        <add namespace="System.Text.RegularExpressions"/>
        <add namespace="System.Web"/>
        <add namespace="System.Web.Caching"/>
        <add namespace="System.Web.SessionState"/>
        <add namespace="System.Web.Security"/>
        <add namespace="System.Web.Profile"/>
        <add namespace="System.Web.UI"/>
        <add namespace="System.Web.UI.WebControls"/>
        <add namespace="System.Web.UI.WebControls.WebParts"/>
        <add namespace="System.Web.UI.HtmlControls"/>
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
    <authentication mode="Windows"/>
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />

		 <customErrors mode="On" defaultRedirect="404error.htm"  />
          This section sets the globalization settings of the application. 
		<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
    <!-- Tell ASP.NET to use the RegEx URL Mapping HTTP Module -->
      <add name="SampleSqlInjectionScreeningModuleVB" type="Sample.SampleSqlInjectionScreeningModuleVB"/>
      <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />

    <modules runAllManagedModulesForAllRequests="true">
      <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />

    <validation validateIntegratedModeConfiguration="false" />

    <rewrite url="~/.*_p_(\d+).aspx(\?bc=(.+))?" to="~/product.aspx?id=$1&amp;bc=$3"/>
    <rewrite url="~/*_s_(.+).aspx" to="~/product-listing.aspx?id=$1&amp;cd=s"/>
    <rewrite url="~/*_c_(.+).aspx" to="~/product-listing.aspx?id=$1&amp;cd=c"/>
    <rewrite url="~/*_b_(.+).aspx" to="~/product-listing.aspx?id=$1&amp;cd=b"/>
    <rewrite url="~/*_n_(.+).aspx" to="~/product-listing.aspx?id=$1&amp;cd=n"/>
    <rewrite url="~/artificial-plant-case-studies_(.*)_(.*).aspx" to="~/case-study-listing.aspx?id=$2"/>
    <rewrite url="~/artificial-plant-case-study_(.*)_(.*).aspx" to="~/case-study.aspx?id=$2"/>
    <rewrite url="~/cad-specs_([a-zA-Z0-9]{1,100}).aspx" to="~/request-downloads.aspx?cd=$1"/>


				<network host="localhost" port="25" userName="" password="" defaultCredentials="true"/>


Dec 24, 2009 at 11:51 AM

A different forum found the solution.   Since my root web.config has httpmodule and so does the subfolder, to get the subfolder to not use the root you have to enter the <clear /> tag in the subfolder httpmodule section.   I was able to see the site after I entered this.   Now I just can see where you make a post.