I am developing a webapp in ASP.NET framework 3.5.2.
After draging the Chart Control from the toolbox to where I want it in my .aspx page, there seems to be this added at the top of the document:
<%# Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
When I run I get the error: "Error executing child request for ChartImg.axd."
I have tried adding the following into system.web in my Web.config
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
</httpHandlers>
Then I get:
HTTP Error 500.23 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
Most likely causes:
•This application defines configuration in the system.web/httpHandlers section.
It says that I can try to "Migrate the configuration to the system.webServer/handlers section".
How do I do this and how till it affect my webapp? Will something else stop working and is it possible to revert the migration?
With ASP.NET 3.5 projects where I got this error I went into IIS and changed the APplication Pool to run in Classic Managed Pipeline Mode rather than Integrated
To change this go to :IIS, go to Application Pools, Find the pool you're using and change it to Classic.
Related
My Website is working fine locally but got problem in making live.
Parser Error Message: Unknown server tag 'asp:ScriptManager'.
I googled this problem and find solution as...
<pages>
<controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls> </pages>
I did same but got error again.....
Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I have uploaded ajaxtoolkit in Bin folder???? Please help me out...
Most likely you haven't configure the right .net version. Check with your webhosting company or control panel to see what .net version your site is using. You can also try smarterasp.net, they let you set your own version via their control panel too.
I am getting error "load report failed" on server, it runs without error on localhost. I am using VS 2008 with .Net 3.5.
This is my code:
ReportDocument reportDocument = new ReportDocument();
String filePath = #"C:\abcSpaces\abc.com\xyz.com\wwwroot\Order Fulfilment.rpt";//full path
// I have tried OrderFullfilment.rpt and ~/OrderFullfilment.rpt and /OrderFullfilment.rpt
try
{
reportDocument.Load(filePath);
CrystalReportViewer1.ReportSource = reportDocument;
}
catch(Exception ex){
Label1.Text = ex.Message;
}
Aspx Page part:
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" Height="1291px"
ReuseParameterValuesOnRefresh="True" Width="1125px" />
^I have tried using
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="expenseRep_summary.rpt">
</Report>
</CR:CrystalReportSource>
with no luck off course...
my web.config section for referencing assemblies:
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="MySql.Data, Version=6.2.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
<add assembly="MySql.Data.Entity, Version=6.2.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
<add assembly="MySql.Web, Version=6.2.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
<add assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.Framework, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.InfoStore, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Data.AdoDotNetInterop, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.VSDesigner, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/></assemblies>
</compilation>
I have tried all of these solutions posted in stackoverflow:
CrystalReport Load report failed (no I can't change registry or re-install crystal reports, my site is hosted on external server)
load report failed (where the hell is objReport??)
I got the problem in Crystal Report- Error Messsage:Load report failed (I have no object reffering to Report class :S)
Load report failed when implementing crystal report in asp.net 3.5 (I tried this '~' technique + Absolute path and none works)
Load report failed in Windows server 2003 (I have set read write execute permissions to every file)
https://stackoverflow.com/questions/3337185/crystal-report-giving-load-failed-error (this guy like me, hasn't found the solution yet :P )
So please please please help me! Or my client will eat me alive...
I know this is an old post. but For anyone still looking for the answer:
You need to register crystal reports in page markup
<% # Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
Set the property 'Copy to Output Directory' of the report to 'Copy always'
the path of the file in the crystalreportsource will be ~/bin/YOURFOLDER/YOURFILE
<CR: CrystalReportSource ID ="CrystalReportSource1" runat ="server">
<Report FileName="~/bin/oilmovement/rptOMDayEnd.rpt">
</Report>
</CR: CrystalReportSource>
Now the report should work
select your application pool for your apllication or website
Click on Recycling (Right side panel)
Reduce the value of Regular time interval 1740 to 20 min or set your desire value you want
this will release any resource hold by iis.
restart iis.
hope this will fix your problem
http://littleprograming.blogspot.com/2013/02/crystal-report-error-load-report-failed.html
I have the same issue before and it seems you need to install the CR runtime on the server. Having just the DLL is not enough. Hope it helps.
I know that this is an old question, but today I had similar problem.
Reports were working locally but when deployed to server (IIS) I had the same error.
Try to add write/read permissions to %TEMP% for IIS User (process that creates reports).
Reports are generated in Temp and from there viewer is getting content that is displayed on site.
I also had that problem and after exhausting all other options changed the Application Pool setting Load User Profile from False to True, which resolved the problem.
This was on an application which has been deployed to dozens of IIS6, IIS7, IIS7.5 servers and we've never encountered the problem before. The App Pool was running with the identity Network Service (which it usually is) and I first tried giving permission to C:\windows\temp which did not work (although I didn't check if that really was the temp directory).
I suspect another solution may have been to add Network Service to the IIS_IUSRS group, but I didn't try that and didn't really want to do so in case it affected other apps on the server.
On of the most common reason can be, Crystal Report (*.rpt) files are not physically present in the target location, which might have left-out during build and publishing application
Solution:
Open Visual Studio, select all the CrystalReport.rpt files, right click to set Properties"
Build Action: Content (can also be Embedded Resource)
CopyToOutputDirectory: Always (can also be Copy if Newer)
I've run into a problem with WCF REST Service. I get:
Could not load type 'System.ServiceModel.Activation.HttpHandler' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
when running inside of the IIS in an ASP.NET 4.0 AppPool.
The problem seems to occur only if:
Running inside of IIS
When ASP.NET Comaptibility is enabled
Running in Cassini - no problem it works properly. Running with ASP.NET compatibility off - no problem it works.
It appears that it's some sort of handler version conflict trying to instantiate the wrong version of the handler that in turn tries to load an older version of System.ServiceModel, but I haven't been able to trace this down.
Anybody seen anything like this before and have any ideas how to track this down further?
I've looked in ApplicationHost.config and the master web.config files for System.ServiceModel and HttpHandler references but no luck. There.
+++ Rick ---
fire up your Visual Studio 2010 Command Prompt or browse to "C:\Windows\Microsoft.NET\Framework\ v4.0.30319". And run the following command from the command prompt:
aspnet_regiis.exe -iru
This will register latest .net version. Also make sure your app pool is running latest version of .net
So as expected this turned out to be a versioning conflict in the default handler mappings in ApplicationHost.config. Specifically IIS has mappings for ASP.NET 2.0 and ASP.NET 4.0 specific references to the service activation handler (and module) and the 2.0 references weren't restricted by a version specific preCondition.
To fix the above problem I had to change (at the System root in ApplicationHost.config):
<add name="svc-Integrated" path="*.svc" verb="*"
type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
preCondition="integratedMode" />
to:
<add name="svc-Integrated" path="*.svc" verb="*"
type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
preCondition="integratedMode,runtimeVersionv2.0" />
Note the EXPLICIT runtimeVersion2.0. There are additional *.svc maps in the same section for the runtimeVersion4.0 which then fire the appropriate runtimes.
According to Microsoft this situation can arise when some older tools (I'm guessing Azure tools???) are installed that don't register the runtime version properly.
Problem solved.
There is one more way if all of above doesn't work. (Strange)
We were using Windows Server 2008 R2 SP1 with IIS 7.5.7600
After registering latest framework as given in above answer,
You need to the add handler mapping to v.4.0 assembly manually to web.config and remove "ServiceModel" from Modules.
<system.webServer>
<handlers>
<remove name="svc-Integrated" />
<add name=".svc" verb="*" path="*.svc" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory,
System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
<modules>
<remove name="ServiceModel" />
</modules>
</system.webServer>
More here
I am trying to deploy a .Net framework 4 website on IIS7 server. I have already changed the application-pool's target framework to .Net 4, but the app is still showing me the error:
"The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration"
I am guessing that has something to do with the new feature of .Net4 that lets me have a compact Web config file. I think for some reason IIS7 is not happy with this.
What can I do to deploy this app successfully or do I have to scale back to v3.5? I am sure there is a solution out there.
Do you have any suggestions?
You can also get this very same error if you create a new website in IIS 7(.5) as the application pool it creates for the new site may still be set to 2.0, and as such, system.web.extensions is not valid in a 2.0 configuration file.
Simply go into IIS Manager, choose the application pools, select the one for your app, right-click, Advanced Settings and set .NET framework version to v4.
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070032
Config Error The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration
Config File \\web.config
The error is due to this system.web.extensions section added to the Web.config
<system.web.extensions>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter
<jsonSerialization maxJsonLength="1024000">
-->
</webServices>
<scriptResourceHandler enableCompression="true" enableCaching="true"/>
</scripting>
</system.web.extensions>
For some reason adding that section, overrides the system.web.extensions group. The solution is to
Comment the code above if you don't need it.
Add the code below to the Web.config section group
..
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
I could solve this issue myself after some hunting around (happens!).
apparently has nothing to do with the way the config file is structured, it is the assembly for ASP.Net Ajax which is not deployed on my target server but might be present on my dev machine.
I deleted the entry from the web.config file and this issue was resolved, there were some other minor issues but nothing worth mentioning.
The deployment experience for IIS7+.Net Framework 4 wasn't too difficult and the added capabilities will going to be worth it.
I found the answer from Leo Tang post:
This issue not caused by the web.config migration. If you update you application to .Net Framework4.0, but assign this application to an application pool running under .Net Framework3.5 or previous version, you will encounter this error.
You can assign this application to an .Net Framework4.0 application pool in IIS to fix issue.
So, if you read the error The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration it’s because the application you have deployed is running under an application pool configured to run under .NET 2.0 or 3.5 (DefaultAppPool? DefaultAppPool by default is set to .NET 2.0).
Perform the following steps:
Run IIS (exec 'inetmgr')
Select your application (probably 'Server\Sites\Default web site\Your application name' from the tree on the left panel)
Open your application settings (click 'Basic Settings' from 'Actions' the right panel) and look at the Application Pool.
Now choose the action that best fits your needs:
You can change the application pool for your application (button select in 'Application Edit' form, then choose 'ASP.NET v4-0 Classic'). This change will effect just this application
OR you can edit the application pool (probably Server\Application pools\DefaultAppPool rom the tree on the left) and set it to run under .NET Framevork v4.0 . Be careful: this change will effect every application under this Application Pool... is this what you want? maybe...
If "aspnet_regiis.exe -iru" don't help and you sure, that you try to launch site under .NET 4.0 App pool, it may be the problem in configuration inheritance of IIS 7.0. Web server reads machine.config of .NET 2.0.
Applying of hotfix KB958854 would solve the problem with configuration inheritance. I have successfully fixed my problem in this way.
It’s because you’ve deployed your application on to an IIS Server where the application’s AppPool is set to run under the DefaultAppPool. DefaultAppPool is automatically configured to run under .NET 2.0 rather than .NET 4.0. This means that the System.Web.Extensions stuff is unavailable to that version of the .NET Framework.
To change the Application Pool (AppPool) settings for your web application
1. Select the application directory
2. Under Actions, click Basic Settings…
3. Change the Application Pool to ASP.NET v4.0 (or another .NET 4.0 app pool) by clicking on the Select… button.
4. Click OK
Re-run your application and it should work.
Check this link for graphical demonstration.
I solved the issue by following below steps:
1. set application pool framework to 4.0
2. if point 1 wont work, then problem could be related to config inheritance.
Apply hotfix from http://support.microsoft.com/kb/958854
This should solve the issue.
We discovered problem when deploying MVC application on IIS7 server: any route navigation gives 404 error. I've found on web that problem can be solved by setting application pool managed pipeline mode to integrated, but now we have exception:
Request is not available in this context
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.Web.HttpException: Request is not available in this context
Source Error:
Line 19:
Line 20: public override void SetActiveUser(Guid userOid) {
Line 21: FormsAuthentication.SignOut();
Line 22: HttpContext.Current.Items[Key] = userOid.ToString();
Line 23: FormsAuthentication.RedirectFromLoginPage(userOid.ToString(), true);
Does anybody have any ideas?
The problem is probably in the web.config file. Since IIS7 there is now two places to configure handlers and modules. When you run in classic mode, is like running on IIS 6 (though under IIS7).
Here is the config file:
<system.web>
[...]
<httpHandlers>
[...]
</httpHandlers>
<httpModules>
[...]
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>
</system.web>
there should be only IIS 6 configurations.
IIS 7 config should be placed under:
<system.webServer>
[...]
<modules runAllManagedModulesForAllRequests="true" >
<remove name="UrlRoutingModule"/>
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers>
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
</system.webServer>
To glom onto what kvalcanti stated. The standard routing was designed for IIS 7. There is a kludge added for older versions of IIS. So, if you are deving on older versions, you have the kludged up version of the config file. Changing the config solves the issue.
In addition to what kvalcanti mentions, there is a possibility you have a bit of a kludge set up in your global.asax, as well. I am not sure it is still mandatory in the newest version of ASP.NET MVC, or not, as I have not deved on anything but Vista in the last few months.
This post has some insight:
http://www.developingfor.net/aspnet-mvc/deploying-aspnet-mvc-on-iis6.html
Scott Guthrie had a great blog post about this on his blog (http://weblogs.asp.net/scottgu/), but I don't have it bookmarked.
Open Nuget
Install NotFoundMvc
???
Profit