web-config

Problem with <system.web.extensions> config group when upgrading to .NET 4.0

风流意气都作罢 提交于 2020-01-02 02:14:09
问题 So we've upgraded our site from 3.5 SP1 -> .NET 4. When we ran the site, we got an Internal Server Error (500), stating the following configuration group could not be read: <system.web.extensions> <scripting> <scriptResourceHandler enableCompression="true" enableCaching="true" /> <webServices> <jsonSerialization maxJsonLength="999999" /> </webServices> </scripting> </system.web.extensions> We commented out this section and the website ran fine (but now we are getting problems with JSON -

How can a NuGet package include transformations for both app.config and web.config?

回眸只為那壹抹淺笑 提交于 2020-01-02 00:41:07
问题 I'm trying to create a nuget package which will both add a DLL and configure it inside of the proper configuration file. The package can be used in either a console/form application or a web application, so I want to update the appropriate configuration file, either app.config or web.config. My files section in the .nuspec file contains the following inside of the section. <file src="config.transform" target="content\app.config.transform"/> <file src="config.transform" target="content\web

How to have multiple bin folders in an asp.net application?

北慕城南 提交于 2020-01-01 18:19:34
问题 I have an asp.net application located in C:/MainApp which has a bin folder. In IIS I have configured this as a web application and I can run my test pages. Now, I have 2 web service applications with their own dlls and I don't want to deploy those dlls in the main bin folder c:/MainApp/Bin for some reasons, please don't ask why! These 2 subapps need to be hosted under the same MainApp without creating a new Virtual Folder for each. So, c:/MainApp c:/MainApp/bin c:/MainApp/SubApp1/bin c:

Removing ConnectionString when deploying with Visual Studio 2012

北慕城南 提交于 2020-01-01 12:11:18
问题 I'm working on a project with 2 web applications, one being hosted as long running process (with appfabric), the other is just a normal MVC application. They share same datacontext, thus same connectionString. The appfabric application is deployed as a child application of the main, taking advantage of the web.config inheritance (we don't want connectionstring to be duplicated in web config) My problem is that with the new Visual Studio 2012 wizard for publishing, the connectionString are

Setting up dynamic connection string for log4net

痴心易碎 提交于 2020-01-01 12:01:36
问题 I am using log4net and I am have a connection string I want to reference in my log4net config, because the connectionString in "/Config/connectionStrings.config" will be dynamic input from the user. Here is what I am trying to do: <log4net xmlns="log4net"> <root> <level value="ERROR" /> <appender-ref ref="DatabaseAppender" /> </root> <appender name="DatabaseAppender" type="log4net.Appender.AdoNetAppender"> <bufferSize value="100" /> <connectionType value="System.Data.SqlClient.SqlConnection,

How to initialize ConnectionStrings collection in NUnit

社会主义新天地 提交于 2020-01-01 10:56:11
问题 I want to test ASP.NET application using NUnit, but it seems WebConfigurationManager.ConnectionStrings collection is empty when running from NUnit GUI. Could you tell me how to initialize this collection (probably in [SetUp] function of [TestFixture])? Should I copy Web.config somethere? Thank you! 回答1: If you have your unit-test assembly named Company.Component.Tests.dll, then just make sure that Company.Component.Tests.dll.config is there with the proper connection string. Additionally, it

Web.config altered (drastically) during Azure deployment

断了今生、忘了曾经 提交于 2020-01-01 10:17:34
问题 After deploying to Azure, I kept getting server errors -- the application would not run. So I did a remote desktop into the instance and found that the web.config was completely overhauled...what's going on? I thought web.config was packaged as-is? Instead, the entire configuration has been replaced. When I replace the "new" version with the original, unaltered, correct configuration, my app works as intended. First off, what's going on here? What am I doing wrong? This way I can understand

Web.config altered (drastically) during Azure deployment

爷,独闯天下 提交于 2020-01-01 10:17:06
问题 After deploying to Azure, I kept getting server errors -- the application would not run. So I did a remote desktop into the instance and found that the web.config was completely overhauled...what's going on? I thought web.config was packaged as-is? Instead, the entire configuration has been replaced. When I replace the "new" version with the original, unaltered, correct configuration, my app works as intended. First off, what's going on here? What am I doing wrong? This way I can understand

Visual Studio 2013 IntelliSense not working with a particular web.config file

拥有回忆 提交于 2020-01-01 10:16:43
问题 Everything was working perfectly until VS2013 randomly started to complain about the tags in my web.config . It randomly tells literally nonsense errors such as duplicate declarations, random, non-existent tags at random whitespace. Here are a few screenshots demonstrating the issue: I've tried resetting all Visual Studio settings, nothing changed. I've tried closing and re-opening all Visual Studi instances (obviously). I've tried copying the text, normalizing line endings in Sublime Text

VS2015 The breakpoint will not currently be hit. No symbols have been loaded for this document

a 夏天 提交于 2020-01-01 10:15:17
问题 I have solution with 3 projects. Project one - Library . Project two - Service (asmx) . Project three - Test . In my service I have two config transform: PRODUCTION and TEST . They are equals, but name of databases is different. My solution: If I Debug Test with PRODUCTION.config then all right - my breakpoints is active. If I Debug Test with TEST.config then bad. I get this: What could be the problem? Sorry for my English. 回答1: Fixing: Right mouse click your project Select Properties Select