web-config

How browsers find applicationHost.config file?

社会主义新天地 提交于 2019-12-13 20:21:58
问题 I was trying to change the name of web.config and read some Q/A about it where the final solution was to reference from web.config to an extra config file using configSource . I wonder how browsers know that there is config file in c:\programfiles\system32\....\ applicationHost.config when they want to connect to localhost? In other words how IIS notifies the browsers to look for this file rather than the web.congif itself? There is no reference to this file in web.config in the root of

Prevent web.config inheritance to a specific application in IIS

喜夏-厌秋 提交于 2019-12-13 20:03:59
问题 I have so many applications configured under a IIS domain. But this WCF application doesn't need the parent web.config. It has its own web.config. How can I prevent it ? 回答1: If you are using II7+ then IIS Locking can help IIS 7.0 and above allows locking and unlocking configuration settings in various levels and scopes. Locking down configuration means that it cannot be overridden (or set at all) at lower levels in the hierarchy. Unlocking configuration can only be done at the level where it

WCF + Unity nested web.config problem

自作多情 提交于 2019-12-13 19:22:34
问题 I'm trying to setup the following: /WebApplication web.config tokenlogin.aspx /Services web.config AccessTokenService.svc I put my WCF Service + configuration in the /WebApplication/Services folder. This still workes as expected. Now my AccessTokenService, which resides in an other assembly, expects an interface in its constructor called IAccessTokenRepository (see all code samples below). Because normally WCF only allows for parameter-less constructors, I extended WCF using a custom

Configuration madness, I have an app.Config but my object looks to web.Config

泄露秘密 提交于 2019-12-13 18:50:16
问题 if you have a class library project that acts as ur DAL and it has an App.Config file with connectionstrings, how can I force it to use that config file? It keep getting values from the web.config in my Web Application project. The DAL project uses LinqToSql. When I instansiate a DataContext object in my Web Application, from the referenced DAL Class Library project, can I make it use it's app.Config connectionstrings? It seems to ignore this file and tries to pick up connectionstrings from

Deny users to access a folder

被刻印的时光 ゝ 提交于 2019-12-13 18:28:02
问题 I have this upload file structure link localhost:58707/uploads/interaction/5/Chrysanthemum.jpg I want to deny all the users to access '~/uploads' directly.. So, I put this in my web.config as I see in others questions here: <location path="~/uploads"> //I've tried '/upload' and 'upload' too. <system.webServer> <directoryBrowse enabled="false" /> </system.webServer> </location> But it doesn't work. How can I do this? 回答1: Check this answer .. Deny access to 'admin' folder in web.config Also

Read IIS7 configuration from within web application?

眉间皱痕 提交于 2019-12-13 18:17:46
问题 Here's what I want to do: My web application is very slow at first until all pages have been precompiled and the cache has been populated. I want to 'warm up' the application in Global.asax by triggering a few HTTP requests to the slowest pages. The problem is that I don't know which port the application is running on. Could be 80 (my local IIS or the deployed server, 8080 on our test server or some random port for some colleagues who use the ASP.NET development server) I thought it would be

ASP.NET Web App using the wrong (2.0) CLR version (instead of 4.0)

◇◆丶佛笑我妖孽 提交于 2019-12-13 15:27:38
问题 I just deployed an asp.net web app I have been working on to a new dev machine. It's a 4.0 project converted from 3.5. For some reason, I get the following error when I try to hit the site via my IIS website under the Default Website: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. It lists this as being a config error on the ASP.NET error page: <compilation debug="true" targetFramework="4.0"/> However, I notice that at the bottom of the error page, the

Configuring an ASP.NET application in IIS

匆匆过客 提交于 2019-12-13 15:26:22
问题 I've inherited some aspx (including the web.config file) and am getting the following error. I've created a virtual directory for it but I'm not sure how would I "configure it as an 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 configuration file appropriately. Parser Error Message: It is an error to use a section registered as

“When the site administrator has locked access to this section using <location allowOverride=”false“> from an inherited configuration file.”

半世苍凉 提交于 2019-12-13 14:01:08
问题 So I get this error when publishing my ASP.NET MVC application. It works fine locally: " This happens when the site administrator has locked access to this section using <location allowOverride="false"> from an inherited configuration file. I had this error before that I fixed: "System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed." I used the

Http-handler load error

别说谁变了你拦得住时间么 提交于 2019-12-13 13:27:11
问题 I successfully added and configured HttpHandler in an Asp.Net WebApplication , but facing problems while trying to add same HttpHandler to Asp.Net WebSite . I have registered it in the web.config, am i missing something This is the error I am getting 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 configuration file appropriately. Parser Error