web-config

Get values from the web.config section in an app.config file?

I'm trying to unit test values that will eventually wind up in a web.config file. In my test project, I created an app.config file with a web.config section to hold the settings. In a normal situation, I would call System.Configuration.ConfigurationSettings.AppSettings, but in this case, that doesn't work. I saw this question, which is v...

debug=true in web.config = BAD thing?

We're seeing lots of virtual memory fragmentation and out of memory errors and then it hits the 3GB limit. The compilation debug is set to true in the web.config but I get different answers from everyone i ask, does debug set to true cause each aspx to compile into random areas of ram thus fragmenting that ram and eventually causing out...

Publishing Problems

I have an ASP.NET web project that works perfectly on my computer. However, when I publish to the remote server, it crashes. The only page I see is the main startup page. If I click on any link I get an error page. The error page tells me that it can't tell me what the error is (for security reasons), and that I should set customError mo...

How do I call Initialize on a custom MembershipProvider?

Hi There, I have read through all the related questions, but I still unable to get the right solution for some reason, something is not right on my side, but not sure what's causing it. I have created a Custom Membership Provider, also changed my web.config to : <membership defaultProvider="MyMemberShipProvider"> <providers> ...

Is there a way to configure the Application Pool's "Idle timeout" in web.config?

I know one can set the session timeout. But, if the application itself has received no requests for a given period of time, IIS shuts down the application. This behavior is configurable in the IIS management console, and I know how to do this. Still, I wonder if it is possible to configure this in web.config. ...

SSPI Connection in .Net 2.0 Web Service

I'm trying to test a .Net 2.0 Web Service I created in C#. One of our servers is on windows 2000 and can currently only support .Net 2.0 . I can test it local to my machine and it works fine but when I move it to the target server for production it produces an error. I want it to use Windows authentication, and have it defined as such i...

Getting partially trusted callers error with Microsoft.Practices.EnterpriseLibrary when run exe using UNC path?

I have created a Console App that when I run locally from the command line it works fine. And it logs to a local file. When I copy it to another machine and try to run from the command line ie //AnotherServer/d$/Apps/MyExe I get this error. An error occurred creating the configuration section handler for loggingConfiguration: That ...

Authorization Asp.net web.config

I have an application that has a backoffice. This backoffice was isolated with the use of roles like this: <location path="backoffice"> <system.web> <authorization> <allow roles="admin"/> <deny users="*"/> </authorization> </system.web> </location> But now we have another type of role that needs access. T...

Unable to load my custom membership provider?

Hi there, I was trying to implement a custom membership provider, everything goes well, I can connect, I can change user details, but as soon as I create user, I got this error when it tries to get the user after I complete create a user. The error is coming from my web.config, it is saying it's a ConfigurationErrorsException, and it a...

How to create a Global connectionstring to SQL Server Database for my SharePoint site

This is my connection string inside my web.config of my SharePoint site. Its sitting just below the closing SharePoint tag. <connectionStrings> <add name="SAMRASConnectionString" connectionString="Data Source=JOHANDEVVM; Initial Catalog=samrasDB; User ID=Johan; Password=password; Trusted_Connection=True" providerName...

How to make sure we publish production to the prod server and test to the test server

I have an entry in my Web.Config file that indicates which environment I am in for connection strings and junk: <add key="AppEnv" value ="2" /> <!--(0 = Dev, 1 = test, 2 = prod)--> I am looking for a way to alert the developer, at the time of publishing, to make sure they have checked this key/value so that they don't publish the 'tes...

Web Routing for IIS6 and II7 Classic Mode? *NOT* MVC

According to the msdn.microsoft.com site, .NET 3.5 Routing should work under IIS6 and II7 in classic mode. I've made the mods to the web.config file and tested under IIS7 integrated mode and it's working great. I'd love to keep IIS7 Integrated, but my webhost is still just IIS6 (with .net 3.5). So... has anyone gotten this to work? I...

browserCaps in an External Config File

The BrowserCaps setting is rather quite long. Is there a way to factor it into an external config file. does anyone know the markup? ...

Ignoring Web.Config from source control without excluding from Project in VS 2008

I have a project I'm working on where I have a team that is located in two different locations. We are using a source control system that integrates with VS 2008. We have created a solution folder where we store different web.config files so the different locations can pick and choose which configuration they need to use to run the pro...

Configuration Error

I am getting following error while running my application which is asp.net. Server Error in '/ASPMassShop' Application. "Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configur...

sitemap trimming is not working

Hey guys, I have read up on articles and done a lot of research but this is kicking my butt and it should be easy. I'm hoping its easy to fix. Im trying to trim my sitemap based on roles however the menu control never changes. Sitemap: <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/Site...

Any slick and clever ways to inject JQuery before the page begins rendering?

I'm looking to somehow get jQuery inserted into every page with the MINIMUM of code written... in other words I don't want to write <script language="javascript" src="PATH TO JQUERY"></script> on every single aspx page. So far I've thought of using a Base class and inserting a "Response.Write" into the "page load" event. Besides that, w...

Is it possible to modify configuration ConnectionStrings at runtime?

Is it possible to modify the connectionstrings defined in the app.config/web.config at runtime? I want to use different configfiles depending on the machine the app/site is run on (only for debugging purposes, of course. We'll use the regular config files when deployed). I can write AppSettings, but not ConnectionStrings (AFAIK). Or can...

How to use Single Sign On in a web app

Hi, I have an ASP.NET 2.0 web application(C#) where I wanted to enable Single Sign On. I want only certain users to have access to all the pages, but others to only see a few pages. What changes do I need to make to my Web.config file, and what code would I need in my code-behind for the pages? Thank you ...

multiple versions of Crystal Reports in web.config

Before we were not using Crystal Reports. In our project now we have added Crystal Reports to our project. When I transferred my project to the server it produced a Crystal error. I suspect that Crystal is not installed on the server. Then installed Crystal 11 on the server. The development machines have Crystal 8.5. The server produces ...