我正在从 FTP 迁移到 webDeploy。我首先用一个网页构建了一个示例 Web 应用程序,并且部署得很好。然后我添加了一个连接字符串和一个访问数据的页面,并且部署得很好。
然后我添加了带有自定义数据存储的表单身份验证,但部署不正确。然后我使用 FTP 移动了我的所有文件,它们成功传输并且网站正常运行。所以 webDeploy 一定不喜欢我添加表单身份验证时添加到 web.config 中的东西,但我不知道那是什么东西。
这是 .NET 4.5 上的 ASP.NET Web 窗体应用程序。
在 webDeploy 开始给我错误之后,添加到 web.config 的内容
<membership defaultProvider="MyMembershipProvider">
<providers>
<add name="MyMembershipProvider" type="System.Web.Security.SqlMembershipProvider"
connectionStringName="MyCs"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="6"
passwordAttemptWindow="10"
applicationName="/"/>
</providers>
</membership>
<profile defaultProvider="MyProfileProvider">
<providers>
<add name="MyProfileProvider" type="System.Web.Providers.DefaultProfileProvider" connectionStringName="MyCs" applicationName="/"/>
</providers>
</profile>
<roleManager defaultProvider="MyRoleProvider">
<providers>
<add name="MyRoleProvider" type="System.Web.Providers.DefaultRoleProvider" connectionStringName="MyCs" applicationName="/"/>
</providers>
</roleManager>
<sessionState mode="InProc" customProvider="MySessionProvider">
<providers>
<add name="MySessionProvider" type="System.Web.Providers.DefaultSessionStateProvider" connectionStringName="MyCs"/>
</providers>
</sessionState>
构建输出的最后一部分:
Generate source manifest file for Web Deploy package/publish ...
Start Web Deploy Publish the Application/package to https://myServer/msdeploy.axd?site=mySite.com ...
Starting Web deployment task from source: manifest(C:\Users\ME\Documents\Visual Studio 2012\Samples
\MyApp\MyApp\obj\Debug\Package\MyApp.SourceManifest.xml) to Destination: auto().
Adding ACL's for path (mySite)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4196,5):
Error : Web deployment task failed. ((9/26/2013 11:36:26 PM) An error occurred when the request
was processed on the remote computer.)
(9/26/2013 11:36:26 PM) An error occurred when the request was processed on the remote computer.
The server experienced an issue processing the request. Contact the server administrator for
more information.
Publish failed to deploy.
好的,让我们看看 microsot.web.publishing.targets 的第 4196 行和第 5 列
4196 <VSMSDeploy
4167 Condition="!$(UseMsdeployExe)"
4198 MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
4199 Source="@(MsDeploySourceProviderSetting)"
4200 Destination="@(MsDeployDestinationProviderSetting)"
DisableLink="$(PublishDisableLinks)"
EnableLink="$(PublishEnableLinks)"
AllowUntrustedCertificate="$(AllowUntrustedCertificate)"
BuildingInsideVisualStudio="$(BuildingInsideVisualStudio)"
SkipExtraFilesOnServer="$(SkipExtraFilesOnServer)"
.....
>
现在我处于死胡同,因为我不知道我在看什么。有任何想法吗?我不确定什么代码是相关的,所以请让我知道是否有其他帮助。