system.web


Can't programmatically access WebConfigurationManager in VS 2012


In my VS 2012 project, I have a reference to System.Web.
If I browse System.Web in Object Brower, it contains System.Web.Configuration.WebConfigurationManager; but in my code, System.Web only shows me AspNetHostingPermission, AspNetHostingPermissionAtribute, AspNetHostingPermissionLevel...
In VS2010 I don't have this problem.
Any suggestions?
In Object Browser, simply browsing System.Web will allow you to drill into all of System.Web.dll's namespaces (e.g. System.Web.Configuration).
In code, however:
You need a using statement (assuming C#) for each namespace in the assembly before IntelliSense will display the types within it (or the code can reference them).
Your project's target framework (in the project's properties) also needs to be set correctly.
using Statement
In the code file in question, it sounds like you may then have...
using System.Web;
...but not:
using System.Web.Configuration;
In this case, add using System.Web.Configuration; to the code file.
Target Framework
Another possibility is that your VS 2012 project's target framework (i.e. Application > Target framework in the project's properties) is incorrectly set to a .NET Framework client profile – for example...
.NET Framework 4 Client Profile
...instead of:
.NET Framework 4

Related Links

Can't programmatically access WebConfigurationManager in VS 2012
can't find System.Web.Security namespace on codeplex

Categories

HOME
pug
oauth
mapping
wildcard
laravel-5.3
jasmine
automated-tests
hyperledger-fabric
dataframe
simpy
urlencode
spring-cloud-contract
xcode8.3
rfid
xlsx
abcpdf
gwtp
cosmicmind
cratedb
sign
aspell
boolean-expression
pycrypto
shippo
rails-activerecord
cruisecontrol.net
onsen-ui
binutils
cep
edge-detection
autofill
referenceerror
clockwork
m2e
google-drive-realtime-api
salesforce-chatter
qtablewidget
nsurlconnection
threshold
bing-maps-api
strstr
polyfills
lexical-analysis
jrules
distributed-transactions
3scale
email-parsing
nstouchbar
webdatagrid
livescribe
bnd
text-classification
crystal-reports-8.5
jcreator
build-process
vst
update-site
gameanalytics
angularjs-ng-pattern
mongoskin
emokit
persistence.xml
document-oriented-db
js-cookie
base32
harp
uptodate
orientation-changes
moai
gmaps4rails
colt
initialization-vector
json-patch
goinstant
jqmobi
multiple-conditions
client-side-scripting
objcmongodb
cosm
gjs
ubuntu-11.04
hinstance
path-manipulation
coff
posting
adsl
pureftpd
recordset
yajl
unreachable-code
grooveshark
visual-studio-2010-beta-2
lazy-c++
standardized
associativity
dotproject

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App