ClickOnce application won't start - windows-10

Only on this one Win 10 PC it doesn't work, it just won't start, no messages why, not even in the log. I've even disabled firewall and anti-virus. I've even tried copying exe file and starting it without deployment and it worked, so there are no issues with the program. What should I do next?
This is the log:
PLATFORM VERSION INFO
Windows : 10.0.17134.0 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.7.3056.0 built by: NET472REL1
clr.dll : 4.7.3110.0 built by: NET472REL1LAST_C
dfdll.dll : 4.7.3056.0 built by: NET472REL1
dfshim.dll : 10.0.17134.1 (WinBuild.160101.0800)
SOURCES
Deployment url : file:///C:/Users/Vlatka/Desktop/Sindikat.appref-ms%7C
Server : Microsoft-IIS/10.0
X-Powered-By : ASP.NET
Deployment Provider url : http://...
ERROR SUMMARY
No errors were detected during this operation.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
* The manifest for this application does not have a signature. Signature validation will be ignored.
OPERATION PROGRESS STATUS
* [25.5.2018. 11:09:29] : Activation of C:\Users\Vlatka\Desktop\Sindikat.appref-ms| has started.
* [25.5.2018. 11:09:29] : Performing necessary update check as specified by the deployment.
* [25.5.2018. 11:09:30] : Activation of C:\Users\Vlatka\Desktop\Sindikat.appref-ms| succeeded.
ERROR DETAILS
No errors were detected during this operation.
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

The problem was new Windows Defender with ClickOnce update before app start, I've just changed that it looks for an update after the app start. Defender didn't warn the user if he would like to allow the app to start, despite the picked Warn option.

Don't forget to select the "This is a full trust application" option in "Properties > Security" before publish.

If you're installing on a completely new computer with Windows 10 and .NET Framework 4.8 and it doesn't launch, you most likely need to install Visual Studio to install any old dependencies you app might need.
It's definitely not a perfect solution but at least it works.

Related

