I am trying to get an application (that I didn't develop) running on a windows 2008 r2 64-bit server running IIS 7.5.
I am getting the above stated error - here are more details -
The requested page cannot be accessed because the related configuration data for the page is invalid
Error Code 0x8007007e
I know that the server can access the web.config, because if I make changes to it, the error code changes.
I also know that it is a correct web.config, because it is running successfully on a different server with the same file.
Does anyone have any idea what might be causing this. The error message I am getting really doesn't tell me anything.
I have tried using FailedRequestTracing, but either I don't know how to read those logs or there is no more information there. There are also no errors in the event logs on the server.
Where else can I look to get a better idea of what is happening?
Thanks for any thoughts....
EDIT - Here is the web.config. As I said earlier, it is strange that it is working on another server. I checked to ensure are referenced assemblies are available (as according to the page here, it appear that may be the problem) in the gac.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\temp\;deleteAfterServicing=false;" />
</appSettings>
<connectionStrings>
<!-- removed for this post -->
</connectionStrings>
<system.data>
<DbProviderFactories>
<!--<add name="IBM Informix .NET Data Provider 3.0.0" invariant="IBM.Data.Informix.3.0.0" description="IBM Informix Data Provider 3.0.0 for .NET Framework 2.0" type="IBM.Data.Informix.IfxFactory, IBM.Data.Informix.3.0.0, Version=3.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/>-->
</DbProviderFactories>
</system.data>
<system.web>
<httpRuntime maxRequestLength="8192" />
<customErrors mode="Off" />
<sessionState timeout="360" />
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<namespaces>
<clear />
</namespaces>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /></assemblies></compilation>
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
</httpHandlers>
</system.web>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="5000000" />
</webServices>
</scripting>
</system.web.extensions>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="ChartImageHandler" />
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
<defaultDocument>
<files>
<add value="index.aspx" />
</files>
</defaultDocument>
<tracing>
<traceFailedRequests>
<add path="*.aspx">
<traceAreas>
<add provider="ASP" verbosity="Verbose" />
<add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" />
<add provider="ISAPI Extension" verbosity="Verbose" />
<add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI" verbosity="Verbose" />
</traceAreas>
<failureDefinitions timeTaken="00:00:00" statusCodes="400-600" />
</add>
</traceFailedRequests>
</tracing>
</system.webServer>
</configuration>
It's a bit cheaty, but Microsoft has a page specifically about this problem ... and myriad suggestions for fixing it. Have you gone through it yet?
http://support.microsoft.com/kb/942055
Try this http://windowslivehelp.com/thread.aspx?threadid=3dd85141-a45d-44d9-a94c-3c7d13cfcd5c
I was able to get past this error by disabling compression that is applied by having wsus on the server.
See details here.
Thanks for everyone's help.
Related
I am new with ASP.NET MVC and just started playing around with it. I am building a test project on my desktop and publish it on the Development Server (IIS). After I published on IIS server and I received this error below:
Compiler Error Message: CS0433: The type 'System.Web.Mvc.WebViewPage<TModel>' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\test2_aspx_datatableeditable\8a6a3e30\832ace90\assembly\dl3\264e4d37\00038593_07d9cf01\System.Web.Mvc.DLL' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.Mvc\v4.0_3.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll'
I then read different posts related to that error above and some suggested to remove the this statement below in the Web.Config file. After I removed the code below, it worked fine.
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Now, the problem is that every time I made some updates and publish from VS-2014, it overrides the web.config file, and then I have to remove the line of code in the web.config again in order for it to work. I also tried to Right-Click the web.config file and set Build Action to None, but it didn't seem to work either.
I really don't want to go to the Output folder and keep remove the code line above in the web.config every time I publish it. Is that anyway to NOT override the destination web.config only?
Thanks in advance,
Below is my simple web.config. Please help with a sample code if web.config transform is a best option.
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=152368
-->
<configuration>
<appSettings>
<add key="ClientValidationEnabled" value="true"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
</appSettings>
<system.web>
<compilation targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<!--<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />-->
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages"/>
</namespaces>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Good Morning,
We have an existing application that is stable and error free on a Windows Server 2008R2 with IIS 7.5 / .NET 4.5.
We are planning a move to Windows Server 2012R2 with IIS 8.5 / .NET 4.5 and are now encountered the problem that the application (identical binaries / configuration) are indeed injected two ScriptResource.axd files, but both contain the same content (different URLs).
Because of this, the MicrosoftAjaxWebforms.js, which provides "Sys.WebForms" is missing and i'm getting the Error
Unable to get property 'PageRequestManager' of undefined or null reference
The problem is browser Independent on two independent virtual machines.
The application runs in classic mode, the web.config does not contain the < xhtmlConformance > tag.
There are all the latest server updates.
All other functionalities of the application are working properly.
I hope some of you encountered the same Problem and know the solution.
Greetings, Verni
EDITH:
Snippet of web.config (system.web section)
<system.web>
<httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="" targetFramework="4.5" enableVersionHeader="false" />
<sessionState timeout="30" mode="StateServer" stateConnectionString="tcpip=...:42424" />
<httpModules>
<add name="LinkPartnerModule" type="....LinkPartnerModule, ..." />
<add name="RedirectModule" type="....RedirectModule, ..." />
<add name="ScriptCompressorModule" type="ScriptCompressorModule, ..." />
</httpModules>
<httpHandlers>
<remove verb="*" path="scriptresource.axd"/> // added from StackOverflow
<add verb="*" path="*js.axd" type="ScriptCompressorHandler" />
</httpHandlers>
<compilation debug="false" defaultLanguage="c#" targetFramework="4.5">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Services.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<globalization culture="de-DE" enableClientBasedCulture="true" fileEncoding="utf-8" uiCulture="de" />
<pages compilationMode="Auto" styleSheetTheme="*" validateRequest="false" enableEventValidation="false" controlRenderingCompatibilityVersion="3.5" enableViewState="true" clientIDMode="AutoID">
</system.web>
<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="true" enableCaching="true" />
</scripting>
</system.web.extensions>
We had this issue as well for an application running in classic mode. The issue that time turned out to be multiple httphandlers registered for the .axd extension.
If you in your web.config make sure to remove any .axd handler before adding them it might resolve your issue.
Something like:
<remove verb="*" path="scriptresource.axd"/>
Edit:
When looking at your web.config I'm pretty sure the problem is related to the scriptcompressorhandler and module. As you stated this only happens using HTTPS and I suspect that what happens is that the module still runs over HTTPS but the handler does not. This means that the module sends the compressed version over to the regular scriptresource handler and a new copy of the script is outputted.
The solution would be to either activate scriptcompressorhandler over HTTPS as well or make sure the module is not run over HTTPS.
I fixed the Problem.
The reason was an misconfigured ARR (Application Request Router),
where SSL-Offloading was active.
The main reason of misconfiguration was the "function" that activates SSL-Offloading if no URL-Rewrite Rule is there with name like 'ARR_farmName_loadbalance_SSL'.
If this Rule will be deleted, the manager activates SSL-Offloading automatically.
Thanks to Robban, who brought me to HTTPS / SSL.
I I have deployed a website on Server,in the developement phase I was working fine , but when I deployed it on server it shows 404 error
When I write actual aspx page name on server it shows page.. but in case of virtual page name it through an error
www.example.com/welcome.aspx is fine
but
www.example.com/Welcome is invalid.
can you examine my configuration file and let me know where exactly I am wrong.
Thanks..
<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="UrlRoutingModule"/>
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</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>
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="ConString" connectionString="Server=********;Database=***;uid=***********;pwd=*************" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<customErrors mode="On" defaultRedirect="Error" redirectMode="ResponseRedirect"></customErrors>
<httpModules>
<add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader" />
</httpModules>
</system.web>
</configuration>
Please i have been seeing this error:
The connection name 'SQL' was not found in the applications
configuration or the connection string is empty. 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.
I know for a fact that the connection name "SQL" exists and it works properly on my local machine.
I started seeing this error after i fixed this other error on my deployment server:
Compiler Error Message: BC31007: Unable to open module file
'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
by setting up the access rights as suggested here
Please i would appreciate any help on this.
thanks!
Deployment Environment : Windows Server 2003, .net 4.0
Development Environment: Widows 7, .net 4.0
Please note: The deployed application has been working perfectly well on site, for over 3 months up till last Friday evening.
The client claims nothing on the server or in their environment has changed.
My Web Config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="LoginMode" value="2" />
<add key="CustomeModules" value="True" />
<add key="TopCallersRefeshInterval" value="600" />
<add key="OperatorAccountName" value="" />
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=C:\TempImageFiles\;"/>
</appSettings>
<connectionStrings>
<add name="SQL" connectionString="server=.\SQL2008;database=xxxxxx;uid=xxxxxx;pwd=xxxxxxxxxx;" providerName="System.Data.SqlClient" />
<add name="SQLCustom" connectionString="server=.\SQL2008;database=xxxxxx;uid=xxxxxx;pwd=xxxxxxxxxx;" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<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>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
</pages>
<compilation debug="true" targetFramework="4.0" explicit="true">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /></assemblies>
</compilation>
</system.web>
<system.webServer>
<defaultDocument>
<files>
<remove value="login.aspx" />
<remove value="iisstart.htm" />
<remove value="default.aspx" />
<remove value="index.html" />
<remove value="index.htm" />
<remove value="Default.asp" />
<remove value="Default.htm" />
<add value="home.aspx" />
</files>
</defaultDocument>
<handlers>
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
</system.webServer>
</configuration>
But, are you trying to connect to the remote database (i.e., the database on the deployment server) or to a local database.
Maybe somebody has touched the access privileges to the database...
By the way, how did you fixed the original error?
Delete every file(s) with .config format i.e. "web.user.config" but "web.config".
I hope it's help :)
Clear out the temp folder on your server. Recompile, redeploy and see if that fixes it for you. Also:
<connectionStrings>
<clear />
<remove name="SQL"/>
<add name="SQL"
connectionString="server=.\SQL2008;database=xxxxxx;uid=xxxxxx;pwd=xxxxxxxxxx;"
providerName="System.Data.SqlClient" />
.....
</connectionStrings>
If that does not work, try a remote debugging session:
How to: Set Up Remote Debugging
Try adding </clear> under your connection strings in web.config
connectionStrings>
<clear />
<add name="SQL" connectionString="server=.\SQL2008;database=xxxxxx;uid=xxxxxx;pwd=xxxxxxxxxx;" providerName="System.Data.SqlClient" />
.....
</connectionStrings>
I just created a new project in MVC3 using EF4 code first deployed on Windows Azure.
I want to keep my "web.config" file as clean as possible because it's a little complicated to understand all tags it contains.
I notice two sections: <system.web> and <system.webServer>
The first is for IIS6 and the second for IIS7+
I do not need backward compatibility so want to delete the first.
I converted a good part of the first into the second, but I cannot find how to convert these sections:
<system.web>
<authentication mode="None" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Helpers, Version=2.0.0.0, Culture=neutral />
<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral />
<add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral />
<add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral />
</assemblies>
</compilation>
<pages validateRequest="false">
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
</system.web>
How to do this so that I can delete the deprecated <system.web>?
Not all of the elements are deprecated. The two most important sections are /system.web/httpHandlers which has moved to /system.webServer/handlers and /system.web/httpModules which is now /system.webServer/modules. You shouldn't need to touch the above configuration any further as the elements within are still part of the system.web element even in IIS7. Have you tried running your site after your changes?