문제

Is there a way to edit the Description property of a Web Application after the application has been created?

I can't seem to find any way of doing so via any of the administration options in the SharePoint Web Application Management section of Central Administration.

(I'm referring to the field called 'Description' when you create a web application via the Create New Web Application page in Central Administration. It's also listed as the 'Name' of the web application if you view the Web Application List.)

도움이 되었습니까?

해결책

The Description text field correlates to the Microsoft.SharePoint.Administration.SPWebApplication.Name property in the object model. This is the only way I know of changing this.

The following code (ignoring import statements) is what I used from the IronPython console, though you could also use PowerShell. (C# or VB makes for too much messing around)

>> site = SPSite("http://somesite")
>> wa = site.WebApplication
>> print wa.Name
'somesite'
>> wa.Name = "This is the new name"
>> wa.Update()
>> print wa.Name
'This is the new name'

This will also update wa.DisplayName, which is a Read-Only property. You will see the change in Central Admin. The web name in IIS will not change as this is just a label. The URL for the site collection 'somesite' will not change either.

I don't know if this is a bad idea - Microsoft lets you do it though. If it is a bad idea, I hope someone else will say so here.

Mike

다른 팁

Can u open the Website in IIS and change the description

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top