標籤:style blog http color io ar 使用 for strong
1. 配置指令碼如下:
1、通過開啟命令提示字元並鍵入以下命令來確保 spadmin 和 sptimer 服務正在運行。net start spadminv4net start sptimerv42、作為管理員運行 SharePoint Management Shell 並鍵入以下命令以建立獨立的應用程式定義域。Set-SPAppDomain "app.dc.com"3、通過在 SharePoint Management Shell 中鍵入以下命令來確保 SPSubscriptionSettingsService和AppManagementServiceInstance 服務正在運行。Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} | Start-SPServiceInstance4、通過在 SharePoint Management Shell 中鍵入以下命令來驗證 SPSubscriptionSettingsService 和 AppManagementServiceInstance 服務是否正在運行。輸出將指明每項服務是否處於聯機狀態。Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"}5、您必須指定運行 SPSubscriptionService 和 AppManagementServiceInstance 服務執行個體將使用的帳戶。此帳戶必須是 SPManagedAccount。通過在 SharePoint Management Shell 中鍵入以下命令,您可以建立 SPManagedAccount(特:將會提示您輸入帳戶網域\使用者和密碼)。$account = New-SPManagedAccount6、通過在 SharePoint Management Shell 中鍵入以下代碼,為 SPSubscriptionService 和 AppManagementServiceInstance 服務指定帳戶、應用程式集區和資料庫設定。如果在上一步驟中建立了 SPManagedAccount,請在此處使用該帳戶名稱。$account = Get-SPManagedAccount "dc\administrator"$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account$appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account$appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName myappSettingsServiceDB$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName myappAppServiceDB$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc7、通過在 SharePoint Management Shell 中鍵入以下代碼來指定租戶名稱。Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false
2. 問題:編譯無法通過:該系統帳戶無法執行此操作。
"Error occurred in deployment step "Installed app for SharePoint": The System Account cannot perform this action"
解決辦法:需要在ad中建立一個新賬戶,將該賬戶放入本機系統管理員群組,用該賬戶登入伺服器,以管理員模式登入vs2012。
3. 問題:編譯無法通過:本地SharePoint伺服器不可用。檢查伺服器是否正在運行並串連到SharePoint場。
"Error occurred in deployment step "Installed app for SharePoint": The local SharePoint server is not available. Check that the server is running and connected to the SharePoint Farm"
解決辦法:新建立的賬戶要有sql server資料庫的db_owner許可權。記住每個資料庫都要設定一遍。
4. 問題:登陸後,無限跳出使用者密碼輸入框,最後無顯示。
解決方案:
修改兩個註冊表選項,來禁止環回檢查
1>. 啟動登錄編輯程式 (Regedt32.exe)。
2>. 在註冊表中找到並單擊以下項:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
3>. 在編輯菜單上,單擊添加數值,然後添加以下註冊表值:
數值名稱:DisableStrictNameChecking
資料類型:REG_DWORD
基數:十進位
數值: 1
4>. 在登錄編輯程式中,找到並單擊下面的登錄機碼:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
5>. 按右鍵“Lsa”,指向“建立”,然後單擊“DWORD 值”。
鍵入 DisableLoopbackCheck,然後按 Enter。
按右鍵 DisableLoopbackCheck,然後單擊“修改”。
在“數值資料”框中,鍵入 1,然後單擊“確定”。
6>. 退出登錄編輯程式,然後重新啟動您的電腦。
參考如下:
http://www.cnblogs.com/chenxizhang/p/3397543.html
http://www.sharepoint-journey.com/app-development-in-sharepoint.html#gallery[pageGallery]/4/
sharepoint app 開發環境配置