我在端口 8080 创建了一个新的 Web 应用程序,目的是创建所有个人网站(即我的网站)存储在专用的 WSS_Content 数据库(即最佳实践建议)。

我认为我已经完成了所有需要的步骤:

  • 已创建 我的网站收藏 使用 企业模板“我的网站托管” 根于 http://SPstaff:8080 至此顶级站点已成功创建
  • 为 Web 应用程序启用自助站点创建(将单选按钮更改为“打开”)。我有一个 警告:自助站点创建将在共享主机名下创建站点 我不明白(也许相关?)
  • 添加了托管路径 /我的网站 到这个网络应用程序
  • 通过单击为 User Profile Service 应用程序配置“我的网站”设置 设置我的网站 这样 我的网站托管 设置 http://spstaff:8080/个人网站位置 设置为我的网站。

当我第一次尝试浏览 SPstaff:8080/mysites/ 时,我在 Windows 事件日志中收到了一个合理的错误:

Cannot open database "WSS_Content_SPSTAFFMySites" requested by the login. The login failed. Login failed for user 'CBMIWEB\spAppPool'

因此,我将此用户添加到这个新创建的数据库中,并且不再收到该错误。

相反,我收到如下序列的错误:

第一个错误是事件 ID:6141 任务类别:拓扑结构

The site /mysites/joanc could not be created.  The following exception occurred: Attempted to perform an unauthorized operation

应用程序日志中的下一个条目是事件 ID:5187 任务类别:行政

My Site creation failure for user 'CBMIWEB\joanc' for site url `'http://spstaff:8080/mysites/joanc'`. 
The exception was: Microsoft.Office.Server.UserProfiles.PersonalSiteCreateException: A failure was encountered while attempting to create the site. ---> System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
at Microsoft.SharePoint.SPSecurableObject.CheckPermissions(SPBasePermissions permissionMask)
at Microsoft.SharePoint.SPSecurity.ValidateSecurityOnOperation(SPOperationCode code, SPSecurableObject obj)
at Microsoft.SharePoint.SPFeature.AddRowToFeaturesTable(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce)
at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)
at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly)
at Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, String featureName, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope)
at Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedCore(SPSite site, SPWeb web, String sFeatures, Boolean fMarkOnly)
at Microsoft.SharePoint.SPFeatureManager.<>c__DisplayClassa.<EnsureFeaturesActivatedAtSite>b__9()
at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)
at Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedAtSite(Byte[]& userToken, Guid& tranLockerId, Int32 nZone, Guid databaseid, Guid siteid, String sFeatures)
at Microsoft.SharePoint.Library.SPRequest.SscCreateSite(Guid gApplicationId, String bstrUrl, String bstrServerRelativeUrl, Int32 lZone, Guid gSiteId, Guid gDatabaseId, String bstrDatabaseServer, String bstrDatabaseName, String bstrDatabaseUsername, String bstrDatabasePassword, String bstrTitle, String bstrDescription, UInt32 nLCID, String bstrOwnerLogin, String bstrOwnerUserKey, String bstrOwnerName, String bstrOwnerEmail, String bstrSecondaryContactLogin, String bstrSecondaryContactUserKey, String bstrSecondaryContactName, String bstrSecondaryContactEmail, Boolean bADAccountMode, Boolean bHostHeaderIsSiteName, Int32 iDatabaseVersionMajor, Int32 iDatabaseVersionMinor, Int32 iDatabaseVersionBuild, Int32 iDatabaseVersionRevision)
at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPContentDatabase database, SPSiteSubscription siteSubscription, String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail, String quotaTemplate, String sscRootWebUrl, Boolean useHostHeaderAsSiteName)
at Microsoft.SharePoint.SPSite.SelfServiceCreateSite(String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String contactLogin, String contactName, String contactEmail, String quotaTemplate, SPSiteSubscription siteSubscription)
at Microsoft.Office.Server.UserProfiles.UserProfile.<>c__DisplayClass2.<CreateSite>b__0()
--- End of inner exception stack trace ---
at Microsoft.Office.Server.UserProfiles.UserProfile.<>c__DisplayClass2.<CreateSite>b__0()
at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
at Microsoft.Office.Server.UserProfiles.UserProfile.CreateSite(String strRequestUrl, Boolean bCollision, Int32 lcid)

使用我的个人登录浏览的其他症状 http://spstaff:8080/mysites/johna 是没有帮助的“Internet Explorer 无法显示网页”。

我不确定出了什么问题。

有帮助吗?

解决方案

  • 我的设置总体来说没问题,但我对新 Web 应用程序的选择引入了对“主机标头”和 8080 任意端口的需求
  • 需要“主机标头”的名称会造成不必要的复杂化,因此整个 Web 应用程序被删除
  • 这个新的 Web 应用程序仍然失败(即使采取了所有正确的步骤之后)
  • 使用 Fiddler2 捕获 HTTP 流量,错误让我怀疑防火墙规则
  • 最终,Sharepoint 服务器上的 Windows 防火墙需要为入站流量添加新规则(以允许端口 81).

所以目标已经实现,但我想知道是否可以避免使用不同的端口号?我是否可以添加第二个也使用端口 80 的 Web 应用程序(以实现将内容分离到不同的数据库)?位于第二个 Web 应用程序根目录下的 mysites 通配符管理路径是否足够?

许可以下: CC-BY-SA归因
scroll top