11

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://web.archive.org/web/20130909002813/http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=12


6

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 = ...


6

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 path="configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes/authorizedType[@Namespace=&quot;...


6

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 = "configuration/System.Workflow....


4

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 ...


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.


4

You should put your configuration attributes in the web.config located at C:\inetpub\wwwroot\wss\VirtualDirectories and choose the folder of your Web Application. By the other hand you can use the class SPWebConfigModification to make changes in the web.config file programmatically SPWebConfigModification modification = new SPWebConfigModification("...


4

Yes, the nodes are being alphabetically sorted and the Sequence property only applies when the Name property is exactly the same. To fix, use a little XPath trickery to get your nodes to sort in the correct order (first modules[1=1] then modules[2=2]): SPSecurity.RunWithElevatedPrivileges(delegate { SPWebService spWebService = SPWebService....


4

No, you can't have different web.config for different site collections, however you maybe be able to add tweaks e.g. HttpModule and HttpHandlers configurations to it depending on your requirements...


3

There's nothing wrong with your code above, so this almost certainly has something to do with your SPWebConfigModification object's "Name" value. The SPWebConfigModification.Name property (and the Name parameter in the SPWebConfigModification's constructor) are actually XPath expressions that uniquely identify the config entry. SharePoint uses this XPath ...


3

You can open web.config in your timer job. How could you do it you can read this post. But the approach with property of timer job is easily. )


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 ...


3

To solve this error you have to change settings in both the web.config file that one is in the IIS folder and the other web.config file which is in the LAYOUTS folder 15 hive. Simply Change: <customErrors mode="Off"/>


3

Try adding Both Delegate controls and it should resolve your problem.


3

How many Servers in the Farm? Web site mentioned in the error ( ****.local80) still exist and working? If you have more than one server in farm, simply copy the web.config file from other server for same Virtual directory and re ran the Config wizard. Or Simply delete the Web Application( i am sure your web app not working as missing web.config) or re ...


3

You will not find the file web.config in this folder C:\inetpub\wwwroot\wss\VirtualDirectories\…local80\web.config' The reason is your web.config file is deleted in your port 80. You have to have web.config file in this folder otherwise you will face this problem. I have the problem in port 40786. The solution is delete the website from your iis server ...


3

It sound's like the web applications get a timeout and does not get created correctly. I've had this problem in both production and staging environment, and changing the time-out has worked perfect both times. This is usually because you either have too many Web Applications in your SharePoint Server, or because your SharePoint Server is slow! As part ...


3

Microsoft's pattern and practices group has published guidance, including a hierarchical configuration manager library. The library uses a list or property bags. You can read more at http://www.microsoft.com/spg. (I would avoid web.config - the change management process for web.config in SharePoint is not reliable.)


3

You could store the connection string in an SPPersistedObject which you could then modify via PowerShell. You can also store it in the SPFarm or SPWeb property bag. I prefer the SPPersistedObject. You can see a real-world implementation of that here: https://github.com/Nauplius/FoundationSync/blob/2013/FoundationSyncSettings.cs


3

If you want to redirect to static HTML pages (hosted in a folder at the root of the Web Site in IIS), the following modifications in the web.config (under <configuration>/<system.webServer>) should do the trick for 404 an 500 errors: <httpErrors errorMode="Custom" existingResponse="Replace"> <remove statusCode="404" /> <...


2

1) register the HttpModule in the web.config for the Web application where you need it, in your case, C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config, use this page as a guide to how to register you HttpModule 2) You should sign the dll and deploy it to the GAC 3) You should really do this as Web Application scoped feature deployed in a WSP a using ...


2

You can use job properties to pass connection string. In FeatureActivated you can install and set your job schedule, also you can set job properties like this: YOUR_JOB_OBJECT.Properties.Add("connectionString", YOUR_CONNECTIONSTRING_OBJECT); and then in your job class (the one that inherits from SPJobDefinition) you can get this property in Execute method ...


2

SharePoint is no different than ASP.NET as far as web.config entries are concerned. SharePoint's web.config content are different from a typical ASP.NET application though. So if your application depends on those settings, they would go into appSettings section of the web.config, just like ASP.NET applications. For storing custom application settings, I ...


2

There is a web.config in Layouts folder. Turn off errors in that file. Ref: http://msdn.microsoft.com/en-us/library/ms460914.aspx Or you can also turn on developer dashboard which will also show you the stack trace information. $service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService $addsetting =$service.DeveloperDashboardSettings #...


2

I wouldn't necessarilly rely on <appSettings> in SharePoint applications, mostly for things that are going to appear on the UI, or that should be easily configurable within the application. Instead, would use some kind of Configuration Store approach, where you save the Key/Value setting in a List within SharePoint UI (such as SiteConfiguration). ...


2

You need to add the web part type as safe control in the web applications "web.config" file and in the configuration > SharePoint > SafeControls section. The general format is like below: Just replace AssemblyName, AssemblyVersion, AssemblyCulture, AssemblyPublicKeyToken, The class name of the web-part and The class name of the web-part with the information ...


2

What kind of changes do you need to apply to the web.config? SharePoint applications should not store configuration settings in the web.config - it is the least desirable option among the possible ways of storing application settings in SharePoint. Wictor Wilén has a very good post on this topic. Six ways to store settings in SharePoint If you are asking ...


2

if (SPServer.LocalServerRole == SPServerRole.WebFrontEnd) { // Do your magic } http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spserver.localserverrole.aspx


2

If it doesn't work as expected then I would recommend you to use Xpath together with SPWebModifications to define the order. Update I just tested it out my solution together with XPath solution and it's not behaving as expected. It seems that there is no way of controlling the order of entries. Thanks Per for his input! Update 2 Could you please try ...


2

All (related) host named site collections are sharing the same web.config as they are all located under a single web application (= entry within IIS). Look into the web application list (central administration) to find the parent web application and then adapt the relevant web.config within IIS. Please be aware that I'll have impact on all other HNSC.


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