Microsoft Web Deploy: - orchardcms

I am trying to deploy an Orchard website to a Windows 2008 R2 server using Microsoft web deploy. Web matrix is able to add the test files but as soon as it comes time to publish, I get the following error
Unable to publish. Unable to publish.
Error detail:
(2011/12/10 05:59:03 PM) An error occurred when the request was processed on the remote computer.
at Microsoft.Web.Deployment.StatusThreadHandler.CheckForException()
at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentWellKnownProvider provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.WebMatrix.Deployment.MsDeployWorker.Execute(Boolean pullback)
Missing source parameter 'Database Password' (Password for the Database Username.). This must be set for successful synchronization.
at Microsoft.Web.Deployment.ParameterizationRuleHandler.PreSync(DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable)
at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentWorkerRequest workerRequest)
I am using Sql Compact but I can't figure out what the problem might be.

Didn't WebMatrix ask you for the connection string of the remote database? The password should be specified in there.
See http://help.webcontrolcenter.com/KB/a1508/webmatrix-web-deploy-settings.aspx

Related

Web Deploy to Azure Stopped Working even with downloaded publish profile

My Web Deploy Publish from Visual Studio 2017 to my Azure web app was being finicky yesterday, and today just stopped working completely.
Yesterday the error in Event Viewer was
Error Code: 6 Exception Message: Could not connect to the remote computer ("MYDOMAIN.scm.azurewebsites.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC. Exception Stack Trace: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponseHelper(HttpWebRequest request)
--- End of inner exception stack trace ---
Could not connect to the remote computer ("MYDOMAIN.scm.azurewebsites.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.
at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponseHelper(HttpWebRequest request)
at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request)
at Microsoft.Web.Deployment.AgentClientProvider.PerformHeadRequestHelper(Boolean getVersionInfo, Version& maximumSupportedVersion, Version& minimumSupportedVersion)
at Microsoft.Web.Deployment.AgentClientProvider..ctor(DeploymentProviderContext providerContext, DeploymentBaseContext baseContext, String serverVersion)
at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(DeploymentProviderContext providerContext, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
at Microsoft.Web.Deployment.DeploymentManager.CreateDestinationObject(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
Today the error is :
Error Code: 103 Exception Message: Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED. Exception Stack Trace: Root element is missing.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.MoveToContent()
at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
--- End of inner exception stack trace ---
Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.
at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass, String syncSessionId)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
After looking at many inconclusive posts on the matter, (and since this error ERROR_CONNECTION_TERMINATED is not listed on the official troubleshoot website they provide in the error), I did the following:
(1) Restart my computer
(2) Restart Visual Studio
(3) Open Visual Studio as Admin
(4) Redownload the Publish profile from Azure
None of this worked.
In the publish profile window, when I click "Validate" for my credentials, they pass. Only when I preview or run the publish does it error out.
What finally worked was
(5) Set Application setting to false in Azure WEBSITE_WEBDEPLOY_USE_SCM
I looked it up and am not sure what it did, and why I needed to do it, and why it worked fine before without this setting. It feels like a hack fix and I don't like it. Should I keep this application setting?
UPDATE:
Not sure if the SCM setting helped. I was able to publish once, and no can't again.
First, Close the firewall and the local proxy-based software.
Second, Make sure you have install the web deploy handler and all of the options has be installed.
(Add the option not be selected.)
Thrid, Make sure you dont have IP restrictions for Management Service.
Other possible reasons you can find in this Offcial doc:
https://learn.microsoft.com/en-us/iis/publish/troubleshooting-web-deploy/troubleshooting-web-deploy-problems-with-visual-studio

What is going wrong with web deployment from Visual Studio and App service?

Suddenly Web Deployment started failing.
Could not find file 'D:\home\site\wwwroot\App_Offline.htm'.
I stopped the service, but deployment still fails.
When I tried to delete any file from wwwroot in Kudu PowerShell UI I get error "404 file not find", but that file is still displayed after refresh.
When I tried to delete file directly in powershell I get error
Cannot remove item D:\home\site\wwwroot\Azure.Storage.dll: Invalid access to memory location.
At line:1 char:1
+ del .\Azure.Storage.dll
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (D:\home\site\wwwroot\Azure.Storage.
dll:FileInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell
.Commands.RemoveItemCommand
I deleted the service, recreated it and the first deployment from Visual Studio was Ok. But next day deployment failed again. The only thing between that deployments was deployment from VSTS. But I was able to deploy from VSTS and from Visual Studio in any order before without any problem.
I'm the Owner of that App Service.
Deployment log.
(2018-08-06 13:05:03) An error occurred when the request was processed on the remote computer.
Could not find file 'D:\home\site\wwwroot\App_Offline.htm'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Xml.XmlWriterSettings.CreateWriter(String outputFileName)
at System.Xml.XmlWriter.Create(String outputFileName, XmlWriterSettings settings)
at Microsoft.Web.Deployment.AppOfflineRuleHandler.AddAppOfflineFilesToEachApp(DeploymentBaseContext baseContext, Boolean whatIf)
at Microsoft.Web.Deployment.AppOfflineRuleHandler.AddChild(DeploymentSyncContext syncContext, DeploymentObject destinationParentObject, DeploymentObject& sourceObject, Boolean& proceed)
at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncDirPathChildren(DeploymentObject destRoot, DeploymentObject sourceRoot)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable`1 passId, String user, String siteName)
Publish failed to deploy.
All of a sudden VSTS default deployment mode became Run-From-Zip.
The solution is setting Select deployment method checkbox in VSTS deploy and be sure Web Deploy is selected.
To "unlock" the service you need to delete setting WEBSITE_RUN_FROM_PACKAGE from Application settings page in the Azure Portal - it is under 'Configuration'
I hade the same problem today with net core 2.2 and the solution was to remove setting "WEBSITE_RUN_FROM_PACKAGE" in azure appsettings
We got hit by this same issue - the file system becomes readonly when WEBSITE_RUN_FROM_PACKAGE=1. Azure App Service seems to be adding this app setting automatically during recent platform upgrades.
I do suggest using Run-From-Package over web deploy - but you can easily revert their forced updates by setting WEBSITE_RUN_FROM_PACKAGE=0. If you are on Azure DevOps - the latest version of App Service Deploy v4 supports Run-From-Package.
Go to Configurations -> Application settings in your azure portal change the value of 'WEBSITE_RUN_FROM_PACKAGE' from '1' to '0'. And then publish again.
This resolved my problem.
The reason for this is because the AzureWebApp task in Azure DevOps (VSTS) Pipeline, updates the 'WEBSITE_RUN_FROM_PACKAGE' to '1'. This is primarily used by Azure Functions, where we need to deploy the entire package (and there by making the wwwroot as read-only). While its very useful in Functions, you will see weird things in normal Web App (such as App_Offline not found, the wwwroot/lib folder not found, you will see older files in the FTP folder but latest ones in the Kudu console etc).
The simplest fix is to update the setting 'deploymentMethod' to 'zipDeploy' in your YAML file.
Delete the appp settings WEBSITE_RUN_FROM_ZIP then retry deploy from VS. This worked for me
If you choose the deployment method by yourself in the release step this should not appear:
For those who cannot find setting in azure portal, please refer below steps.
Login to portal
Goto your app
search configuration
Name 'WEBSITE_RUN_FROM_PACKAGE' will be there is list.
My deployment was failing with the same message and stack trace, but was caused by a policy assignment that disallowed the location for my resource.
(The resource had been created in US West, and then a policy was applied at the tenant root level that only allowed US West 2.)
After the policy was updated, the deployment succeeded.
I got a similar error but for me it was:
Access to the path 'C:\home\site\wwwroot\App_Offline.htm' is denied
Got this when trying to publish a .NET 5 application. Fixed by setting correct .NET version in General settings for my App Service:
This error can occur when VS has issues finding your swagger xml file.
Right-click your project > Properties > Build will take you to the correct page.
Check the "XML Documentation File:" box. This resolved the issue for me but you may need to ensure that the release or debug folder are included in the path. i.e. bin\Release\ProjectName.xml or similar

Microsoft Azure Backup Server failing with error 182

I am tring to install Microsoft Azure Backup Server but it's failing with the following error
Report configuration failed.
Verify that SQL Server Reporting Services is installed properly and
that it is running.
ID: 812
This is what I find in the log
[2018-04-25 12:09:41 PM] * Exception : =>
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.Net.WebException: The
request was aborted: Could not create SSL/TLS secure channel. at
System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Reporting.ReportingService2005.ListSecureMethods()
at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.CheckSslInstallation()
at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.ConnectToReportServerUrl(String
RSUrl, Boolean throwExcecption) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.ConstructReportServerUrl(String
sqlServerName, String sqlInstanceName) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.GetReportServerUrl(String
sqlServerName, String sqlInstanceName) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.CreateReportProxyObject(String
sqlServerName, String sqlInstanceName) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.CreateReportRootFolder(String
serverName, String instanceName, Boolean recreate) at
Microsoft.Internal.EnterpriseStorage.Dls.UI.Library.Reporting.Reporter.InstallReports(Boolean
calledFromSetup, String sourceFolderPath, String sqlServerName, String
sqlInstanceName, String dbConnectionString)
I have a configured certificate for the Reporting service and I tried deleting the encryption keys but still failed
Ensure that that the SQL Server Reporting Services is installed properly and that it is running and also make sure the appropriate ports (443) are open on the system. You may consider restarting the system and re-trying the operation.
Reference:https://support.microsoft.com/en-us/help/3041338/data-protection-manager-error-codes

SSIS Authentification with SharepointList data source

I'm creating an SSIS Package that imports data from a SharePoint List, I've an authentification issue due to the SPCRED Component I think.
for the record I'm using a developement server in a domain whitch is different from the Sharepoint One. So I do specifie this one "SharePoint Server DomainName" in my SPCREDHer is my configuration Because Ican't use my windows Credantials.
I verrified that with my credantials I've an admin role in the hole Sharepoint web site. when configuring my SharePoint List Source I've got all the columns I was Able to do the data mapping. but when executing the package it runs into an error because of the authentification Here is the error:
SSIS package "MyPackage.dtsx" starting.
Information: 0x4004300A at Liste FPDA, SSIS.Pipeline: Validation phase is beginning.
Error: 0xC0047062 at SharepointListName, SharepointListName [193]: System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'Negotiate,NTLM'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory factory)
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.ListsService.ListsSoap.GetListAndView(GetListAndViewRequest request)
at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.ListsService.ListsSoapClient.GetListAndView(String listName, String viewName)
at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.Adapter.ListsAdapter.GetSharePointFields(String listName, String viewId)
at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.ListServiceUtility.GetFields(Uri sharepointUri, NetworkCredential credentials, String listName, String viewName)
at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListSource.GetAccessibleSharePointColumns(String sharepointUrl, String listName, String viewName)
at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListSource.ValidateSharePointColumns()
at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListSource.Validate()
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostValidate(IDTSManagedComponentWrapper100 wrapper)
Error: 0xC0047017 at Liste FPDA, SSIS.Pipeline: Liste FPDA failed validation and returned error code 0x80131501.
Error: 0xC004700C at Liste FPDA, SSIS.Pipeline: One or more component failed validation.
Error: 0xC0024107 at Liste FPDA: There were errors during task validation.
SSIS package "MyPackage.dtsx" finished: Failure.
Thank You
I had exactly the same problem, what helped me was setting the runtime credentials using the guide I've found here
Manually set to use Custom Credentials, then enter details of an account that has permissions to read & write to the target Sharepoint list
At run time, the account password set in the connection manager will not be used, it must be set by using package configurations.
Go to SSIS menu > Package Configurations
Enable package configurations if not done already
Click Add to create a new configuration
Select required configuration location, probably either XML file or SQL Server if available
Click next to select properties
In the tree of items to configure, expand Connection Managers > SharePoint Credential > Properties
Select UserName and Password properties, click Next
Set configuration name & click Finish
The Password value will not have been saved to the configuration destination because it is secured. You need to open the configuration location and manually set the Password value.
I fixed my issue by adding Connection Parameters. Right click the SharePoint Credential and select "Parameterize..." from the pop-up menu. Then click the Property drop down and create parameters for both UserName and Password.

CRM Perfomance tool installation

I am getting following error while importing data through the CRM Performance toolkit. Please help with solution:
System.Security.SecurityException: Requested registry access is not allowed.
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at System.Diagnostics.PerformanceCounterLib.CreateRegistryEntry(String categoryName, PerformanceCounterCategoryType categoryType, CounterCreationDataCollection creationData, Boolean& iniRegistered)
at System.Diagnostics.PerformanceCounterLib.RegisterCategory(String categoryName, PerformanceCounterCategoryType categoryType, String categoryHelp, CounterCreationDataCollection creationData)
at System.Diagnostics.PerformanceCounterCategory.Create(String categoryName, String categoryHelp, PerformanceCounterCategoryType categoryType, CounterCreationDataCollection counterData)
at dbPopulator.DbPopulator.Main(String[] args)
The Zone of the assembly that failed was:
MyComputer
Its probably because the account you are running the toolkit as doesn't have enough permissions. it looks like the toolkit is trying to write something to the event. Try running as a server admin to rule out any permissions issues.
Related info: You receive the "Requested registry access is not allowed" error message when you try to create a custom event log

Resources