Questions tagged [spwebconfigmodification]

A class of the Microsoft.SharePoint.Administration namespace that holds modifications that are made to the web.config.

Filter by
Sorted by
Tagged with
0 votes
1 answer
144 views

Error using SPWebConfigModification to update web.config

I am trying to update web.config using SPWebConfigModification and I am getting the following error: Exception calling "ApplyWebConfigModifications" with "0" argument(s): "...
2 votes
0 answers
577 views

A web configuration modification operation is already running

I have created a SPWebConfigModification with this script $webApplication = Get-SPWebApplication -Identity $url $WebApp = $WebApplication.Read() $configMod = New-Object Microsoft.SharePoint....
3 votes
4 answers
254 views

Where are SPWebConfigModification Objects Stored in the DB

Based on my understanding, it's stored in the SharePoint Config DB but I couldn't find it. It's not found in the "Objects" table nor at any other table. The background is I need to execute this ...
3 votes
1 answer
2k views

web.config Entries not Being Removed During Feature Deactivation

I'm writing a web application scoped feature receiver to make changes to web.config using SPWebConfigModification. Adding entries is working well. My problem is removing the entries. When stepping ...
1 vote
1 answer
469 views

Modifying Web.Config using SPWebConfigModification

I wrote the following code in my feature receiver to add a connectionString in the web.config: SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://devtools2012/sites/Test")); ...
2 votes
1 answer
329 views

Applying Web.config Modifications Without STSAdm

I have a solution where I am including a webconfig.Name.xml modification file in the CONFIG mapped folder. The problem is, it is only applied if I add a post-build step of: stsadm -o ...
1 vote
0 answers
832 views

SPWebConfigModification error "The '[' character, hexadecimal value 0x5B, cannot be included in a name. Line 2, position 2727."

I am using SPWebConfigModification thorugh webapplication feature everytime it shows error "The '[' character, hexadecimal value 0x5B, cannot be included in a name. Line 2, position 2727." I am very ...
0 votes
1 answer
179 views

Remove bindings using SPWebConfigModification

I am dynamically adding bindings in web.config. But I don't know how to remove it Here is complete code public override void FeatureActivated(SPFeatureReceiverProperties properties) { ...
5 votes
1 answer
871 views

ApplyWebConfigModifications caching issue

Doing some testing of adding multiple configuration settings during a feature activation. One of my trials caused an error with a setting, specifically around preCondition statement for system....
1 vote
1 answer
211 views

Web.config Modification Throws Access Denied in Application Page

I have an application page under _layouts, and in it I am trying to do a web.config modification. The page inherits from LayoutsPageBase. The code inside the event handler looks like this: SPSecurity....
0 votes
0 answers
317 views

'Add Solution': Object reference not set to an instance of an object

I have a WebApplication scoped feature and I am getting this error when I deploy. I have searched all over the internet, and the answers I have found are not much help. Here is the code that is ...
1 vote
1 answer
562 views

Problem to modify web.config in runtime

I'm trying to modify the web.config file when the feature is activated with the code below: public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPWebApplication webApp ...
1 vote
2 answers
3k views

How do I fix the error "Expression must evaluate to a node-set" setting web.config entries?

I'm trying to update web.config in SharePoint when the feature is activated. I have created Event receiver. The code inside receiver is: public override void FeatureActivated(...
0 votes
1 answer
921 views

Verify whether some node exists in SP web.config

Is any way how to find you whether some node exists in web config? SPWebConfigModification? or some other class? I belive there must be way how to find it out. Thanks.
0 votes
2 answers
953 views

Error while deleting keys from SPWebConfigModification

I got following error when I tried to remove item from the WebConfigModification. Exception calling "Remove" with "1" argument(s): "Object reference not set to a n instance of an object." I need ...
4 votes
1 answer
2k views

SPWebConfigModification adding child nodes in undesired order

I have some code that uses SPWebConfigModification to add a couple of nodes to the system.webServer/modules section. What I want to do is add a <remove name="MyModule" /> and then an <add ...
1 vote
3 answers
8k views

