How to combine web.config section encryption and the usage of WebConfigModification

Hi,
I have a question about encrypting web.config section that are shared across solutions which might use WebConfigModifications to change the SharePoint web.config.
Currently, I've embedded custom assemblies in my SharePoint solution. These assemblies read configuration items from the web.config so we need elements in the SharePoint web.config. We added those using the WebConfigModification class. No problem
so far.
Additionally, we want to encrypt specific sections, because they contain sensitive information. I tested this and encrypted the specific section. SharePoint still worked and my solution still worked. Still no problem so far.
However, when I deactivate features that need to remove entries from that specific encrypted configuration section, the entries are not removed. Also, when I activate features that need to add entries to that specific encrypted configuration section, the
entries are added within the section, but besides the encrypted content in that section. In the last case, SharePoint crashes complaining about invalid configuration. Makes sense, since entries exist twice (once encrypted, once unencrypted).
Now we can tackle this issue when it's about sections are specifically created for our application/assemblies, but what if this is about section that are also used by other assemblies/solutions, say "connectionStrings" or "appSettings".
Other SharePoint solutions might want to make changes to these sections as well using the WebConfigModification class. Those assemblies might not be able to deal with encrypted sections.
Is there a way to deal with this issue, to be able to encrypt these 'shared' sections without other solutions generating a bunch of errors and crashing?
Thanks in advance for any replies!
Cheers,
Ruud Hunnekens.

Hi Ruud Hunnekens,
From your description have you tried to first decrypt the section of the web.config file before removing the section nodes. In the feature activated event, add the section nodes and encrypt the section, then in the feature deactivated event, decrypted the
section, then delete the nodes, check whether this works.
Thanks,
Qiao Wei
TechNet Community Support

