virtual-directory

How to prevent anonymous users from accessing a file using forms authentication?

吃可爱长大的小学妹 提交于 2021-02-10 14:50:20
问题 We are using forms authentication to authenticate users. In our application there is a page to download an exe. When I am debugging the code in visual studio, it allows only logged-in users to download the file. When other users try to download the file, they are automatically redirected to the login page. But when I am running this from a virtual directory, all users (whether logged-in or not) can download the file by accessing the direct path like http://testappln/foldername/test.exe . How

How to configure IIS Express to debug an application in a subdirectory?

ぃ、小莉子 提交于 2020-12-27 16:56:29
问题 My web application is typically located in a subdirectory of the root in IIS. Suppose the subdirectory is "app" When I try to debug it in Visual Studio, the path is always rooted at localhost, with no subdirectory. This messes up my paths in the application. When I try to change the project URL's form from http://localhost:port/ to http://localhost:port/app it just says "Cannot create virtual directory." Well, that's what it said the first time, until I removed the application entry from the

How to configure IIS Express to debug an application in a subdirectory?

橙三吉。 提交于 2020-12-27 16:55:37
问题 My web application is typically located in a subdirectory of the root in IIS. Suppose the subdirectory is "app" When I try to debug it in Visual Studio, the path is always rooted at localhost, with no subdirectory. This messes up my paths in the application. When I try to change the project URL's form from http://localhost:port/ to http://localhost:port/app it just says "Cannot create virtual directory." Well, that's what it said the first time, until I removed the application entry from the

How to configure IIS Express to debug an application in a subdirectory?

旧巷老猫 提交于 2020-12-27 16:48:13
问题 My web application is typically located in a subdirectory of the root in IIS. Suppose the subdirectory is "app" When I try to debug it in Visual Studio, the path is always rooted at localhost, with no subdirectory. This messes up my paths in the application. When I try to change the project URL's form from http://localhost:port/ to http://localhost:port/app it just says "Cannot create virtual directory." Well, that's what it said the first time, until I removed the application entry from the

How to configure IIS Express to debug an application in a subdirectory?

岁酱吖の 提交于 2020-12-27 16:46:21
问题 My web application is typically located in a subdirectory of the root in IIS. Suppose the subdirectory is "app" When I try to debug it in Visual Studio, the path is always rooted at localhost, with no subdirectory. This messes up my paths in the application. When I try to change the project URL's form from http://localhost:port/ to http://localhost:port/app it just says "Cannot create virtual directory." Well, that's what it said the first time, until I removed the application entry from the

How to configure IIS Express to debug an application in a subdirectory?

折月煮酒 提交于 2020-12-27 16:43:57
问题 My web application is typically located in a subdirectory of the root in IIS. Suppose the subdirectory is "app" When I try to debug it in Visual Studio, the path is always rooted at localhost, with no subdirectory. This messes up my paths in the application. When I try to change the project URL's form from http://localhost:port/ to http://localhost:port/app it just says "Cannot create virtual directory." Well, that's what it said the first time, until I removed the application entry from the

Create Virtual Directory and Set Permissions IIS7 - Cannot read configuration file due to insufficient permissions

二次信任 提交于 2020-01-06 02:19:28
问题 I am trying to create a virtual directory and set it's permissions using IIS7 and C#. Here is a sample of my code: using (ServerManager serverManager = new ServerManager(webSite)) { ConfigurationSection anonymousAuthenticationSection = config.GetSection( @"system.webServer/security/authentication/anonymousAuthentication", webSite); anonymousAuthenticationSection["enabled"] = true; serverManager.CommitChanges(); return "true"; } This throws an exception and the message is: Cannot read

401 Unauthorized when custom IHttpHandler tries to read from virtual directory

ぐ巨炮叔叔 提交于 2020-01-04 11:04:03
问题 I have a custom IHttpHandler, specified in web.config as follows: <httpHandlers> <add verb="*" path="*.html" validate="true" type="PipingRedirectHandler" /> <add verb="*" path="*.htm" validate="true" type="PipingRedirectHandler" /> </httpHandlers> In IIS 7 (on Win 2008 R22) I added handler mappings with Path: *.html/*.htm and executable: %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll . I also have a virtual directory mapped to a windows share on another machine, Alias:

Visual Studio 2015 RC - Cant add virtual directory

倾然丶 夕夏残阳落幕 提交于 2020-01-04 06:53:21
问题 I recently upgraded my machine which meant I had to install VS 2015 RC community opened a previous project and had to recreate all my previous virtual directories only to find when I try I get the following error message: 'The operation could not be completed' when simply selecting Add Virtual Directory, enter the name and path and press enter. Anyone else had that or got an idea how I get round that? 回答1: Maybe editting your applicationhostfile will help. The virtual paths must be part of

Visual Studio 2015 RC - Cant add virtual directory

橙三吉。 提交于 2020-01-04 06:53:14
问题 I recently upgraded my machine which meant I had to install VS 2015 RC community opened a previous project and had to recreate all my previous virtual directories only to find when I try I get the following error message: 'The operation could not be completed' when simply selecting Add Virtual Directory, enter the name and path and press enter. Anyone else had that or got an idea how I get round that? 回答1: Maybe editting your applicationhostfile will help. The virtual paths must be part of