web-config

How is the order of execution for HttpModules determined?

∥☆過路亽.° 提交于 2019-12-18 10:49:12
问题 Suppose that both FirstModule and SecondModule handle the Application_BeginRequest event. Will it execute in the order defined in the web.config? <httpModules> <add type="MyApp.FirstModule, MyApp" name="FirstModule"/> <add type="MyApp.SecondModule, MyApp" name="SecondModule"/> <add type="OtherApp.OtherModule, OtherApp" name="OtherModule"/> </httpModules> Are there other ways that the order can be specified? 回答1: According to this forum post, HttpModules are executed in the order in which they

IIS Express is automatically disabling anonymous authentication for my project, why?

北城以北 提交于 2019-12-18 10:48:27
问题 When I switch my ASP.NET MVC project from Cassini web server to IIS Express, this is added to my applicationhost.config file: <location path="MyProject"> <system.webServer> <security> <authentication> <anonymousAuthentication enabled="false" /> <windowsAuthentication enabled="false" /> </authentication> </security> </system.webServer> </location> It's causing the site not to load with 401.2 - Unauthorized and I can't fix it on the Web.config level - it will then complain that the section is

ReplacableToken_ when using web.config transform?

十年热恋 提交于 2019-12-18 10:44:17
问题 I have a web.config with 2 transforms - for debug and release. web.config: <connectionStrings> <clear /> <add name="StrName" connectionString="data source=.\sqlexpress;User Id=sa;Password=pass;Database=SocialBot;" providerName="System.Data.SqlClient" /> </connectionStrings> I just copied the example given and replaced the name with StrName. I end up with : <add name="StrName" connectionString="$(ReplacableToken_SocialBotConnectionString-Web.config Connection String_0)" providerName="System

ASP.NET IIS Web.config [Internal Server Error]

拈花ヽ惹草 提交于 2019-12-18 10:39:35
问题 I changed PC / Windows (XP -> 7) so IIS (6 -> 7,5) and trying to move my website But I can't run my site from this server . . . error : Error description: Error HTTP 500.19 - Internal Server Error The requested page is not available because of incorrect configuration data for this page. Error Details Module IIS Web Core Notice BeginRequest Handler Not yet determined Error 0x80070021 Configuration error This configuration section can not be used in this way. This happens when the section is

Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http]

孤街醉人 提交于 2019-12-18 10:32:28
问题 I've been through several web site that suggest solution to this problem, but still I can't get rid of it. My WebConfig: <bindings> <webHttpBinding> <binding name="SecureBasicRest"> <security mode="Transport" /> </binding> </webHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="svcBehavior"> <serviceMetadata httpsGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="svcEndpoint">

Using ASPNet_Regiis to encrypt custom configuration section - can you do it?

筅森魡賤 提交于 2019-12-18 10:22:52
问题 I have a web application with a custom configuration section. That section contains information I'ld like to encrypt (was hoping to use ASPNet_RegIIS rather than do it myself). Web.Config: <?xml version="1.0"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <configSections> <section name="MyCustomSection" type="MyNamespace.MyCustomSectionHandler, MyAssembly"/> </configSections> <configProtectedData> <providers> <clear /> <add name=

“An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page…”

烈酒焚心 提交于 2019-12-18 10:12:24
问题 I'm trying to publish an MVC website as an Azure webrole. When I run it locally, everything works fine. But once I publish it to Azure and surf to some MVC action, I get this error: Server Error in '/' Application. Runtime Error Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated. I don't understand how the error handler can encounter an

How to include simple collections in ConfigurationSection

对着背影说爱祢 提交于 2019-12-18 07:34:34
问题 Is there a way for me to include a simple array of strings, or List<string> on my custom subclass of ConfigurationSection? (Or an array or generic list of simple data objects, for that matter?) I'm becoming familiar with the new (and VERY verbose) ConfigurationSection, ConfigurationElement, and ConfigurationElementCollection classes, but I'm by no means an expert yet. It seems like ConfigurationSection should handle simple collections/lists on its own, without me having to create a custom

Parser Error Message: Failed to generate code. Exception of type 'System.Data.Design.InternalException' was thrown

◇◆丶佛笑我妖孽 提交于 2019-12-18 07:23:05
问题 I am getting this error when I am using ODP.net The error is appearing when I include a connection <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="BannerCS" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="BannerCS (Web.config)" ParameterPrefix=":" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.BannerCS.ConnectionString" Provider="Oracle.ManagedDataAccess.Client" /> in the .XSD file in the

Can One IIS WebSite host multiple Web Applications of different ASP.NET versions?

走远了吗. 提交于 2019-12-18 07:05:27
问题 I have one web site in IIS, and I would like to have version 2, 3.5, and 4 applications hosted under the same IIS web site. Is this possible? Thought it'd be as easy as modifying the web.config. What I have so far is I created an ASP.NET 3.5 site on the root. Then I created a directory underneath and deployed an ASP.NET 2.0 site. So far, when I view the 3.5 site, it views fine. The 2.0 site, however, when I browse to the directory's default.aspx, I get: Description: An error occurred during