web-config

exePath must be specified when not running inside a stand alone exe

↘锁芯ラ 提交于 2019-12-22 01:12:52
问题 When i am using a web application, the line of code below Configuration objConfig = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None); in class library are giving this error: "exePath must be specified when not running inside a stand alone exe." Previously a console application was being used, and the code could access the app.config . I tried using the System.Web.Configuration in class library but the dll was not present in the .Net tab for "Add reference". Kindly help

How to log Application Errors when customErros is set to On?

天大地大妈咪最大 提交于 2019-12-22 01:09:29
问题 I have setup an MVC application to log errors with log4net. In my global.asax I catch Application errors using the Application_Error method (s_log is my logging manager which is a wrapper around Log4net). protected void Application_Error(Object sender, EventArgs e) { Exception ex = Server.GetLastError().GetBaseException(); s_log.LogException(true, ex, "Application Error"); } When customErrors is set to "Off" I get the yellow screen of death and can see the error in my log file. When

Problem with Convert.ToDateTime in asp.net

心不动则不痛 提交于 2019-12-21 23:50:17
问题 I have an application that works without any problem in a spanish server. When i uploaded the application into the online server (an english windows), im getting exceptions (of type "input string is not a valid Datetime/Int32") with Convert.ToDateTime and Convert.ToInt32. Are any web.config line that could help me in this matter? I tried adding a globalization element with the Spanish culture, but didnt worked. Could you give me a hand? Thanks in advance. Josema. 回答1: You need: System

Web.config URL rewrite - force www prefix and https

隐身守侯 提交于 2019-12-21 22:50:20
问题 I'm trying to enforce https and a www prefix. However my rule doesn't fully work. Here is my rule: <rewrite> <rules> <clear /> <rule name="Force https" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" url="https://www.mydomain.co.uk/{R:1}" redirectType="Permanent" /> </rule> <rule name="Force www" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern=

1&1 Windows hosting Server web.config URL rewrite issues

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 21:43:07
问题 I am facing an issue related to URL rewrite in windows server hosted by 1&1. i am trying to rewrite the urls using web.config file but it's not working at all giving me the error or 500.19 Error Summary 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 Unknown Handler Not yet determined Error Code 0x8007000d Config Error Config File \?\E:

IIS ignores system.webServer staticContent section

試著忘記壹切 提交于 2019-12-21 20:26:56
问题 UDPATE On a whim, I decided to upload the 4 fonts files to an font converter. I converted the fontsfrom ttf to ttf and then tried it. Everything works fine: the Content-Type is set correctly and the X-Powered-By header is removed. Weird. I am trying to change the mime type (Content Type header) of a .ttf file in web.config on IIS7. Here is the staticContent section inside <system.webServer /> : <staticContent> <remove fileExtension=".ttf" /> <mimeMap fileExtension=".ttf" mimeType="font/ttf" /

Authentification-None for one folder(page) when the project is under FormsAuthentifications

流过昼夜 提交于 2019-12-21 20:19:29
问题 I have a WebApplication on asp.net 2.0 with namespace Admin. I have Form Authentification mode for the project. <authentication mode="Forms"> <forms name="ASP_XML_Form" loginUrl="Login.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true" cookieless="AutoDetect"> </forms> </authentication> Now, I try to share one folder (one inside page) for not Authentificatied users: <location path="Recovery"> <system.web> <roleManager enabled="false" > </roleManager>

web.config transformation does not work on build server

久未见 提交于 2019-12-21 20:15:30
问题 We are setting up continuous integration with team city doing builds on check-ins. This works fine, however it always builds with default web.config, it does not transform with development environment specific web config. In Visual Studio, I have custom build configuration created for development. The 'web.development.config' transforms correctly when I publish locally with 'development' configuration selected. But this does not happen on the build server. In team city, as part of msbuild

maxRequestLength in web.config makes an internal error

余生长醉 提交于 2019-12-21 20:04:22
问题 Hi guys i want to allow my users to upload files with huge size so i change my web.config to this : <configuration> <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=" > <section name="delegatezanjan.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=" requirePermission="false" /> </sectionGroup> <

WCF ASP.NET routing integration feature requires ASP.NET compatibility

我怕爱的太早我们不能终老 提交于 2019-12-21 20:03:55
问题 I am getting this issue when trying to access my web service from my server. ASP.NET routing integration feature requires ASP.NET compatibility. Please see 'http://msdn.microsoft.com/en-us/library/ms731336.aspx' on how to do this. I have added this line to my web.config just like many articles have suggested, yet I still get the same error. <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> What could be the issue? 回答1: I had the same problem when I had a website with no physical