change of web.config of a sharepoint webn part - android-studio

I have a sharepoint webparts developed using visual studio and deployed to sharepoint. I need to change some settings in the web.config without redeploying everythimg.
How can I do?

Web.config modification is possible using SPWebService.ApplyWebConfigModifications method.
It is worth mentioning that changes to the web.config file will trigger application pool recycling.
https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ms475439(v=office.14)
https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/bb861909(v=office.14)

Related

Can I avoid re-deploying after changing ascx, aspx, JS, or CSS files for a SharePoint site?

I´m creating an application with SharePoint 2013/Visual Studio 2012. When I modify the aspx or ascx files, I need to deploy the whole application in order to view all changes and it will take almost one minute.
Is it possible to avoid the deployment when I change these ascx/aspx/js/css files?
No, deployment is only way how to propagate changes when using Visual Studio to develop SharePoint farm solutions.
But you can create JS/CSS/HTML pages using SharePoint Designer and when you will be done, import it to Visual Studio - SPD saves changes directly to SharePoint and you will see result imediatly...

Add Application Error on Default Web Site (IIS 7.5, Windows server 2008R2)

I am trying to add a .net application to my Default Web Site on IIS 7.5 Windows Server 2008 R2. The Default Web Site currently serves ASP Classic pages (not sure if that is relevant) and I'm trying to setup some aspx pages. But I can't even add a new application, i keep getting an error of
"value does not fall within range"
I have no idea what this means?
Please see my screenshot for more information:
http://i.imgur.com/nsUs5.png
Thanks in advance.
Although quite tedious, you could try checking the settings in the apphost config file. You can find it at C:\Windows\System32\inetsrv\config
Look for errors in names, sometimes spaces can be replaced with %20% by Visual Studio which should be removed, also if you have deleted something manually in your file system, this will not have been updated in the applicationhost config file, so any references would need to be removed manually also.
Regards, and good luck
Well i never found a solution apart from Creating the App as ASP Classic (which would allow me too do it) and then switching the AppPool to DefaultAppPool which in turn lets me server ASPX pages.
So, Kind of solved for now...

What is the purpose of web.config files under Hive folder

I am new to SharePoint, I am using SP 2010. I am asp.net developer but I don't understand if I have web.config under 80, so what are those web.config files under 14 folder, can you briefly discuss it?
I found two so far, There is one under 14\Templates\Layouts and under 14\CONFIG
Thanks
SharePoint development is similar to ASP.NET development but there are some major differences you need to be aware of. One is the use of Web.config to store application settings.
I wrote a blog post with links to several resources to help new SharePoint developers get started: Getting Started with SharePoint 2010 Development–Links and Resources
I suggest you start by watching the SharePoint for ASP.NET Developers talk to get an idea of the SharePoint architecture and development/deployment model.
You will find a lot more in 14 hive :) They are there because they are web.config files for different parts of the entire sharepoint application pages. For example the one in "14\layouts\" is for general application pages, site settings, regional settings, ... for instance. the one in the 14\layouts\admin is for centeral administration pages.

SharePoint Designer 2010 Workflow Error: Could not deserialize object. The type could not be resolved

In development environment I have SharePoint Workflow created in SharePoint Designer. This workflow using custom activity created in Visual Studio.
After deployment web (Import-SPWeb Export-SPWeb) in production i've got error when tring to open my worklow within Designer.
Could not deserialize object. The type 'MyTypeHere' could not be resolved.
I've trying to reinstall solution and clear SharePoint Designer cache in application data. In workflow's xoml i specify right full namespace of my assembly with custom activity and this assembly exist in GAC.
Problem solved. I could not figure out how, but works fine now. 100% server was not restarted. May be it is because farm configuration and web.configs. Use feature activation to be sure that you control .config files.

How to update web.config on each WFE in a SharePoint server farm?

We have a SharePoint farm with multiple WFEs. A new application requires us to write some custom code to the web.config during deployment. What is the best way modify the the web.config file during deployment, ensuring that each WFE in the farm get updated?
I'm assuming you'll be deploying your code via a WSP; if not, using a tool like WSPBuilder is a great starting place that allows you to get rolling without forcing you to learn all of the intricate details of solution package construction.
You should leverage the SPWebConfigModification type from within a custom SPFeatureReceiver. Normally, the FeatureActivated method of the SPFeatureReceiver would be coded to write the changes out to the web.config files impacted by your activation. Those same changes would then be retracted in the FeatureDeactivating method.
The nice thing about the SPWebConfigModification type is that SharePoint takes care of determining which web.config files should be modified -- across servers and across extended web apps.
I hope this helps!
As part of your deployment, use the SPWebConfigModification class to add/remove entries from web.config. SharePoint will manage updating the WFEs for you if you use this.
A blog post entitled, Modify the web.config file in SharePoint using SPWebConfigModification, is a great summation of the gotchas involved and contains links to other helpful resources.

Resources