web-config

ASP.NET Unable to Read Config Settings from External Config Files

We are experiencing some strange behaviour on one of our ASP.NET web servers (Windows 2003 64-bit). After some activity, two third-party controls are unable to run correctly. One is log4net (it does not write error messages out) and the other is a menu control (it displays eval message instead of picking up its license). The one commo...

Can MS Deploy do a package and transform, but not deploy?

Using msbuild in .NET 4.0, I can build web project with the "Package" target, and it does a nice job of putting the package in a zip file. But, when I look at the web.config in there, it's not transformed, it has "$(ReplacableToken_Web_SiteConnection-Web.config Connection String_0)" I can run the "TransformWebConfig" target and it will ...

bindingConfiguration not being read properly

I have a WCF service that returns a lot of data. So much so that I needed to increase the maxBufferSize and the maxReceivedMessageSize. My endpoint and binding look like so: <endpoint address="" binding="basicHttpBinding" bindingConfiguration="ExtendedBinding" contract="NAThriveExtensions.INableAPI" /> <bindings> <b...

VS2010 Build Deployment Package web.release.config transform error

I am getting the transformed web.config in the deployment package incorrectly transformed. The result is as follows (notice how the connection string gets generated): <connectionStrings> <add name="xxxConnectionStringNamexxx" connectionString="$(ReplacableToken_xxxConnectionStringNamexxx-Web.config Connection String_0)" pr...

Restarting IIS on file changed

Hello, AFAIK IIS restarts, whenever any of the web.config files is changed. I've created my own configuration files (my.config, with slightly different hierarchy). Is there any possibility to have IIS automatically (automagically :)) restarted, whenever any of these are changed, too? EDIT: I've considered filesystem watchers, but I'm no...

Controlling access to Silverlight control or service DLL in IIS/ASP.NET

I made a toy Silverlight application. It gets some arbitrary XML from a domain service and stuffs it in a datagrid. What I'd like to do is implement access control for the service and the Silverlight control. For example, I'd like to allow access only to logged-in users, while denying access to anonymous users. With forms authenticat...

ReplacableToken_ when using web.config transform?

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 ...

Web Service/Web Config Issues

So I get thrown an exception right when I try to create a new instance of my Web Service that says: "Could not find default endpoint element that references contract 'KBBVehicleService.IVehicleInformationService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application,...

Elmah: ErrorLog_Filtering event handler not called under IIS7

I enable error log filtering within Elmah and want to do it programmatically in a ErrorLog_Filtering event handler. It works well under Visual Studio dev server but as soon as I go under IIS7 (local on my dev machine or remote on my web server), the handler is not called (error logging works well). Here is my usual web.config: <configu...

How do I configure a WCF service that calls other services behind a load balancer?

I haven't deployed behind a load balancer before. My customer has a WCF service built and tested on servers using a service model configuration that is relatively straightforward. It provides a service to return an image of a map for another application. To get the map, it calls other services. The service was built in Visual Studio 201...

Auto-Start ASP.NET Applications

As mentioned here. http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx Is there another way to do this? By just modifying the application's web.config file? ...

web.config ignores customerrors="on" attribute

Hi I've got a site where I get the classic: Server Error in '/' Application. Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by brow...

web.config entry doesn't work in a specific site

hi, in my web.config file i've added an entry: <httpModules> <add type="HDI.HTTPFilter" name="HTTPFilter"/> but the server where i've placed the website on is not reading this entry but in other servers the site works perfectly. what the problem might be? thanks, yishai ...

Can web.config transformations be set to run on dev machines without a full publish?

We've got several devs working on a project and they keep checking their web.configs in with their own connection strings which is a pain. Is there a way to kick off the TransformWebConfig task on a local machine when we do F5 debug? I've made a new configuration for my local machine but I can't figure out how to hack in the TransformWe...

IIS 7.5: Setting 'app pool user' as the anonymous user programmatically

I have an web app in IIS 7.5 with its own AppPool using .net 4. I want to use the feature of having anonymous access as the app pool identity - which is easily configured in a GUI via the inetmgr snapin. Is there any way do this programmatically, for instance through web.config? I've looked around and it appears that the anonymousAuth...

ASP.Net Membership logging in successfully, then redirecting to login page

We're having a load of problems with an ASP.Net Membership application at the moment. For reasons that aren't relevant, we're using a MembershipProvider implementation that uses the old-style Web.config specified credentials and a RoleProvider that just allows everything (the RolesProvider may be the problem here!). This isn't something...

Web service returns 500 error if I add system.runtime.cache with named cache on server

My webservice doesn't render when I add the following to the web.config: <system.runtime.caching> <memoryCache> <namedCaches> <add name="testNamedCache" cacheMemoryLimitMegabytes="0" physicalMemoryLimitPercentage="0" pollingInterval="00:01:00" /> </namedCaches> </memory...

Website is ignoring System.Web.HttpForbiddenHandler and allowing download of web.config

My website is allowing the web.config file to be downloaded. However in my C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config file I have this line <add path="*.config" verb="*" type="System.Web.HttpForbiddenHandler" validate="true"/> Which should mean any config file can't be downloaded. What am I missing? ...

How to retrieve on which site the web application is currently running?

Hello, I am currently running a WCF service on an AppFabric server and my application needs to load a the web.config file dynamically to retrieve custom configuration sections. On my development machine I can just load the configuration like this: WebConfigurationManager.OpenMappedWebConfiguration(webMappedFile, virtualPath); But on...

spring 3 mvc multiple application context instances

here is my web.xml: <?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt; <!-- Enables clean URLs with JSP views e.g. /welcom...