web-config

Asp.net dynamic User and activity based authorisation mixed with hide show site master html

可紊 提交于 2019-12-13 09:23:39
问题 I am failing to find good examples of user and activity based authorization for my ASP.NET web forms site. Currently, i am using user roles in web config to allow/deny access to pages within folders. But this method is proving to be a nightmare to maintain, especially when users come up with special case scenarios, which completely deviate from existing role permissions. So i am looking for a way to be able to store and retrieve user access rights, from the database and then enforce them on

I want to convert .htaccess file to web.config [closed]

时光毁灭记忆、已成空白 提交于 2019-12-13 09:13:02
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I want to convert .htaccess file to web.config . Here is the code AddType application/x-httpd-php .html RewriteEngine on RewriteBase / RewriteCond %{Request_Filename} !-d RewriteCond %{Request_Filenam}e !-f

How to get Connection String From the Web.config [duplicate]

只愿长相守 提交于 2019-12-13 08:47:30
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: In C# , how can I read a connection string stored in my web.config file connection string? I am using the SqlConnection class to connect to a sql server database. One of the constructors for this class required a connection string argument...What is the easiest way to get the required information from the web.config file.... 回答1: Use ConfigurationManager.ConnectionStrings collection to read connection string

Error Connecting to DB.mdf when published IIS

喜你入骨 提交于 2019-12-13 08:18:38
问题 I have been searching all over different sources in search on solving my issue.. I've published a website on IIS that I have been working on and this is my first published website on IIS. I seem to not be able to connect to the database. I will provide everything that I have done right down here.. Appreciate any help please.... My web.config file in the published website directory C:\FinancialHubTest . On a side note I also tried adding User Instance=True to my connection string in my web

Passing from CASSINI to IIS 7

六眼飞鱼酱① 提交于 2019-12-13 08:13:55
问题 Hi i'm testing a website on my local computer before deployment. When running the site with CASSINI using VS 2010 all is working fine... no error. When I Build a Package and Deploy on my Internal IIS 7 ... when loading the default page IIS 7 do not show up the page requested (neither errors) and let the browser DOWNLOAD the Page instead and do not displaying it. I have another test site in my local IIS and it is working fine. Because IIS does not show any error of any type (even if debug is

Server specific Web.config replacement

こ雲淡風輕ζ 提交于 2019-12-13 07:36:32
问题 I am currently using Visual Studio 2010. I want to set up a different connection string for my "Testing" Configuration. I have tried doing it by using config transformations, but it does not seem to work. In my Web.config my connection string is the following: <add name="MyDb" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DevelopmentDb;Integrated Security=SSPI; MultipleActiveResultSets=True" providerName="System.Data.SqlClient" /> I found out that you can replace the connection

Web.config Redirect to http://www.example.com to https://example.com

半城伤御伤魂 提交于 2019-12-13 07:04:56
问题 I want to redirect http://www.example.com, http://example.com or https://www.example.com to https://example.com. How do I do this with a web.config file? 回答1: Install the URL Rewrite module (it doesn't install by default). http://www.iis.net/downloads/microsoft/url-rewrite Once you have that, you can set up a rules section in your web.config under system.webServer/rewrite/rules. Add this rule: <rule name="Redirect www to domain" stopProcessing="true"> <match url="(.*)" /> <conditions

How can you know that current request exceeds maxRequestLength in ASP.Net?

青春壹個敷衍的年華 提交于 2019-12-13 06:31:54
问题 I'm developing a small web application in ASP.Net (framework version 3.5) using VS2008 and C# 3.0. There's a file upload, and I want to make sure that the whole request doesn't exceed 5 MB. I configured the web.config file and maxRequestLength is set properly. I'm overriding the page's OnError method. However, while investigating the exception, I don't see anything other than string literals and error codes that actually identify the "Maximum request length exceeded" error. All I have is the

Custom HTTP handler configuration fail

落花浮王杯 提交于 2019-12-13 06:27:14
问题 I am developing an ASP .Net website. I have created a custom HTTP handler to respond to requests aiming resources with .videoImage extension. Here are the first lines of the file corresponding to my handler : <%@ WebHandler Language="C#" Class="CompleteSubtitles.VideoImage" %> using System; using System.Web; using System.IO; using SubtitleSounds.DataManagement; namespace CompleteSubtitles { public class VideoImage : IHttpHandler { ... } } The handler file is located in a subfolder of the

Stop Web Configuration Inheritence with Azure Virtual Web Application

拥有回忆 提交于 2019-12-13 06:11:58
问题 I have created a web application project and deployed it to Azure. In the web.config file for this application, a number of <assembly> elements appear in the <system.web><compilation> element. Specifically, these assembly entries point to DevExpress assemblies but they could really be anything. I have also created a Web API project that is deployed as a virtual application under the web application. It looks like the <assembly> entries are being inherited from the configuration of the web