web-config

How can I determine the memory footprint of a session variable?

廉价感情. 提交于 2019-12-14 03:42:41
问题 Also, web.config - please explain. <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="120"/> We are using inproc mode and we used the 20 session variable in our web application. We need to know each variables Occupying the memory spaces. 回答1: From George Shepherd's ASP.NET FAQ at http://www.syncfusion.com/faq/aspnet/web_c9c.aspx 36.37 Is there any way to know how much memory

How to properly encrypt my Web.config using aspnet_regiis.exe?

筅森魡賤 提交于 2019-12-14 03:42:34
问题 Based off of this page, I did the following: Went to "All Programs" -> "Microsoft Visual Studio 2012" -> "Visual Studio Tools" -> "Open VS2012 x64 Native Tools Command Prompt". Typed: aspnet_regiis -pe "connectionStrings" -app "C:/FirstName-Projects/ProjName-TEST/SolutionName/Web.config" -prov "DataProtectionConfigurationProvider" Received: "The value used in the -app parameter must begin with a forward slash." I'm guessing I did something wrong in my attempt to call the Web.config file down

How do I enable IntelliSense in VS 2013 for <rewrite> in transform .config?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-14 03:41:59
问题 I decided I wanted to move some rewrite rules into our web.release.config and web.staging.config files in order to keep the rewrite rules relevant to the environments our different configurations run on. IntelliSense didn't like this decision and wouldn't play ball because: xdt:Transform "attribute is not declared" for the <rewrite> element. I looked at RuslanY's solution here and I considered several solutions on this site but none of them provided the solution to this particular problem in

How to read web.config APP key settings in HTML markup

≯℡__Kan透↙ 提交于 2019-12-14 03:39:26
问题 I have an ASP.NET site which uses a 3rd party activeX control. I have to pass a few parameters to the OBJECT tag in the HTML page. If i hardcode these parameters into the HTML everything works. I would like to place the parameters in my web.config with app settings "key/value" pairs. My problem is i cannot read the app key setting in the HTML markup to succesfully pass them in as parameters. I can read them fine from server side code behind. What's the correct way to read these settings in

Select correct path for files from App Under IIS

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-14 02:35:53
问题 I have inherited an .NET app that is hosted on IIS. Previously it would have been its own site within IIS. Now in my Dev environment I have to run it under Default WebSite (in Production it will still run as its own site. So in Dev I was having problems loading scripts and css files - so I right click Default Web Site in Dev and Add Application - call the new App - MyApp and point to the physical location on disk. So previously style sheets would have been loaded: href="/css/folder

shared session-state over subdomain

独自空忆成欢 提交于 2019-12-14 02:35:24
问题 I read thousand of doc but nothing work for me. 1) What I want : on my server-side I used the following variable : (string)Session["myData"] 2) When I changed the subdomain www.myDomain.com/myPage.aspx OR myDomain.com/myPage.aspx OR myUser.myDomain.com/myPage.aspx My problem : I loose the Session data when I go from one of those domain to another. 3) I want to keep the session-state only with cookie and inproc mode : <sessionState mode="InProc" cookieless="UseCookies" cookieName="myDomain.com

Turning off only the Role Provider in SimpleMembership

佐手、 提交于 2019-12-14 02:23:41
问题 I have read a ton of different posts and tutorials and couldn't find an answer to this specific need. I'd like to use the SimpleMembership provider in my ASP.NET MVC app, but I would like to turn the Role provider off (OAuth too since I will not be using it). That means that I would like the SMP to create only webpages_Membership table on initialization, not the tables for oauth or roles. Note that I don't want to turn off the SimpleMembership, only the roles and the oauth support. Question:

Error “The type or namespace name 'ProfileCommon' could not be found”

亡梦爱人 提交于 2019-12-14 02:07:16
问题 I'm trying to set up a YAF forum 1.9.4 and am having a problem with the profile section in the config: <profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile"> <providers> <clear/> <add connectionStringName="ConfettiSQL" name="YafProfileProvider" type="YAF.Providers.Profile.YafProfileProvider"/> </providers> </profile> When I tested this locally everything worked fine but on on my web server I get the following error: The type or namespace name

Visual Studio 2013/2015/2017 profiler adds Not publishable lines in web.config?

泪湿孤枕 提交于 2019-12-14 00:31:48
问题 Today I was just profiling my WCF application using the profiler of visual studio in Instrumentation mode. Later I needed to a publish to my web server and suddenly I was getting an error saying that Microsoft.VisualStudio.Enterprise.AspNetHelper file path can't be found. when I reviewed my web.config, I have seen that following lines were added by profiling session. <system.web> <compilation targetFramework="4.0" debug="true" assemblyPostProcessorType="Microsoft.VisualStudio.Enterprise

Calling a stored procedure with asp.net

谁说胖子不能爱 提交于 2019-12-14 00:16:19
问题 If I have a connection string defined in my web.config file, how do I create a connection to the SQL db from C# code (sorry forgot to specify) and then call a stored procedure. I would then like to eventually use this data in some way as my DataSource for a GridView. Here is how the connection string is defined in the web.config: <connectionStrings> <add name="db.Name" connectionString="Data Source=db;Initial Catalog=dbCat;User ID=userId;Password=userPass;" providerName="System.Data.SqlClient