Similar Messages

  • I already have a new book that is ready to publish as an iBook. In addition I also have an app prepared for this book. Please tell me how to upload this book (title is: "How To Cope...with life") and the app for it into your iBook Authors app so I can hav

    I already have a new book that is ready to publish as an iBook. In addition I also have an app prepared for this book.
    Please tell me how to upload this book (title is: "How To Cope...with life") and the app for it into your iBook Authors app so I can have it offered for sale @$0.99, in your app store?
    FROM: Terry Weber, Email: [email protected]

    https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/wa/bookSignup

  • I just upgraded to iOS 7 and I realized that the "Completed" tasks folder in the "Reminders" application was erased. I had important information there. How can I recover my completed tasks and the dates the tasks were completed?.

    I just upgraded to iOS 7 and I realized that the "Completed" tasks folder in the "Reminders" application was erased. I had important information there. How can I recover my completed tasks and the dates the tasks were completed?.

    Restore from your iTune backup.

  • I cannot attach How do I get my bookmarks back and the attachments to work again?

    How do I get my bookmarks back and the attachments to work again?

    Have a look at > One or more keys on the keyboard do not respond

  • How to find last accessed/updated tables and the query text?

    I am using :
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    How to find last accessed/updated tables and the query text?
    Regards
    LEE1212

    Check DBA_TBALES view there you find one date column that indicate last update
    One option is as follows:
    (1) Turn the auditing on: AUDIT_TRAIL = true in init.ora
    (2) Restart the instance if its running.
    (3) Audit the table:
         AUDIT INSERT,SELECT,DELETE,UPDATE on TableName
         by ACCESS WHENEVER SUCCESSFUL
    (4) Get the desired information using :
         SELECT OBJ_NAME,ACTION_NAME ,to_char(timestamp,'dd/mm/yyyy , HH:MM:SS')
         from sys.dba_audit_object.
    Cheer,
    Virag Sharma
    http://virag.sharma.googlepages.com/
    http://viragsharma.blogspot.com/
    Message was edited by:
    virag_sh

  • I have deleted all photos from my iphone and the usage is still showing 6.6GB used. How do I fix this?

    I have deleted all photos from my iphone and the usage is still showing 6.6GB used. I have connected via my computer and no pictures are shown. I have also gone into all my photo apps and no photos are saved. How do I resolved this?

    If you deleted photos from the Camra Roll of the photos app they are not deleted immediately. Instead they are moved to the Recently Deleted album where they will remain for 30 days. This feature was added because so many people deleted photos then wanted then back.
    To completely delete those photos quickly go to the Recently Deleted album and delete them from there.

  • My Iphone 4S WON'T turn off! And the Usage is running up constantly!

    And the Usage is running constantly even when all my apps are closed.  Started out of no where yeseterday.  Tried Hard shutdown, as well as a restore. Help?

    Well... I am sorry to say but it seems to be a global issue based on this article:
    http://gizmodo.com/5854373/report-apple-puzzled-by-iphone-4s-battery+sucking-iss ues
    I checked several other thread with the same subject and it does not seem like anyone found a solution yet beside shutting down iCloud, turning off data roaming and 3G (basically turning off everything that eats the most battery).

  • How to combine multiple Details section rows in my report

    Hello,
    I am currently creating a report which will display employee details, which includes first name, last name, home phone, cell phone and Email.
    I get my First Name and Last name from the "Employees" table but all other info is situated in the "CommunicationLinks" table.
    The tricky part which I am having issues with is the Home Phone, Cell Phone and Email are all under the same field in this table, the field is called "DisplayAs".
    These 2 tables are linked together by taking Employees.LinkID and linking it to CommunicationLinks.LinkIDParent, which are matching linkids.
    The only issue that I have, is for example, if you look at the screenshot provided, I have 5 details section that gets populated for the same employee.
    How can I combine all these 5 records to only one?
    The homephone, cellphone and email field have formulas created for them, the formula is as follow.
    This example below is for the HomePhone field, the others have different type assigned to them
    If {CommunicationLinks.Type} =1 then
    {CommunicationLinks.DisplayAs}
    else ""
    Homephone, Cellphone and Email are all different types but uses the same field "DisplayAs".
    I also tried creating a subreport for each of these fields but seems to give me the same results.
    Any help would be really appreciated.
    If you have any other questions please let me know. See attached screenshots for reference.
    Thank you in advanced.
    Jocelyn

    Easier way without working in SQL:
    1.  Group by a field that is unique to the employee.
    2.  Suppress the employee group header and the details sections.
    3.  Create a couple of formulas:
    {@ClearVariables}
    WhilePrintingRecords;
    StringVar HomePhone := "";
    StringVar CellPhone :="";
    StringVar Email := "";
    Put this formula in the employee group header - even though the section is suppressed, it will evaluate.
    {@SetVariables}
    WhilePrintingRecords;
    StringVar HomePhone;
    StringVar CellPhone;
    StringVar Email;
    if {CommunicationLinks.Type} =1 then
      HomePhone := {CommunicationLinks.DisplayAs};
    else if {CommunicationLinks.Type} = <type for cell> then
      CellPhone := {CommunicationLinks.DisplayAs};
    else if {CommunicationLinks.Type} = <type for email> then
      Email := "";
    Put this formula in the details section - it will evaluate even though the section is suppressed.
    {@HomePhone}
    WhilePrintingRecords;
    StringVar HomePhone
    (Do the same for Cell Phone and Email.  Note that there is no semi-colon at the end of this one!)
    Put these formulas and all of the rest of the employee data in one or more Employee group footer sections.
    -Dell

  • Web Sevices Manager encryption and  identyfication

    Hi,
    I installed Oracle Web Services Manager (coresv 4.0.3) with bundled AS on one machine . After registering one test service (from another AS) I wrote simple java client in JDeveloper, which requests service and print output on screen, and everything works fine - owsm get request, call service from another AS, get response, and finally send response to java client.But, problems start with XML Encrypt and XML Decrypt policy steps in owsm, i found that in either case error message was same: Step execution error. I should say that I use encryption key which is proven in another application, so it works fine. Have someone any idea?
    Second problem is when I set policy step: Active directory authenticate. This step is configured to work with localhost (which is domain controller), listening port 389 and baseDN: CN=Users,DC=ocean,DC=ba (this is correct baseDN, when I use ldp.exe to query Active Directory, this baseDN gives me all users in system). In my client, I wrote something like this:
    myPort.setUsername("Administrator");
    myPort.setPassword("*************");
    but owsm gives error message:
    Invalid username and password
    Interesting thing is that, when I set wrong port (e.g. 999,766, 901....) I still have same error message.
    Thanks, Almir

    Hi,
    I'd be happy to know how you succeded in installing owsm on AS?
    I've been trying and don't succeed...
    thanks
    deborah

  • How to combine Digital Output, a delay and Analog Input in a fast loop

    I need to develop a process loop that runs at least at 250 Hz that performs a Digital output, than a delay of 50 microseconds and than an analog input of all the channels. All will be done using ATI MIO 64E3 card. Of course, the acquired data will be processed, displayed and saved. The loop will be running for several minutes until user stops it.

    The fastest and most precise timing will occur if you use hardware timing. You can apply hardware timing to analog input on the E Series boards, but not the digital lines. Let's focus on the analog input first. Continuous waveform scanning uses a scan clock, which can be the board's internal one or an external one which you apply. If you want to scan all the channels 50 microseconds after a digital rising edge, then you need an external signal to signify that scan clock.
    The E Series boards also have 2 counter/timers onboard that you can use for this purpose. You can set up a retriggerable pulse generation operation, where the counter receives a trigger and then on the user specifications, produces a pulse. You can have that route to the analog input scan clock.
    The trigger signal for the counter is that digital pulse. As I mentioned earlier, there is no hardware timing for the digital lines on an E Series board. We do have other digital boards (653x family) that have hardware timed operations if precision is important. If you are satisfied with software's resolution (in the milliseconds), then you can call the E Series board digital function in a loop with a software timer. That digital line can route to the counter to act as the trigger.
    So, on the programming side, you can have three separate and independent operations in parallel. One is for the digital function to output on that line every so often. Another is for the counter set at the retriggerable pulse generation. The last is for the analog input. I will describe this in terms of LabVIEW, but it can be done in a similar fashion with the NI-DAQ function calls or Measurement Studio.
    The digital examples are in the LabVIEW >> Examples >> Daq >> Digital >> E-Series directory. The Generate Retriggerable Pulse example is in the LabVIEW >> Examples >> Daq >> Counters >> DAQ-STC directory. The E Series boards use the DAQ-STC timing chip.
    Go to the LabVIEW >> Examples >> Daq >> anlogin >> strmdisk.llb directory and start with the Cont Acq to Spreadsheet File. This shows how to continuously acquire data and stream it to disk while displaying the data on a chart. Streaming to disk is the efficient way to save data while you are acquiring, as it eliminates the overhead of always opening and closing the file through the iterations of the loop. This saves to a file that can be opened by other applications (Excel, Word, etc.), but it is not as fast as writing to a binary file, which must be opened and read back through LabVIEW. However, for your ~250 Hz rate, it should be fine. Then, go to the LabVIEW >> Examples >> Daq >> anlogin >> anlogin.llb and look at the Acquire N Scans -ExtScanClk example. This shows how to apply the scan clock. Here, the AI Start that you saw in the previous example is replaced by 4 VIs (3 AI Clock Config's and the AI Control). Make those changes to the first example and then add a constant 0 to the AI Control parameter for total scans to acquire. That specifies the continuous operation. The File >> VI Properties >> Documentation menu item of the example describes the physical connections.
    If you aren't using LabVIEW, use the NI-DAQ User Manual and the NI-DAQ Help file installed on your machine. You can look at your AT E Series User Manual at the http://www.ni.com/manuals pages for more information on the hardware. Also, if you want to route those signals internally on the board, you can find some entries in the KnowledgeBase at the http://www.ni.com/support pages.
    Regards,
    Geneva L.
    Applications Engineering
    National Instruments
    http://www.ni.com/ask

  • How to protect Web.config from deletion

    My web.config file holds custom error redirection info on the
    remote server (it is created by Internet Information Services 7).
    There is no corresponding file in my local files. When I synch my
    local files to the remote server, Dreamweaver always offers to
    "Delete" the remote file web.config, since it is not found in the
    local files. This is of course undesirable. Is there a way to
    effectively cloak this file or otherwise protect it from
    inadvertent deletion during the process of synchronization? I
    probably won't remember each and every time I synchronize to set
    this file to "Ignore".

    Download the web.config file from the server into the local
    site.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "EGibbon" <[email protected]> wrote in
    message
    news:gocic6$9dm$[email protected]..
    > My web.config file holds custom error redirection info
    on the remote
    > server (it
    > is created by Internet Information Services 7). There is
    no corresponding
    > file
    > in my local files. When I synch my local files to the
    remote server,
    > Dreamweaver always offers to "Delete" the remote file
    web.config, since it
    > is
    > not found in the local files. This is of course
    undesirable. Is there a
    > way
    > to effectively cloak this file or otherwise protect it
    from inadvertent
    > deletion during the process of synchronization? I
    probably won't remember
    > each
    > and every time I synchronize to set this file to
    "Ignore".
    >

  • How to inspect web app using safari and ipad and USB cable?

    On my mac I have
    OSX 10.10.2 (14C109)
    Safari Version 8.0.3 (10600.3.18)
    On my Ipad 2 (MC769X/A) i have
    OS 8.1.3 (12B466)
    Safari Web Inspector "on"
    Javascript "on"
    There are no "privacy" or "private mode" settings that I can see.
    I physically connected my iPad to my Mac and chose that I trust this computer. Confirmed that it's connected by looking in iTunes (and quit iTunes afterwards).
    I opened a web app on my iPad that's running on my local server, and then opened safari on the mac.
    I then opened the Develop menu and can see the ipad. The menu does not contain any other entries other than "Use for development..."
    My mac also shows "No inspectable applications", whatever that means.
    If I choose "Use for development" under the iPad menu, nothing at all happens and the menu item disappears.
    To get the iPad sub-menu back again I have to quit Safari and then re-open it.

    I'm sorry I don't buy this as an answer because:
    it's for a question that is 2 years old and for older devices. My devices are all the latest version
    I have XCode and I'm a member of the develop program already.
    XCode does not offer a way to create a project or other pairing between safari on the mac and on the ipad, since that is a built in feature of Safari
    It works with IOS Simulator, but not with the actual device even when all correct steps have been followed to pair / connect them
    The problem I'm trying to resolve works in IOS Simulator but does not work on an actual device.

  • How to save web service request key and response value in cache to reduce calling the service for same type of requests

    Hi
    I have a web service which return the response based on the request key.
    I need to save the key and the response value in cache for around 30mins
     to reduce the web service calls for better performance.
    Appreciate if any once can share a sample code

    using System.Runtime.Caching;
    public List<string> cachingwebserviceresponse()
    {//Create a cache key
    string strParameters = "1234";//Create a cache value holding object
    List<string> results = new List<string>();//Create a cache
    ObjectCache cache = MemoryCache.Default;//Assign key for the cache
    string cacheKey = strParameters;//Check whether the key exists in the cache//If exists assign the values from the cache instead of calling the webservice//else call the web service and add the response to the cache
    if (cache.Contains(cacheKey))
    results = cache.Get(cacheKey);
    else
    { //calling the web service client
    using (service.webservice fd = new service.webserviceContractClient())
    { //Call the web service function to get the results
    results = fd.DataSearch(strParameters);
    } //Create the cache expiration policy. I have created for 30 minutes.
    CacheItemPolicy cacheItemPolicy = new CacheItemPolicy();
    cacheItemPolicy.AbsoluteExpiration = DateTime.Now.AddMinutes(30); //Add the response to the cache based on the key
    cache.Add(cacheKey, results, cacheItemPolicy);
    return results;

  • How to combine a stacked bar chart and a line graph together in one report

    I have a report in excel that has stacked bar chart and a line graph together in one report. I am trying to recreate the same in Webi, Is this possible? Did any one have similar requirement, could you please share the thoughts?
    Thanks,
    Hema

    May be I don't understand correctly...
    But if its really to separate chart area's;
    just copy the datablock and format one as line and the other as barchart...
    Hope this helps,
    Marianne

  • Mapping of Web App context root and the physical directory of the web app

    I'm running Weblogic 7.0 on Windows2000.The physical directory of my web application
    is D:\WL8\weblogic81\TestDeploy\build\TestWebApp and under these directory I have
    my JSPS, static HTML and WEB-INF. I define the context path of this web app in
    the weblogic.xml ;-
    <weblogic-web-app>
         <context-root>/testapp</context-root>
    </weblogic-web-app>
    As a result of deploying this web app in the server (or it may be created manually
    also), the following entry gets inserted in the server's config.xml ,-
    <Application Deployed="true" Name="TestWebApp"
    Path="D:\WL8\weblogic81\TestDeploy\build" TwoPhase="true">
    <WebAppComponent Name="TestWebApp" Targets="myserver" URI="TestWebApp"/>
    </Application>
    Now, whenever I make a request of the form "http://localhost:7001/testapp/..",
    it's properly executing my web app. My question is, how does the container knows
    that for any request for the web app with context path as 'testapp', it has to
    server files from D:\WL8\weblogic81\TestDeploy\build\TestWebApp. In the above
    process, nowhere such mapping is specified. I expected something like Tomcat's
    server.xml, where in docbase we clearly specify this mapping between the context
    path and the physical directory. Please help.

    Let me give some more details and hopefully this will make things clearer.
    Say you deploy /foo/bar/myweb.war and in myweb.war you configure a
    context-root of /rob
    During deployment, the server creates an ApplicationMBean with a path of
    /foo/bar/. It then creates a WebAppComponent with a uri of myweb.war.
    Next, deployment calls back on the web container and tells it to deploy
    the WebAppComponent. The web container reads the myweb.war, parses
    descriptors etc. The web container then updates its data structures to
    register that myweb.war has a context path of /rob. (It has to figure
    out all the other servlet mappings as well.)
    When a request for /rob/foo comes in, the web container consults its
    data structures to determine which webapp and servlet receives the
    request. This is not a linear search of all webapps and servlets.
    There's much better ways to do pattern matching.
    Hope this clears things up. Let me know if you still have questions.
    -- Rob
    Arindam Chandra wrote:
    Thanks for the answer. Still one thing is not clear. Whatever context path I declare
    for my web app as the value of <context-root> element in the weblogic.xml (in
    my example it's "/testapp"), it is no where mapped with the "URI" attribute (or
    any other attribute, sub-element whatsoever in the <Application> element).
    Application Deployed="true" Name="TestWebApp"
    Path="D:\WL8\weblogic81\TestDeploy\build" TwoPhase="true">
    <WebAppComponent Name="TestWebApp" Targets="myserver" URI="TestWebApp"/>
    </Application>
    So when a request of the form http://myweblogic.com:7001/testapp/... arrives at
    the server, how does the server knows that it has to serve this request with files
    from D:\WL8\weblogic81\TestDeploy\build\TestWebApp ? It should not be like the
    web container iterates thru all the web application entries in config.xml and
    tries to match with one context-root declaration. I repeat, I expected some mapping
    similar to Tomcat's server.xml, where in the <docbase> element u clearly specify
    the mapping between the context path and the physical directory
    Rob Woollen <[email protected]> wrote:
    Arindam Chandra wrote:
    I'm running Weblogic 7.0 on Windows2000.The physical directory of myweb application
    is D:\WL8\weblogic81\TestDeploy\build\TestWebApp and under these directoryI have
    my JSPS, static HTML and WEB-INF. I define the context path of thisweb app in
    the weblogic.xml ;-
    <weblogic-web-app>
         <context-root>/testapp</context-root>
    </weblogic-web-app>
    As a result of deploying this web app in the server (or it may be createdmanually
    also), the following entry gets inserted in the server's config.xml,-
    <>So the server will look for your web application at the Application Path
    (D:\WL8\weblogic81\TestDeploy\build|) + the web uri (TestWebApp). So
    it
    maps the context-root you've specified /testapp to that path.
    It's a little clearer in the case where you had a full-fledged EAR.
    Then you'r application path would map to the "root" of the EAR, and the
    uris would point to the various modules (eg webapps.)
    -- Rob
    Now, whenever I make a request of the form "http://localhost:7001/testapp/..",
    it's properly executing my web app. My question is, how does the containerknows
    that for any request for the web app with context path as 'testapp',it has to
    server files from D:\WL8\weblogic81\TestDeploy\build\TestWebApp. Inthe above
    process, nowhere such mapping is specified. I expected something likeTomcat's
    server.xml, where in docbase we clearly specify this mapping betweenthe context
    path and the physical directory. Please help.

Maybe you are looking for