in vs2012 have solution 4 projects in it. curious if possible access different web.config files other projects other main web.config. have main project (project a) , 3 other projects (b, c, d) in same solution. when compile , run program system.web settings gathered project a , used. in project a's web.config file profile tag. project b,c,d web.config files contain profile tag. since solution uses project a's web.config file default web.config how access other web.config file's profile tags?
lets want grab profile application name project b. how go accessing web.config file? when tried access web.config file using:
profilemanager.providers["profile1"].applicationname;
in project b
's web.config file, gives me application name of profile1
.
well trying create profile in profilebase
"projectb" system.web config says profilebase
default profile provider "profile1" project a. web.config file in project b not being hit , visual studio compiled program use web.config file project a.
//this hitting profilebase projecta, not b calling create //(inside projectb uses b's web.config file or thought). system.web.profile.profilebase.create(username);
essentially, trying figure out how access profile tag web.config file in project b. when main web.config file in project a. issues arise when try create profile in project b using b's web.config profile attribute. program creates profile in project a's web.config profilebase shows not accessing different web config files correctly.
any on matter appreciated. trying access profiles different projects in same solution. far can figure out how create profile using main web.config file main project.
ex.
in project a
profile add name="profile1" /profile
in project b
profile add name="profile2" /profile
so in project a want able access project b's profile , name. run create on project b's profile base profiles created in project b , stored in b. tried use b's profile base calling create in b (which thought use b's web.config profile tag) didn't. program did create web.config of project , stored in a.
all 4 projects said "output type: class library"
Comments
Post a Comment