Tag Info

Hot answers tagged

7

Really confusing in SP2010, but you need to change the following web.config. "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config"


5

Unfortunately you have reached the limits of what SPWebConfigModification can do, you need to do the changes manually, i like xml transforms. But once you know you need to do 'some' changes manually, you may as well to them all manually, because the SPWebConfigModification mods will conflict with your manual mods. And SPWebConfigModification's can not be ...


5

I've implemented this method in the past, so I just share my code with you: add: private void AddAuthorizedType(SPWebApplication webApplication, string assembly, string namespace_) { SPSecurity.RunWithElevatedPrivileges(delegate { var modification = new SPWebConfigModification(); modification.Path = ...


5

We've found it's much easier to just add a webconfig.something.xml file to the Config folder. So for your one entry you can create an xml file with these contents: <?xml version="1.0" encoding="utf-8" ?> <actions> <remove ...


5

I would use a SPWebConfigModification: http://msdn.microsoft.com/en-us/library/bb861909.aspx Something similar to this: SPWebConfigModification handlerMod = new SPWebConfigModification(); handlerMod.Path = "configuration/system.webServer/handlers"; handlerMod.Name = "add[@name='SomeHandler'][@type='SomeHandler']"; handlerMod.Type = ...


5

In short, there's another web.config file in the LAYOUTS folder in the 14 hive that you need to change, it's set out fairly well here: http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=12


4

Removing all of the entries is a common problem, especially if you try and do it as you have done (and to be honest how you would expect it to be done). The trick is to remove all of the entries based on a specified Owner, you could use the .Net Class name for example. Vince Rothwell has posted a great article on this and this is what I would regard as ...


4

Use the object model (SPWebconfigModification), it applies the changes to all the web front ends of the specific web app you're working with.


4

Has someone been editing it in wordpad? Config files are UTF-8 and you're probably describing a character that is not in this set... Richer text editors sometimes replace things (such as replacing quotes with a curly representation that is actually another character altogether). Is there any indication as to what the characters should be?


4

If you're getting this error on sharepoint/wss specific pages, you also have to add following fragment to your web.config to view the stacktrace: <SharePoint> <SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false"> <PageParserPaths> ...


4

What are you using to make the edits? Can you try it from a different editor? Have you done a comparison of the modified and backup files with something like WinDiff (verify that truly only the time stamp changed and there isn't some obscure artifact being introduced). Verify the file encoding is the same and is not being changed when you save a new ...


4

I would recommend NOT to store appsettings in the web.config - use any other methods. SPWebConfigModifications are not reliable in all scenarions (just Bingle it and you'll find a plethora of posts about it). For instance the hierarchichal configuration storage in the P&P SharePoint guidance is a great way to store settings (http://spg.codeplex.com)


4

I haven't actually tried this myself in 2010, but I didn't think it was necessary to edit the web.config file manually these days. AFAIK, SharePoint Foundation does not support the custom error pages that are typically used in IIS sites. Check out this post by Todd Carter. You could use a feature receiver to deploy a custom error page into the SharePoint ...


4

For security reasons, you cannot access the web.config settings from javascript so the best approach would probably be to write a custom control / web part that can read the setting and then write it into the page into a script block.


3

Those changes should do it, even though I usually add debug="true" as well. Also make sure that you're editing the correct web.config (correct iis web application, or the correct one in the SharePoint root).


3

Most likely, you're activating the feature from Visual Studio. Here is a very interesting article about this issue from Waldek Mastykarz: Inconvenient SPWebConfigModification development with Visual Studio 2010 So, you should try to set "Activate on Default" property for the feature to False. About SPWebConfigModification class - I know at least 2 ...


3

Have you tried the following? In Central Admin > Operations > Services on Server Select your SQL server and stop the Windows SharePoint Services Web Application service (May have to select a custom role) NB - I haven't had the chance to try this out on a farm, so tread carefully!


3

Registering the FBA provider with Central Administration allows you to set the Site Collection Administrator to an FBA user. Additionally you might be needing it if you want to use User Profiles or Audiences with FBA users.


3

The problem is that in SharePoint, you have no idea how many web servers is running your site, and therefore you've no idea how many web.config's could be running (not you in particular, but in general, SharePoint can handle dozens of web front end servers). In order manage changes to the web.config file, the object model is design such that any and all ...


3

You can declare an enum in your webpart and expose that as property. An enum will be rendered as a dropdown in the properties toolpane. If you need more complicated behavior you need to create a custom ToolPart. //create enum public enum MyColorEnum { Red = 0, Blue, Yellow }; protected MyColorEnum _color; [Personalizable(PersonalizationScope.User), ...


3

Is the UNC path location you're writing to in the same domain as the SharePoint server(s)? If so, then I would just grant access to the app pool service account only and run your filesystem write code block with elevated privileges: SPSecurity.RunWithElevatedPrivileges If not, then you will probably need to login as and impersonate an account within the ...


3

I'd take a look at the following: Sharepoint 2010 Custom Error Pages I don't think there's a need to do anything, but leave the pages alone in IIS. Place your custom error pages in the custerr directory Edit the web.config file for your webapp(s) Update the customErrors node to include your custom pages Update the httpError node to turn on custom errors ...


3

In Visual Studio 2010 you can add Mapped folders which will deploy any file you want to any folder within SharePointRoot on every server.


3

Check this out : http://stsadmwebconfig.codeplex.com/


3

Please change your web.config file from: <PageParserPath VirtualPath="/TestSite/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/> to this: <PageParserPath VirtualPath="~/TestSite/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/> hope this help u..:)


3

Microsoft's patterns & practices group has published guidance for SharePoint 2010, including an heirarchical configuration storage provider as part of "The Application Setting Manager." Recommended.


3

I assume you need this because you want to control webpart properties from a central location. Below are the options you can consider : Use <appsettings> in web.config and read them using ConfigurationManager.AppSettings in webpart.This will allow you to store settings at the scope of web application. Use a list at Root site or subsites depending on ...


3

If this is for SharePoint 2010, you should be able to set this value through SharePoint. Go to the site collection you are wanting to change this on. Click Site Actions > Site Settings > Navigation. There are options there for 'Maximum number of dynamic items to show within this level of navigation:' which is defaulted to 20. Change that to what ever ...


3

You should modify the one in TEMPLATE\LAYOUTS. See here for more information. Also there are several tweaks and settings you can adjust when working with large files Consider the footprint of those large files on your server resources. You are basically holding up one IIS thread during the entire upload, as well as causing it to load in memory on both your ...



Only top voted, non community-wiki answers of a minimum length are eligible