Note that there are some explanatory texts on larger screens.

plurals
  1. POweb.config that came with application will not work on shared host
    text
    copied!<p>I am pretty new to ASPX .NET web stuff (and I consider myself pretty good at figuring out stuff when it comes to the open source alternatives)</p> <p>Am I missing something about web.config files? I created an ASPX application in Visual Studio 2012, which generates its own web.config. I add one simple form, that works locally, but when I push the project to my shared hosting site (arvixe) I receive 501 internal server. That's okay because I didn't customize my default web.config file - So I delete my web.config file and let the domain automatically create it (The arvixe control panel automatically makes a generic one if none are present when you go into the settings for that website). Voila, my simple ASPX application works with the arvixe provided web.config, but not my own. That's okay.. but</p> <p>I have an ASPX application (SelectSurvey), that I would like to get running on my server as well (in a different directory of course). This application uses a very large customized web.config file and surely the application would break if I deleted it and let the web hosting default it. I've tried splicing in the code that is within the web host generated config file into the proper location in the customized one, and still no go.</p> <p>I understand the concept of what the web.config is doing, but I don't understand why it's not working.</p> <p>Here is web hosting generated, working web.config </p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;configuration&gt; &lt;system.webServer&gt; &lt;directoryBrowse enabled="false" /&gt; &lt;defaultDocument&gt; &lt;files&gt; &lt;clear /&gt; &lt;add value="Default.htm" /&gt; &lt;add value="Default.asp" /&gt; &lt;add value="index.htm" /&gt; &lt;add value="index.html" /&gt; &lt;add value="iisstart.htm" /&gt; &lt;add value="default.aspx" /&gt; &lt;/files&gt; &lt;/defaultDocument&gt; &lt;/system.webServer&gt; &lt;/configuration&gt; </code></pre> <p>Here is the default generated visual studio web.config that DOES NOT work</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;configuration&gt; &lt;configSections&gt; &lt;sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"&gt; &lt;sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"&gt; &lt;section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt; &lt;sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"&gt; &lt;section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/&gt; &lt;section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt; &lt;section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt; &lt;section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/&gt; &lt;/sectionGroup&gt; &lt;/sectionGroup&gt; &lt;/sectionGroup&gt; &lt;/configSections&gt; &lt;appSettings/&gt; &lt;connectionStrings/&gt; &lt;system.web&gt; &lt;!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --&gt; &lt;compilation debug="true"&gt; &lt;assemblies&gt; &lt;add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt; &lt;add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt; &lt;add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt; &lt;add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt; &lt;/assemblies&gt; &lt;/compilation&gt; &lt;!-- The &lt;authentication&gt; section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --&gt; &lt;authentication mode="Windows"/&gt; &lt;!-- The &lt;customErrors&gt; 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. &lt;customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"&gt; &lt;error statusCode="403" redirect="NoAccess.htm" /&gt; &lt;error statusCode="404" redirect="FileNotFound.htm" /&gt; &lt;/customErrors&gt; --&gt; &lt;pages&gt; &lt;controls&gt; &lt;add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt; &lt;add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt; &lt;/controls&gt; &lt;/pages&gt; &lt;httpHandlers&gt; &lt;remove verb="*" path="*.asmx"/&gt; &lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt; &lt;add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt; &lt;add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/&gt; &lt;/httpHandlers&gt; &lt;httpModules&gt; &lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt; &lt;/httpModules&gt; &lt;/system.web&gt; &lt;system.codedom&gt; &lt;compilers&gt; &lt;compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&gt; &lt;providerOption name="CompilerVersion" value="v3.5"/&gt; &lt;providerOption name="WarnAsError" value="false"/&gt; &lt;/compiler&gt; &lt;/compilers&gt; &lt;/system.codedom&gt; &lt;!-- The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS. --&gt; &lt;system.webServer&gt; &lt;validation validateIntegratedModeConfiguration="false"/&gt; &lt;modules&gt; &lt;remove name="ScriptModule"/&gt; &lt;add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt; &lt;/modules&gt; &lt;handlers&gt; &lt;remove name="WebServiceHandlerFactory-Integrated"/&gt; &lt;remove name="ScriptHandlerFactory"/&gt; &lt;remove name="ScriptHandlerFactoryAppServices"/&gt; &lt;remove name="ScriptResource"/&gt; &lt;add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt; &lt;add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt; &lt;add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt; &lt;/handlers&gt; &lt;/system.webServer&gt; &lt;runtime&gt; &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt; &lt;dependentAssembly&gt; &lt;assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/&gt; &lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/&gt; &lt;/dependentAssembly&gt; &lt;dependentAssembly&gt; &lt;assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/&gt; &lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/&gt; &lt;/dependentAssembly&gt; &lt;/assemblyBinding&gt; &lt;/runtime&gt; &lt;/configuration&gt; </code></pre> <p>And the one from the SelectSurvey application is even more large and complicated. I can paste that if need be.</p> <p>Like I said, I have tried adding </p> <pre><code>&lt;directoryBrowse enabled="false" /&gt; &lt;defaultDocument&gt; &lt;files&gt; &lt;clear /&gt; &lt;add value="Default.htm" /&gt; &lt;add value="Default.asp" /&gt; &lt;add value="index.htm" /&gt; &lt;add value="index.html" /&gt; &lt;add value="iisstart.htm" /&gt; &lt;add value="default.aspx" /&gt; &lt;/files&gt; &lt;/defaultDocument&gt; </code></pre> <p>within the system.webServer tags in the other web.config files that do not work and still no luck.</p> <p>Right now my project is very simple.. Only a few web forms and no database connection, so it isn't relying on anything inside the web.config. But I will need to start customizing it soon.</p> <p>Any help would be appreciated. Sorry If I am not clear with my issue. If there is anything else I can provide, let me know.</p> <p>Thanks, Mike</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload