web-config

Web.Config Inheritance Problem

I want to prevent the parent config in our IIS 7 app from pushing down the following section to any sub web.configs in any applications under the parent application. <configSections> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Cultu...

Unity Framework

Let me clear with my Question, I have say 100 classes all these 100 classes implements 1 interface say IDependency, say suppose my classname is Customer it implements IDependency public class Customer : IDependency public class Order:IDependency it goes on till 100 classes And I am registering this class in web.config like <type typ...

What is the use of stateConnectionString in sessionState in Web.config?

I'm using VS 2005 for web forms. Looking at the web.config I see a stateConnectionString attribute. Is this really needed? When is this needed? How is this used? ...

Possible to use customErrors=On, but only for non-IIS handled errors?

I toggled customErrors=On in web.config, set the defaultRedirect for my custom Error.aspx page. However, this is only to prevent application errors from spitting out code - I'd still like IIS to handle 404s etc. with its default handlers, since they work fine. Any way to specify in my ASP.NET app or IIS for IIS to take priority? I know...

Is it possible to show a link in a C# program to the admin only?

Hi (I'm pretty new to this), I have a login control in my C# program and once the user logs in, they are able to see links to other programs (a portal). Is it possible to hide the 'create new user' link to everyone except the admin once the user has logged in? Is this something I'd change in the web.config as I only want admins to be ab...

web.config - auto generate a release version

Simple task, but for some reason no simple solution just yet. We've all got web.config files - and I haven't worked anywhere yet that doesn't have the problem where someone yells across the room "Sh*t, I've just uploaded the wrong web.config file". Is there a simple way of being able to auto generate a web.config file that will contain...

Referencing code in App_Code from web.config

I have a type in my App_Code folder from a Web Site project that I want to refer to in Web.config. The type attribute is requiring me to put in an assembly name. The internets is failing me with what to put in for the assembly. Specifically in, <system.web> <webServices> <soapExtensionReflectorTypes> <add type...

Can customErrors be overriden by IIS? (7.0)

I control the code but not the server and the person at the other end knows as much about IIS as I do. I have the classic: <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration> in my root level web.config, but am not seeing error details. Could the above have been overriden by a setti...

Converting an old asp.net 1.0 to newer version, web.config changes?

When convering a asp.net 1.0 app to run with asp.net 3.5 vs.net 2008, do I need to modify the web.config? ...

How to store "<" in an XML attribute for configuration section?>

Hello, I'm using a custom configuration section in my web.config file for ASP.NET One of my fields is: <add percent="5" label="<5%" /> As you can see in label I have a "<" sign - this is causing errors. How can I store this value there without having compile issue? Thanks! ...

Sharepoint web part: type could not be found/registered as safe

I have a SharePoint web part (essentially just a "Hello World" app) that I just created and am having a problem deploying it. I have signed the .dll, created the .dwp, and registered it as a safe control in web.config. I am able to add it to the Web Part Gallery and add the details for it; however, when I attempt to add it to a page, I g...

Debugging ASP.Net web.config issue on shared host

Hi, I'm running my app on shared hosting. When I run the latest changes on my dev server, everything works fine - When I upload, I see the generic "Error occured but isn't being shown" message. If I change my web.config to include CustomErrors mode="off" then I still see the same error message. I'm guessing that one of my recent c...

Is there a good "free" graphical web.config editor?

Like: https://www.hunterstone.com/hsstore/ProductDetails.aspx?productID=101 but free :-) ...

How to timeout a user in asp.net formsAuthentication

Hi I am wondering how do I set a timeout for a user if they don't do any requests after say 10mins there session is killed and they are logged out. I have in my webconfig this <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" protection="All" timeout="20160" pat...

web.config : maxRequestLength not taking effect

I have the following seetings in my web.config file. <httpRuntime executionTimeout="90000" maxRequestLength="204800" /> But I am not able to upload anyfile which are greater than 50MB. Wht could be the reason. The web browser keeps on waiting for the upload to finish but anyfile lesser than 50MB gets uploaded without any issues. Are t...

Encrypting Connection String in web.config

How can we encrypt the connection string section in web.config file? ...

Force web application to use certain dll version C# asp.net

Hi All, I have a ASP.NET web application in which I have references to a couple of Class Libraries I developed. Each of these libraries has a version number set in the AssemblyInfo.cs file. I would like to force the application to use only libraries with a specific version. i.e. If I have User.dll of version 2.5.0.0 which is a refere...

Runtime-Error on productive Server but not locally

Hi there, so i finished one of my ASP.NET-projects and want to deploy it on the productive server. And suddenly WHOOM: Runtime error! Okay, no problem; look at the error message, see the stack trace, solve problem, everybody happy. Peanuts! The server tells me, that the customErrors-Settings in my web.config are set that no error mess...

Batch Size in web config for Nhibernate in ASP.NET MVC

How do I set the batch size for Nhibernate? I'd like to do this in the web.config. The examples I see, don't make a lot of sense to me. In this example they are using code to set the batch size. I don't wnat to do that. I want it configurable in the web.config. I understand how to add the config section, I just have read articles t...

Is machine.config the best way to store a connection String?

Why are we using the machine.config file to store connection string although we have web.config file? Any help would be appreciated. ...