[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported

When the upgrade of 2007 to 2010 took place i started to get errors for my webparts on my website as mentioned below: Error[1] Web Part Error: A Web Part or Web Form Control on this Page cannot be ...
1 vote
0 answers
70 views

What is SPXmlDocCache & SPXmlDocCacheRefreshSentinel

I am getting UpdatedConcurrencyException: The object SPXmlDocCacheRefreshSentinel was updated by another user. in ULS during a web application scoped feature uninstall (as part of a solution uninstall)...
2 votes
3 answers
2k views

SPWebConfigModification class will not update Central Admin application's web.config file

Using SharePoint 2010 I am trying to use the SPWebConfigModification class to make some basic changes to web.config files on applications in the farm, including the Central Administration web.config ...
1 vote
1 answer
406 views

Add an <assembly> to web.config with SPWebConfigModification

I am trying to add an assembly to configuration/system.web/compilation/assemblies - but with the following code it I get Expression must evaluate to a node-set. private SPWebConfigModification ...
1 vote
0 answers
58 views

SPWebConfigModification and the SPContentService collection

I have created a class that parses an xml file and then adds the appropriate modifications to the web.config in my SharePoint 2010 web applications. When a feature is activated the proper mods are ...
1 vote
1 answer
505 views

Sharepoint 2010 failed to apply web.config modifications to Web Application

I have a SharePoint solution deployed into a specific web application on the production SharePoint site. When I try to enable the feature from the site features in Site Settings I get an error saying ...
2 votes
1 answer
521 views

How does SP resolve web.config modifications?

Specifically, if my code makes a change to the web.config to enable the ScriptResource.axd HttpHandler, and then another third party app comes along and also 'adds' the config entry (it doesn't add a ...
1 vote
0 answers
633 views

Error on SPWebApplication.WebService.ApplyWeyConfigModifications

I've been trying to add a line to my web.config through a EventReceiver on my webpart's Feature. I tried to follow some 'tutorials' (this, this and this). It wasn't working, but at least i could ...
1 vote
2 answers
188 views

SPWebConfigModification class not found?

Using Sharepoint 2010, I am trying to use the SPWebConfigModification class to add connection strings the the sharepoint's web.config. My problem is that the class SPWebConfigModification is not ...
4 votes
2 answers
2k views

Add custom error handler at beginning of modules section in web.config (not manually)

Is there a way to put an error handler HTTPModule at the beginning of the modules section in web.config without doing this manually? I've tried the supplemental web.config approach like this: <...
0 votes
0 answers
312 views

Manage Content and Structure Custom Errors After Upgrade

I upgraded to SharePoint 2010 and now I can not get access to the content and structure section located under "Site Actions". The runtime error appears telling me that an Application error occurred on ...
1 vote
2 answers
210 views

Setting individual WFE config setting

As per my understanding SPWebConfigModification class modifies the web.config across the farm, including all WFE. Are there any workaround to set some WFE specific web.config setting, like licence key ...
3 votes
1 answer
2k views

How to register an ashx handler through sharepoint 2010 farm solution

I have a 3rd party control that i want to add to the web part. That 3rd party control uses a generic ASHX handler. I can always add the registration to the actual WFE web.config but it's a bit ...
0 votes
1 answer
513 views

Getting "Expression must evaluate to a node-set" exception while adding HttpHandler entries to web.config programmatically?

I'm trying to update web.config in SharePoint when the feature is activated to register an HttpHandler. The code inside receiver is var configModifications = new SPWebConfigModification { Owner =...
0 votes
2 answers
837 views

WebConfigModifications contains modifications applied before

I have SP2010. I know web.config modifications is not always the best way to modify web.config according to some articles from Internet, but we have what we have. My goal is to make the following ...
1 vote
2 answers
451 views

SPWebConfig Modification Code Review

I have read about best Practices for development once it comes to SPWebConfigModification and write feature to read xml file and modify web.config files and works fine on my local environment but once ...
1 vote
1 answer
3k views

WebConfigModifications Remove functionality is not working in SharePoint 2010

I am using the following code to remove a web.config modification which added to web.config via one feature Collection<SPWebConfigModification> applicationModifications = webApplication....
1 vote
2 answers
324 views

What are the typical reasons for modifying SharePoint web.config

In code utilizing SPWebConfigModification what would the typical reasons be for wanting to modify Two examples I know of are: Adding a Safe control to the config, and making general changes to the ...
2 votes
2 answers
279 views

SharePoint - 14/Layouts web config changes programatically

I want to add web config changes to my 14/LAYOUTS/web.config file. How can i achieve this.
1 vote
2 answers
1k views

Web.Config Modification not removing

I'm using the code below to add and remove a web.config change when my solution is being installed and uninstalled. The addition is working perfectly, however, the removal (although updating the web....
0 votes
1 answer
414 views

Problem adding child nodes using SPWebConfigModification

I'm using SPWebConfigModification to update web.config. I've got the following scenario: <configuration> <configSection> <sectionGroup> <childnodes /> </...
2 votes
1 answer
507 views

Features Overwriting Each Other Changes in Web.config

We've two features both are designed to update (and modify) the web.config. One feature doesn't have any interface it is a SPJob which run on feature activation and copy user controls into web ...
2 votes
2 answers
702 views

Editing web.config file from a feature using linq

I have custom web.config functionality that uses Linq to merge elements into a web.config based on a template file. I would like to use this in a feature so I can get it to merge all web.configs in a ...
3 votes
3 answers
3k views

Can't remove web.config entries with SPWebConfigurationModification

I have a problem with removing web.config entries. To add entries with the SPWebConfigurationModification is no problem, but whether i try to remove this entries again nothing happens. Any idea why? ...