My company supports a very old DNN4 site. I am attempting to get a local copy running on my Windows 8 computer so that I can test a set of changes requested by the client.
I have added the site to my Default web site in IIS, and have given the site it's own app pool:
When I try to browse to the site to actually install it, however, I get this error (which looks to be complaining about the handlers section of the web.config).
full error text
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070021
Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Config File \\?\C:\Users\Public\dnn4\web.config
Requested URL http://localhost:80/dnn4
Physical Path C:\Users\Public\dnn4
Logon Method Not yet determined
Logon User Not yet determined
Config Source:
75: </modules>
76: <handlers>
77: <add name="AJAX_ScriptResourceHandler" path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv2.0" />
You really shouldn't setup the site under your USERS folder, I would recommend you do it outside of the Users folder in a folder that won't have restrictive permissions.
Related
I am migrating Asp.net 2.0 web application from Windows Server 2003 to Windows Server 2012. I am getting following error in Windows Server 2012.
“HTTP Error 500.19 - Internal Server Error”.
Config Error: Unrecognized attribute 'enableCompression'
Error Code: 0x8007000d
Problem is in the following configuration element.
<add name="ScriptResource" enableCompression="false" preCondition="integratedMode"
verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
When I remove the attribute enableCompression="false" the error is gone and even the ajax functionalities are working fine. Why is the attribute throwing error in Windows Server 2012 and what can we do to make it working in Windows Server 2012?
Application Pool setting is listed below.
Indeed, in looking at the official IIS documentation, it appears that the "enable compression" attribute does not exist for the "add" element of the handlers collection:
https://www.iis.net/configreference/system.webserver/handlers/add
This would explain the error, and why removing the "enable compression" attribute results in no further issues.
The truth is that you do not need this attribute any longer. If your application is working without it, then you are good to go. All this tag would do in ASP 2.0 is compress the javascript for a small performance gain in transferring the script to the client. If your javascript filesize is minimal, then this is a very negligible gain.
More importantly, notice that your original code calls enable compression = false. That means the original code had explicitly disabled compression for some reason. The default modern behavior would disable compression as well. Therefore, your new code is behaving the same without the attribute as the original did, with respect to compression.
Finally, the modern method of enabling compression / caching for javascript embedded as assembly resources is to utilize the scriptResourceHandler Element.
Example:
<scriptResourceHandler
enableCompression="true|false"
enableCaching="true|false" />
See the MSDN documentation here: https://msdn.microsoft.com/en-us/library/vstudio/bb513840(v=vs.100).aspx
I went to Framework4.0 and ran aspnet_regiis -i but it didn't change a thing
In inetmgr I went to isapi and web restrictions and set everything to allow.
Perhaps a clue to the problem might be that the file handler which is not registered is a .aspx file.
It stopped working without me changing anything.
The page launched in my browser from VS2013 is http://localhost:2562/Default.aspx
Perhaps some additional info might do:
Detailed Error Information:
Module IIS Web Core
Notification MapRequestHandler
Handler Not yet determined
Error Code 0x80070002
Requested URL http://localhost:2562/Default.aspx
Physical Path C:\temp\ASP.Net\Doratletica\Default.aspx
Logon Method Anonymous
Logon User Anonymous
Request Tracing Directory C:\Users\parena\Documents\IISExpress\TraceLogFiles\DORATLETICA
Try to add the following to system.web.compilation section of your web.config:
<compilation debug="true" targetFramework="4.5.2">
<buildProviders>
<add extension=".aspx" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>
There are two websites under the Default Web Site in IIS 6. The same code is deployed to both. An asp.net 4.0 web application with an httphandler.
On both websites the the mappings in the configuration settings are added.
The web.config files for both are also configured.
<handlers>
<add name="CAHandler" verb="*" path="*.handler" type="Namespace.CAHandler" />
<add name="CAHandler2" verb="*" path="calink.dll" type="Namespace.CAHandler" />
</handlers>
On the one website the handler returns "The connection was reset. The connection to the server was reset while the page was loading." error. Firefox error message.
Only difference i see with websites on IIS is the working one has the option - Under the directory tab - The content for this source should come from options, the working site has "The designated directory" option selected and a relative path to folder.
The non working one has "A directory located on this computer" and the path is absolute.
Please help.
I was hosting published site in IIS 7 on Windows 7 installed machine.
I had done setting for .NET framework version, Security Options but got Error as shown below
HTTP Error 500.19 - Internal Server
Error
The requested page cannot be accessed
because the related configuration data
for the page is invalid. Detailed
Error Information Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x800700b7
Config Error There is a duplicate
'system.web.extensions/scripting/scriptResourceHandler'
section defined
Config File
\?\D:\inetpub\wwwroot\KDAHCSSD\web.config
Requested URL
http://localhost:80/KDAHCSSD/frmLogin.aspx
Physical Path
D:\inetpub\wwwroot\KDAHCSSD\frmLogin.aspx
Logon Method Not yet determined
Logon User Not yet determined
Config Source 13:
sectionGroup name="scripting"
type="System.Web.Configuration.ScriptingSectionGroup,
System.Web.Extensions,
Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"
14: section
name="scriptResourceHandler"
type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions,
Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"
requirePermission="false"
allowDefinition="MachineToApplication"/
15: sectionGroup
name="webServices"
type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions,
Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"
Links and More InformationThis error
occurs when there is a problem reading
the configuration file for the Web
server or Web application. In some
cases, the event logs may contain more
information about what caused this
error.
View more information »
How to solve this. What will I need to do?..
Assuming you are running a .Net 4 site, the machine.config will already have defined the scriptResourceHandler. Remove this section from the web.config and you should be fine.
EDIT: Just noticed you say you are running 3.5 and so shouldn't happen, but try removing that section and see if it works.
This can also occur if your application is compiled against the .NET 2.0 CLR and you're trying to run it in a .NET 4.0/4.5 application pool.
If that's the case (as it was for me), switching to the correct app pool solves the problem.
I have just moved a site from a Windows 2003, IIS6 SQL 2005 server to a new one with Windows 2008, IIS7 and SQL 2008.
I am having problems with the Report Viewer.
I have installed the Report Viewer Re-distributable (I've tried 2005, 2005sp, 2008 and 2008sp)
I've Mapped a handler in IIS for
Reserved.ReportViewerWebControl.axd
to type
Microsoft.Reporting.WebForms.HttpHandler,
Microsoft.ReportViewer.WebForms,
Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a
However whenever I run a report on the website I get the following error message:
Could not load type 'Microsoft.Reporting.Microsoft.Reporting.WebForms.HttpHandler' from assembly 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
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.TypeLoadException: Could not load type 'Microsoft.Reporting.Microsoft.Reporting.WebForms.HttpHandler' from assembly 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
I am stumped. Any ideas?
I think you need to map to version 9.0.0.0 and not 8.0.0.0
you need to sure this setting should be in your live server web.config
<compilation debug="true">
<assemblies>
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</buildProviders>
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
</httpHandlers>
If you are running under IIS 7 it is worth checking the handler also has permission to execute.
After setting mine up I could see the handler was just throwing a 500 exception, on closer inspection it seems just adding the handler to the list is not enough. You must also edit its permission becuase by default it is not allowed to execute. Ticking the box to let it execute, and solved my problem immediately.
Also might be worthwhile trying this if any of the other suggestions here don't work -
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/0152bb52-988d-43f5-9c3d-8d33512f46de/
"There were a number of problems with the Transition to IIS 7.
Considerable debugging was required.
FIRST ISSUE RESOLVED: Directory permissions for the IIS 7 application
pool identity (the default was Network Service) needed to be added so
that the IIS application pool could have access to the physical path
of the Website directory.
SECOND ISSUSE RESOLVED: A line needed to be added to the ASP.Net
application web.config file. Child of After
Added:
THIRD ISSUE RESOLVED The Default App pool upon install has .Net
Framework 2.0 as default. This was fine. The Default App pool setting
for Managed Pipeline Mode needed to be changed from 'Integrated'
(default) to 'Classic', this was the quick fix to keep my app running
as it had on IIS 6."
Changing managed pipeline mode to "classic" fixed it for me.
Looks like this issue has been resolved for a while now, but for anyone searching:
Note the assembly being referenced in the error:
Microsoft.Reporting.Microsoft.Reporting.WebForms.HttpHandler
It should just be Microsoft.Reporting.WebForms.HttpHandler - how we both ended up with that in our web.config is suspicious, but may have something to do with manually creating the handler in IIS and letting IIS write the handler key to the app's web.config (now of course I can't reproduce it).
For anyone moving to IIS7, bear in mind that the handler mapping now lives in <system.webServer> <handlers> and not <system.web> <httpHandlers> as it was in earlier versions. IIS7 will ignore the old httpHandlers section but you may be checking the settings there out of habit and getting frustrated that your settings aren't taking effect.
Just include CommanClassLibrary.dll in your project's Bin Folder and make sure on aspx page and config file your ReportViewer Web Control version should be same