web-config

IIS7, web.config to allow only static file handler in directory /uploads of website

Hi, If it's possible which I think so, How do I modify my web.config to make a sub directory static -- files inside will only processed as static file, even if its name is "aspx" or something else? Thanks. ...

I'm having an issue with compliling database objects in SubSonic 3.0 due to project and connection string location issues.

Hello there, i'm having a issue with the T4 templates for generating code. I'm wondering if anyone can help me with an issue I have. I want to store the connection string for use with SubSonic 3.0 in a default location such as the root of the website (Web.Config or a seperate .config file). This is fine providing the t4 Templates are "...

Using web.config to store and map info

I've been reading others questions regarding storing settings in the web.config. Most of you agree that's a good way to store settings. I just have another doubt about that. In my app, I need to map some ID's in the web.config. For example: [Table = UserType] 1 - User /2 - Admin Is it a good idea to store these settings in the web.co...

Multiple ASP.NET Configuration Files

I have found a number of pieces of information on having multiple ASP.NET configuration files for a web deployment. However, I am still unsure if I can accomplish what I want to accomplish. Basically, the website I am working on can be deployed to three different sites. Depending on the site that it is deployed to, the configuration s...

DbProviderFactories for.NET Error

I am having trouble getting the ODP.NEt library to work with the .NET DBProviderFactories. I am getting the following error with this code: _DBFactory = DbProviderFactories.GetFactory(providerName); An error occurred creating the configuration section handler for system.data: Column 'InvariantName' is constrained to be unique. Value ...

Sharepoint ajax web service compatibality

I have a Sharepoint publishing site that is configured to use ajax 1.0 to use some third party controls (RadEditor, Bamboo). My problem is I have created a custom web service (.asmx) in a visual studio wspbuilder project and deployed it to the ISAPI folder. The project is set up to use .net 3.5 framework. This works fine for our custom ...

How do I use mailSettings\smtp with both the configSource and from attributes?

I am trying to clean up our web.config file such that per-deployment specific stuff is not kept in the main config. I have managed with the connections strings and some of the mailSettings, but I need the from attribute as well as the configSource, but this doesn't seem to be allowed. Currently I have this: web.config: <system.net> ...

ASP.NET 2.0 in Virtual Trying to Use SQL State Server

We have IIS 6 running on a W2003 Server. The root web site is running a v1.1 site. Under this site we have a virtual running a v2.0 site (with a separate application pool). The web.config for the root site is using SQL as its state server and has a 1.1 SQL state server database installed. The 2.0 virtual web.config does not need state an...

What is the purpose of configSections?

I've done a little research and ran across this: http://msdn.microsoft.com/en-us/library/ms228245.aspx So if I'm understanding that correctly, ultimately what this is doing is including some .dlls for use within the project, much like: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad...

NUnit: configuration settings cannot be found

I've written an NUnit test project against an ASP.Net project. The code being tested cannot find the configuration values (in Web.config) when invoked from my test project. What is the right way to provide these configuration settings so my tests will run? ...

web.config authorization and direct method calling

Hey everyone, I'm using ASP.NET and rely on the web.config file to secure sections of my site. However, is this truly reliable, or is it also a good idea to add an IsAuthenticated check in the Page_Load event? Also, is it possible for someone to directly call methods (assuming they somehow got my method names and method signature) in m...

Different Default Document Type in Subfolder on IIS 6

I've never worked on an IIS server with PHP before, but my question is can I set a default document type for a subfolder in the web.config, this is what I have in mind (its a bbPress forum): <location path="forum"> <system.webServer> <defaultDocument> <files> <add value="index.php" /> </files> </defau...

When working with web.config, Configuration class is not available

I want to access the "appSettings" section of a web.config file. According to MSDN and multiple other sources, the following should work: System.Configuration.Configuration config = WebConfigurationManager.OpenWebConfiguration("/rootPath"); I received this error on the second configuration (System.Configuration.Configuration): ...

Importing name space withouth use , effect performance ?

Hi all Is there any deficiency performance if import a lot of name space in Web.config or in every single cs file while it's not necessary to be in all classes ? Thank you ...

How do you wrap and access the config files from your applications?

Well, the question speaks for itself. I use to have a static Config class in my project that lazy-load the data from the config file like this : private static string _foo; public static string Foo { get { if (string.IsNullOrEmpty(_foo)) _foo = ConfigurationManager.AppSettings["fo...

Help translating .htaccess to web.config url rewrite

What would this rewrite rule from .htaccess translate to IIS7 web.config? RewriteRule .* index.php/$0 [PT,L] ...

maintainScrollPositionOnPostback="true" does not work globally after setting in web.config ,but works in page level,what should I do?

the title is already clear but to add more info ,the production server is windows server 2003 sp2 with .NET 3.5 sp1. setting maintainScrollPositionOnPostback="true" globally in web.config does work in my xp sp3 under iis 5.1 but not for production server. but if add maintainScrollPositionOnPostback="true" for any <%@ Page directive it ...

Setting up separate ASP.NET app with DotNetNuke

I've got DotNetNuke (v5.1.4 Community Edition) setup on a Windows Server 2008 64-bit system (using SQL Server 2008 64-bit for the backend database), and I want to reference a separate ASP.NET application from it. I plan to display the ASP.NET application via an IFrame module on the DNN site. I'd like the ASP.NET application to recogniz...

admin folder permissions.. not allow guests

I have a membership web application. A user is either an administrator or a guest user (only 2 roles) I have an admin folder and a guest folder in this application. I want administrators to access both folders and guest not to access Admin folder. I am not using the .net member/role/profile framework. What's the easiest way to secure ...

Why does MvcHttpHandler is mapped from *.mvc?

By default the web.config file for MVC project have the following element: <handlers> <remove name="MvcHttpHandler"/> <add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler"/> </handlers> My problem is that my site returns 404.14, after knocking out all the usual ...