web-config

Why is the renderAllHiddenFieldsAtTopOfForm configuration setting ignored?

旧时模样 提交于 2020-01-06 02:30:06
问题 I'm experiencing the exact opposite problem of the poster of this question: Why isn't "renderAllHiddenFieldsAtTopOfForm" not working? I have explicitly set renderAllHiddenFieldsAtTopOfForm to true: <system.web> <pages renderAllHiddenFieldsAtTopOfForm="true" /> </system.web> Nonetheless, the rendered output contains two distinct sections containing the system-generated hidden fields: one at the top, and one at the bottom of the form: <div class="aspNetHidden"> <input type="hidden" name="_

How does Windows Authentication really work? Web.config seems not enough

让人想犯罪 __ 提交于 2020-01-05 09:31:29
问题 Trying to fix windows authentication. Objective: Windows Authentication. With Firefox a login dialog should appear, while with Internet Explorer the windows user name and password should go to the web server automatically. I set up a really small web application project, using the Empty template. Web.config looks like this: <?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.5"/> <httpRuntime targetFramework="4.5"/> <authentication mode="Windows" />

How does Windows Authentication really work? Web.config seems not enough

被刻印的时光 ゝ 提交于 2020-01-05 09:31:23
问题 Trying to fix windows authentication. Objective: Windows Authentication. With Firefox a login dialog should appear, while with Internet Explorer the windows user name and password should go to the web server automatically. I set up a really small web application project, using the Empty template. Web.config looks like this: <?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.5"/> <httpRuntime targetFramework="4.5"/> <authentication mode="Windows" />

Accessing an attribute on a configSection in a web.config?

﹥>﹥吖頭↗ 提交于 2020-01-05 08:26:12
问题 Solution: Just to add the solution: sectionGroups do not seem to have attributes. The proper way seems to have a ConfigurationSection as the parent and ConfigurationElement as each children. There is also ConfigurationElementCollection for Collections. An example from the .net Framework: <roleManager> is a Section, <providers> is an ElementCollection. I blogged about my solution. Original Question: I have a custom sectionGroup in my web.config: <sectionGroup name="myApp" type="MyApp

Web.Debug.config vs. Web.Release.config running web app in localhost

此生再无相见时 提交于 2020-01-05 07:17:48
问题 I have a Web.config file with some entries in there but depending on whether I am in Debug or Release mode when I execute my Web Application locally , I want to take different appSettings. For instance, let's say that I have the following entry in my Web.Debug.config appSettings. <add key="MyServiceUrl" value="http://my-test-site:8080/" /> And also I have this in my Web.Release.config: <add key="MyServiceUrl" value="http://my-prod-site:80/" /> How should I configure my Web.Config, Web.Debug

ASP.NET Runtime Errors Occuring in web.config file for .aspx framework 2.0 website

两盒软妹~` 提交于 2020-01-05 05:44:07
问题 I am receiving this error when I ftp my .aspx web page to a remote server hosted by Network Solutions. This code is in my web.config file and when I remove the tag I get another error about the targetFramework = 4.5 attribute not being recognized. This first error recommends that I set up a virtual directory using IIS, but I cannot access IIS Manager with my subscription to the remote server. Is There any workaround to solving this authentication mode tag error and even the unrecognized

How can i retrieve a connectionString from a web.config file?

旧城冷巷雨未停 提交于 2020-01-05 03:59:13
问题 I am writing an client application in C# which will be supposed to change ConnectionString settings in a web.config file from another application I wrote. How can I achieve this goal? Is there a way to load the web.config file in my application and read/change its data object orientated? Or do I need to parse it as if beeing a complete 'unknown' XML file? 回答1: If you're doing this from another application, you can use the VirtualDirectoryMapping class: VirtualDirectoryMapping vdm = new

Mvc Authorize attribute is not working

妖精的绣舞 提交于 2020-01-05 03:51:16
问题 I have created HomeController decorated with AuthorizeAttribute , and also created AccountController , but it is not redirecting to the Login() action of AccountController . Home controller: [Authorize] public class HomeController : Controller { public ActionResult Index() { return View(); } } Account controller: public class AccountController : Controller { [HttpGet] public ActionResult Login() { return View(); } [HttpPost] public ActionResult Login(LogOnCustom log) { if(ModelState.IsValid)

What is the relationship between Web.Config connection strings and ServiceConfiguration connection strings in Azure?

痴心易碎 提交于 2020-01-05 03:07:30
问题 I'm relatively new to Windows Azure and I need to get a better appreciation of how the Azure platform handles connection string configuration settings. Assume I have an ASP.Net web project and this has a Web.Config connection string setting like the following: <add name="MyDb" connectionString="Data Source=NzSqlServer01;Initial Catalog=MyAzureDb;User ID=joe;Password=bloggs;" providerName="System.Data.SqlClient" /> I use this connection string for local testing and such. Let's assume I have a

Internal server error 500 on IIS 8

主宰稳场 提交于 2020-01-04 17:32:33
问题 I'm having really a weird problem with my website. It works fine locally, but online it shows iis 8 500 - internal server error . In the both online and local versions of the site I use the same remote database. The website works online, but it drops when I try to upload a file to the "upload" directory, which is part of the website. I don't know what the problem is because I can't get any detailed errors. I've added these code pieces in web.config, but still can'tget detailed error