Web deployment task failed (Could not complete the request to remote agent URL https://xx.publish.azurewebsites.windows.net/msdeploy.axd?site=XXXXXXX)

I am trying to publish blazor server web application to azure linux app service via visual studio community version 16.9.5
But it is failing with error information below:
Severity Code Description Project File Line Suppression State
Error Web deployment task failed. (Could not complete the request to
remote agent URL
'https://XXXXXXX.publish.azurewebsites.windows.net/msdeploy.axd?site=XXXXXXX-dev__staging'.)
Could not complete the request to remote agent URL
'https://XXXXXX.publish.azurewebsites.windows.net/msdeploy.axd?site=XXXXXX-dev__staging'.
The operation has timed out xxxxxx.web 0
I faced this issue earlier also but after one or two retry it was getting solved automatically. but this time I am unable to publish it after more than 20 tries. there is no exact information on exact problem anywhere.
Please suggest me if any exact cause of the error or solution.
Thanks,
Ashish
Troubleshooting:
Maybe you can try to set WEBSITE_WEBDEPLOY_USE_SCM=false on portal.
For more details, you can refer this post.
Why is application deployment failing on waws-prod-blu-167.publish.azurewebsites.windows.net?
In contrast, when using vs2019 was previously released, whether Service Dependencies were added.
Check whether the configuration of Service Dependencies is correct.
If all the above methods fail, please download publish profile and import to vs2019, then retry to publish your app.

When upgrading a WSP file using a C# code receive an error

There are several WSPs that I am trying to install, all of which were upgraded properly in SP2013 environment, but when I am trying to upgrade them in SP2016 then it is not working.
I am using a command of Solution.Upgrade to upgrade them.
Here's the error message received:
Type: Core Solution
Contains Web Application Resource: No
Contains Global Assembly: Yes
Contains Code Access Security Policy: No
Deployment Server Type: Front-end Web server
Deployment Status: Error
Deployed To: Globally deployed.
Last Operation Result: Some of the files failed to copy during deployment of the solution.
Last Operation Details: The solution has not been upgraded.
Last Operation Time: 5/17/2017 5:23 AM
Can any one tell me why?
Does it work if you retract the solution and deploy again? Try this if you have not.
How did you migrated your SP2013 sites to SP2016. Was it through powershell backup and restore command? There can be version conflict. So, try to migrate your site using database backup and restore.
Also, use Visual Studio 2015 to rebuild your solution and then deploy it. VS2015 has SP2016 templates. Take target framework 4.5 or above.
I am able to resolve this issue by seeing the logs carefully. While looking in to the logs I have found out that due to some reason Timer Service is stopped before my Upgrade code is run. So put a code to check the timer service status and if it is stopped then I started it again.
If you don't want to check for the stopped service. you can simply stop the service and start it again.
This hack has resolved my issue and now every wsp is deployed successfully.

msdeploy failure: IIS 7.5->8.5: Error: The ApplicationHost.config file is invalid / eventlog error 9000 on destination system

Using v7.1 (that is the ver at cmd prompt), 3.6 (from web platform installer) of msdeploy.exe
Migrating from Win2008-R2 IIS to Win2012-R2
Attempting to move everything IIS related over. (And yes, we have customized applicatiohost.config, but we do not know all the mods... that is why we are using a migration tool,,, to move everything...)
Command I am running:
C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy
-verb:sync -source:webserver,
computername=WIN-67E8GTGADGJ
-dest:webserver,computername=192.168.2.21,
userName="administrator",password="###"
output:
Info: Using ID '1d59e6bd-0f89-4479-9853-98e164c9f613' for connections to the rem
ote server.
Info: Using ID '0c99bd7f-faa3-4737-ac35-d65c495402b6' for connections to the rem
ote server.
Info: Adding MSDeploy.webServer (MSDeploy.webServer).
Info: Adding webServer (MSDeploy.webServer/webServer).
Info: Adding appHostConfig ().
Error: (8/24/2015 10:28:43 PM) An error occurred when the request was processed on the remote computer.
Error: The ApplicationHost.config file is invalid. Cannot proceed with synchronization.
Error count: 1.
MORE INFORMATION
The sequence of events is:
Target system logs one error event:
Microsoft-Windows-IIS-APPHOSTSVC -- message 9000
And then msdeploy on the source system throws (and msdeploy exits):
Error: (8/25/2015 4:36:50 PM) An error occurred when the request was processed on the remote computer.
Error: The ApplicationHost.config file is invalid. Cannot proceed with synchronization.
Error count: 1.
UPDATE: Initially I was getting TWO event log errors on target system. Message 9000 and 9012. I was able to fix the 9012 by extending the applicationhost.config file. But hours of work and no solution yet for the 9000 error.
I have examined the ApplicationHost.config, and compared it to baseline, and there really seems to be nothing special there.
What is the path to resolution?
The answer is that there seems to be real problems with msdeploy, but no one seems to understand (or document) why. The tool is primarily built to go from IIS 6.x (Win 2003) to newer IIS.
In our experience, when going from IIS 7.x to 8.x, you often cannot use msdeploy with "source:webserver" approach. However, msdeploy can do a lot of the lifting for you from 7.x to 8.x.
Here are some steps I have seen work:
First, do three steps. This will let msdeploy move as much as it can (would be nice if it could move more, but this is as far as I have seen work):
msdeploy -verbose -verb:sync -source:apphostconfig="WEB SITE NAME",computername=SOURCEMACHINE -dest:apphostconfig="WEB SITE NAME",computername=DESTINATIONMACHINE,userName="administrator",password="password-here" -enableLink:AppPoolExtension
Note the "enablelink" flag.
Repeat the above with:
-enableLink:CertificateExtension
and then
-enableLink:FrameworkConf
Once this is done, msdeploy has done all it can. You should now have the site migrated, with content and app pools, and ssl certs, and the configuration related to the sites and app pools.
For mime mappings, and other IIS system wide settings (compression is one example), you are on your own.
Don't ask me why there is no document on how to do this. (Don't ask me why msdeploy can't just do the whole freaking server. It works great from IIS 6, but not from IIS 7, like what kind of crazy is that? Anyway, send Satya an email about it.)

IIS Express Debugging No Longer Working

I'm using IIS Express with Visual Studio 2013 on Windows 8.1 x64 for a WebAPI 2 application (all en-US here). This worked just fine roughly a month ago, but now I'm getting errors when attempting to debug the application.
If I do not run VS as admin (again, didn't need to do this before), I get:
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
Additional information: Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\~AspAccessCheck_c00414062044.tmp' is denied.
A second error occurs after this, or it will be the first error if I run VS as Administrator:
A first chance exception of type 'System.Globalization.CultureNotFoundException' occurred in mscorlib.dll
Additional information: Culture is not supported.
If I run the same WebAPI application from WebMatrix 3, it runs without errors (with or without running 'as Admin').
Project IIS config settings:
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort>46435</IISExpressSSLPort>
<IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
<IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>
I also have the application running on http://localhost:46436.
What I also find really strange is that the project properties show "IIS Express" and to use a URL of http://localhost:46436/, but in the project file I'm seeing:
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>46435</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:46436</IISUrl>
That may explain my access denied. Regardless if I unset, save, and re-set to use IIS Express (storing it for all users), the <UseIIS> property is set back to true.
EDIT: It looks like "Use IIS" is normal. I created a new WebAPI 2 project as a test. It ran fine under IIS Express OOTB.
I also had this issue. Ended up having to right click the folder in question and add access for the IIS_IUSR account.
If this isn't causing critical errors, you can also disable break mode for this sort of issue via Debug -> Options -> Debugging and check Enable Just My Code (Managed Only)
I updated all of the packages via the 'Manage NuGet Packages' console, and it started working.

Error Deploying New Relic Instrumented Site to Azure from Github & VS.NET

I am getting the following error:
Error: The process cannot access the file 'C:\DWASFiles\Sites\mywebsitename\VirtualDirectory0\site\wwwroot\newrelic\NewRelic.Agent.Core.dll' because it is being used by another process.
In the Running deployment command... log file when attempting to deploy an Azure website from Github.
Would appreciate any pointers as to what could be causing this.
UPDATE: Turns out this is also failing when publishing directly from VS.NET with the following:
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4196,5): Warning : An error was encountered when processing operation 'Create File' on 'NewRelic.Agent.Core.dll'.
1>Retrying operation 'Update' on object filePath (mywebsitename\newrelic\NewRelic.Agent.Core.dll). Attempt 1 of 2.
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4196,5): Error : Web deployment task failed. ((06/07/2013 23:54:58) An error occurred when the request was processed on the remote computer.)
This was working before and I am not sure why it would have stopped.
NewRelic recommend stopping the website to unload the file and allow the deployment to go through.
As an alternative, you can set COR_ENABLE_PROFILING to 0 in your app settings on the configure tab to temporarily disable the profiling, which should then allow you to continue with the deployment while leaving the website operational throughout.
Instead of stopping the website you can temporarily turn off New Relic monitoring via the Configure tab on manage.windowsazure.com:
Configure > developer analytics > select "OFF" > Save
Deploy
Configure > developer analytics > select "ADD-ON" > Choose Add-on from dropdown > Save
Worked for me, both with a regular deployment from VS and an automatic build from VSO.
This is a known issue with the New Relic .NET agent for Azure Websites when performing an upgrade of the agent. The workaround is to stop the website to release the dll, finish the deployment and then restart the instance.
https://newrelic.com/docs/dotnet/azure-web-sites#h2-1
Not really a solution but more of a work-around, in the publish dialog view a preview of the changes and uncheck the NewRelic.Agent.Core.dll file so that it doesn't get published.
None of these answers work for me anymore. I have an Azure Basic tier website plan, which hosts multiple actual websites.
If I don't stop the website, I get the error mentioned above (newrelic.agent.core.dll is in use)...
If I do stop the website (or all of them), I get an error saying that the publishing endpoint isn't available.
If I go to the configure tab and disable the AddOn, we still get the error mentioned above (newrelic.agent.core.dll is in use)...
Pretty much we just republish over and over again with different permutations of the above until if works. It took me hours the other day, took me 10 minutes today.
If you are using webdeploy, then you can configure your webdeploy settings so that it ignores the file. However, if you do that, you will manually have to deploy any updates to the new relic agent.
I had a similar issue with the new relic log file being locked, and solved it by:
Moving the new relic log file to a subdirectory of the web root (e.g. \newreliclogs)
Adding 2 lines to my powershell script that configured the skip directive to ignore that whole directory. e.g. (where destBaseOptions is of type Microsoft.Web.Deployment.DeploymentBaseOptions
$skipDirective = new-object Microsoft.Web.Deployment.DeploymentSkipDirective("NewRelicLog","objectName=dirPath,absolutePath=.*\newreliclogs$")
$destBaseOptions.SkipDirectives.Add($skipDirective)
Depending on how you are using webdeploy, the configuration is achieved slightly differently, I used the following links to help me piece it together:
https://technet.microsoft.com/en-us/library/dd569089(WS.10).aspx
https://msdn.microsoft.com/en-us/library/microsoft.web.deployment.deploymentskipdirective(v=vs.90).aspx
https://msdn.microsoft.com/en-us/library/dd543313(v=vs.90).aspx
http://blogs.iis.net/jamescoo/archive/2009/11/03/msdeploy-api-scenarios.aspx
http://forums.iis.net/p/1192163/2031814.aspx#2031813
And I used the powershell script from the Octopus Deploy Library at https://library.octopusdeploy.com/#!/step-template/actiontemplate-web-deploy-publish-website-(msdeploy).

Resources