简体   繁体   English

将Sharepoint 2010的应用程序页面部署到另一个生产服务器

[英]deploy an Application page of Sharepoint 2010 to another production server

How to deploy an Application page of Sharepoint 2010 to another production server. 如何将Sharepoint 2010的应用程序页面部署到另一个生产服务器。

I've created an Application page of Sharepoint 2010 inside the mapped layout folder. 我在映射的布局文件夹中创建了Sharepoint 2010的Application页面。 Everything works nicely now in Visual Studio 2010. I can debug it after pressing F5, I can retract it and deploy it with Visual Studio 2010. 现在在Visual Studio 2010中一切都运行良好。我可以在按F5后调试它,我可以撤回它并使用Visual Studio 2010进行部署。

But when it comes to deploying it to another production server, I have tons of questions. 但是当涉及到将其部署到另一台生产服务器时,我有很多问题。

  1. Basically I don't know how to deploy it to another production server. 基本上我不知道如何将它部署到另一个生产服务器。 My first thought was just copy the pages to the Layout folder of IIS and register the referenced dlls. 我的第一个想法是将页面复制到IIS的Layout文件夹并注册引用的dll。 But after I studied a little bit of deployment, I feel my thought is ugly. 但在我研究了一点部署之后,我觉得我的想法很难看。
  2. I tried "right clicking" on the project name and "package". 我尝试了“右键单击”项目名称和“包”。 The Visual Studio generates a "MyProjectName.wsp" in the bin folder. Visual Studio在bin文件夹中生成“MyProjectName.wsp”。 I used the central administration to upload this wsp file. 我使用中央管理来上传这个wsp文件。 But when I activate it, it raised an error saying "This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'af2f9404-3b39-4f90-87f5-31e14b2f9a9a' failed validation, file manifest.xml, line 6, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'." 但是当我激活它时,它引发了一个错误,说“此解决方案包含无效的标记或无法作为沙盒解决方案的一部分进行部署的元素。解决方案清单'af2f9404-3b39-4f90-87f5-31e14b2f9a9a'验证失败,文件清单.xml,第6行,字符4:命名空间“http://schemas.microsoft.com/sharepoint/”中的元素“解决方案”在命名空间“http://schemas.microsoft.com/”中包含无效的子元素“TemplateFiles” sharepoint /'。期望的可能元素列表:名称空间'http://schemas.microsoft.com/sharepoint/'中的'FeatureManifests,ActivationDependencies'。“ It seems that my application is not a sandbox, but I can't change it to a sandbox. 我的应用程序似乎不是沙盒,但我无法将其更改为沙箱。 Because when I do change it, the Visual Studio tells me "The deployment type "TemplateFile" of file "ApplicationPage1.aspx" in Project Item "Layouts" is not compatible with a Package in a Sandboxed Solution. The Project Item "Layouts" cannot be deployed through a Package in a Sandboxed Solution. Package validation failed." 因为当我更改它时,Visual Studio告诉我项目项“布局”中文件“ApplicationPage1.aspx”的“部署类型”TemplateFile“与沙盒解决方案中的包不兼容。项目项”布局“不能通过沙盒解决方案中的包进行部署。包验证失败。“
  3. Besides, even if I can successfully activate the .wsp file, I am not sure if the application page can be added to the Layout folder. 此外,即使我可以成功激活.wsp文件,我也不确定是否可以将应用程序页面添加到Layout文件夹中。 Because I don't know how the .wsp file locate and find my application page? 因为我不知道.wsp文件如何找到并找到我的应用程序页面? It doesn't have the page in it. 它没有页面。 Can anyone explain a bit on it? 任何人都可以解释一下吗?

Thanks for your answers. 谢谢你的回答。

1) It's strongly recommended that you use powershell to run your test and production deployments: http://dotnet.sys-con.com/node/1208275 1)强烈建议您使用powershell来运行测试和生产部署: http//dotnet.sys-con.com/node/1208275

2) Try changing your SharePoint solution to a farm solution and repackaging your wsp. 2)尝试将SharePoint解决方案更改为服务器场解决方案并重新打包您的wsp。

3) By right clicking on your project in visual studio and adding the mapped Layouts folder the solution packaging handles placing any application pages/user controls that you have in the appropriate directory inside your wsp. 3)通过右键单击visual studio中的项目并添加映射的Layouts文件夹,解决方案打包处理将您拥有的任何应用程序页面/用户控件放在wsp中的相应目录中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM