Skip to main content

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
5 votes
1 answer
879 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....
JadedEric's user avatar
  • 523
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 ...
danludwig's user avatar
  • 291
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: <...
Tom Bola's user avatar
  • 381
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? ...
user avatar
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 ...
Roman's user avatar
  • 303
3 votes
4 answers
301 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 ...
Celbester's user avatar
  • 193
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 ...
Mike H's user avatar
  • 695
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.
Monica Jagani's user avatar
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 ...
OedipusPrime's user avatar
2 votes
2 answers
703 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 ...
gaotter's user avatar
  • 588
2 votes
1 answer
524 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 ...
Lane Goolsby's user avatar
2 votes
1 answer
509 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 ...
user avatar
2 votes
0 answers
618 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....
Danny's user avatar
  • 478
2 votes
1 answer
334 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 ...
Ricardo Peres's user avatar
1 vote
1 answer
504 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")); ...
Tigershark6's user avatar
1 vote
2 answers
213 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 ...
user4205's user avatar
  • 601
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....
Ahmed Atia's user avatar
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 ...
user avatar
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 ...
wayne9999's user avatar
1 vote
2 answers
328 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 ...
dbobrowski's user avatar
1 vote
1 answer
411 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 ...
Max Melcher's user avatar
  • 2,539
1 vote
1 answer
508 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 ...
Gavin Bateup's user avatar
1 vote
2 answers
454 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 ...
Ronak's user avatar
  • 359
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....
user avatar
1 vote
0 answers
841 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 ...
Mou9383's user avatar
  • 11
1 vote
1 answer
216 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....
Ricardo Peres's user avatar
1 vote
1 answer
564 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 ...
user20336's user avatar
1 vote
0 answers
71 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)...
lgaud's user avatar
  • 1,971
1 vote
0 answers
59 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 ...
Maxmanzero's user avatar
1 vote
0 answers
635 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 ...
C. Hoffmann's user avatar
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(...
zosim's user avatar
  • 125
0 votes
2 answers
955 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 ...
Rohita Khatiwada's user avatar
0 votes
2 answers
841 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 ...
Antipod's user avatar
  • 167
0 votes
1 answer
175 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): "...
klevans's user avatar
0 votes
1 answer
923 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.
Peter P's user avatar
  • 69
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 /> </...
sbtahir's user avatar
  • 225
0 votes
1 answer
182 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) { ...
Happy's user avatar
  • 513
0 votes
0 answers
319 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 ...
lazoDev's user avatar
  • 1,806
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 ...
wayne9999's user avatar
0 votes
1 answer
531 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 =...
Ahmed Atia's user avatar