日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

使用stsadm命令部署和激活webpart解决方案

發布時間:2025/6/17 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 使用stsadm命令部署和激活webpart解决方案 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Solution.WebPart.webpart

?

<?xml version="1.0" encoding="utf-8"?>
<webParts>
? <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
??? <metaData>
????? <!--
????? The following Guid is used as a reference to the web part class,
????? and it will be automatically replaced with actual type name at deployment time.
????? -->
????? <type name="Solution.WebPart.SolutionWebPart, Solution.WebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5"? />
????? <importErrorMessage>Cannot import SolutionWebPart Web Part.</importErrorMessage>
??? </metaData>
??? <data>
????? <properties>
??????? <property name="Title" type="string">SolutionWebPart Web Part</property>
??????? <property name="Description" type="string">SolutionWebPart Description</property>
????? </properties>
??? </data>
? </webPart>
</webParts>

?

Solution.WebPart.xml

?

<?xml version="1.0" encoding="utf-8"?>
<Elements Id="15f37071-ebef-46d0-984d-59fbe920a462" xmlns="http://schemas.microsoft.com/sharepoint/" >
? <Module Name="WebParts" List="113" Url="_catalogs/wp">
??? <File Path="solution.webpart\Solution.WebPart.webpart" Url="Solution.WebPart.webpart" Type="GhostableInLibrary" />
? </Module>
</Elements>

?

feature.xml

?

<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Id="F4952FEB-52E3-4d1e-909A-F5297F2FB146"
????????? Title="Solution.WebPart"? Scope="Site" Version="1.0.0.0" Hidden="false"
????????? DefaultResourceFile="core">
? <ElementManifests>
??? <ElementManifest Location="Solution.WebPart\Solution.WebPart.xml"/>
??? <ElementFile Location="Solution.WebPart\Solution.WebPart.webpart"/>
? </ElementManifests>
</Feature>

?

1、首先在系統的環境變量中設置stsadm的運行路徑,也就是【c:\program files\common files\microsoft shared\web server extensions\12\bin】。

2、然后,將下列命令行拷貝到setup.bat文件中

3、運行這個setup.bat文件

?

?

stsadm –o deactivatefeature –filename “solution.webpart\feature.xml” –url http://moss.virus.com/

stsadm –o retractsolution –name solution.webpart.wsp –immediate –allcontenturls

stsadm –o execadmsvcjobs

stsadm –o deletesolution –name solution.webpart.wsp

stsadm –o addsolution –filename solution.webpart.wsp

stsadm –o deploysoluiton –name solution.webpart.wsp –allcontenturls –immediate –allowgacdeployment –allowcaspolicies

stsadm –o execadmsvcjobs

stsadm –o activatefeature –filename “solution.webpart\feature.xml” –url http://moss.virus.com/

?

Technorati 標簽: sharepoint,stsadm,feature,webpart,本頁的安全驗證已經失效,請點擊后退鍵,然后刷新頁面,The security validation for this page is invalid,Click Back in your Web browser

?

Sharepoint:The security validation for this page is invalid. Click Back in your Web browser

Sometimes while trying to delete documents or move documents from one library to another we get an error "The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again” while trying to move documents from one document library to another document library."
This error is caused due to security validation. So there should be a way out to turn it off. One method to turn off security is:
Central Administration—>application management—->web application general settings–>turn security validation off
But, if we always keep it on there might be danger of malicious code.
So, we should handle this through coding, turn off security validation for our code to execute and then again turn it on.
SPWeb ospWeb = SPContext.Current.Web;
Microsoft.SharePoint.Administration.SPWebApplication webApp = ospWeb.Site.WebApplication;
webApp.FormDigestSettings.Enabled = false;
// our code should be inserted here
webApp.FormDigestSettings.Enabled = true;
For more details, visit http://techolyvia.wordpress.com/2008/10/24/the-security-validation-for-this-page-is-invalid-click-back-in-your-web-browser-refresh-the-page-and-try-your-operation-again/

?

?

頁面安全驗證失效,有時候是因為切換賬戶導致,估計是切換賬戶之后,前面的頁面是另外一個權限的賬戶打開的,所以你退回去的話,可能安全驗證就失效了。

?

下面是通過代碼添加程序集到GAC中。gacutil.exe是安裝框架之后會有的程序,如果沒有也可以上網下載。

?

gacutil –uf wikieventhandler

gacutil –if wikieventhandler.dll

iisreset

?

pause

轉載于:https://www.cnblogs.com/virusswb/archive/2009/12/25/1632060.html

總結

以上是生活随笔為你收集整理的使用stsadm命令部署和激活webpart解决方案的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。