Deploying blogengine 2.5 to host

Jul 7, 2011 at 9:57 AM

Fresh install of blogengine 2.5 works fine on localhost, but as soon as I deploy on my host's servers I get errors.

1st/ I get I need to include a <customErrors> tag within the web.config file and

2nd/ when I include the above tag I get the following

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

<fieldset><legend>Detailed Error Information</legend>
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x800700b7
Config Error Config section 'system.web/customErrors' already defined. Sections must only appear once per config file. See the help topic <location> for exceptions
Config File \\?\C:\HostingSpaces\#####/###.####.com\wwwroot\web.config
Requested URL http://###.####.com:80/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
</fieldset>
<fieldset> <legend>Config Source</legend>
   96: 		</pages>
97: <customErrors mode="RemoteOnly" defaultRedirect="~/error.aspx" redirectMode="ResponseRewrite">
98: <error statusCode="404" redirect="~/error404.aspx"/>
</fieldset>

any help please to help me identify the problem.. thanks

Coordinator
Jul 7, 2011 at 10:46 AM

I would check the web.config file to make sure you don't have a 2nd <customErrors> tag.  By default, the BE 2.5 includes a <customErrors> tag.  So I'm wondering if you added a 2nd one.

Jul 7, 2011 at 11:17 AM

Hi BenAmada, thanks for looking at this for me.

It did have a second tag and without it I was getting the 1st error;

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

 

If I change "RemoteOnly" to "off" I then get another error:

Exception Details: System.Web.HttpException: Failed to start monitoring changes to 'C:\Hostingspace\####\#####.######.com\wwwroot\bin' because access is denied.

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: 

[HttpException (0x80070005): Failed to start monitoring changes to 'C:\Hostingspace\####\#####.######.com\wwwroot\bin' because access is denied.]
System.Web.DirMonCompletion..ctor(DirectoryMonitor dirMon, String dir, Boolean watchSubtree, UInt32 notifyFilter) +8805117
System.Web.DirectoryMonitor.StartMonitoring() +41
System.Web.DirectoryMonitor.StartMonitoringFileWithAssert(String file, FileChangeEventHandler callback, String alias) +159
System.Web.FileChangesMonitor.ListenToSubdirectoryChanges(String dirRoot, String dirToListenTo) +235
System.Web.FileChangesMonitor.StartMonitoringDirectoryRenamesAndBinDirectory(String dir, FileChangeEventHandler callback) +422
System.Web.HttpRuntime.StartMonitoringDirectoryRenamesAndBinDirectory() +75
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +98

[HttpException (0x80004005): Failed to start monitoring changes to 'C:\Hostingspace\####\#####.######.com\wwwroot\bin' because access is denied.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8950644
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256

 

I made sure that the file of the site I uploaded had write access and not sure now where the problem resides with 2.5, my hosts or me.

Thanks for any pointers

 

 

Coordinator
Jul 8, 2011 at 8:57 AM

The problem here is with insufficient folder permissions on the BIN directory.  ASP.NET (not BE.NET) needs to have some minimum permissions, which I believe includes read-only permissions to certain directories such as the BIN directory.  You can see this error message with some fixes at the link below.  I say "fixes", but really the only fix as far as I know is to add more folder permissions.

http://www.google.com/search?q=System.Web.HttpException%3A+Failed+to+start+monitoring+changes+to+bin