How can we retrieve query string information in a ClickOnce Application?

风格不统一 提交于 2019-12-11 14:21:18

问题


I made a .NET Windows Forms application that I want to deploy using ClickOnce. However, I will need the application to retrieve the query string parameters passed to it.

I found this MSDN article and followed its directions (select the check box labeled Allow URL parameters to be passed to application), but it doesn't appear to work:

How to: Retrieve Query String Information in a ClickOnce Application

ApplicationDeployment.CurrentDeployment.ActivationUri is null when the application loads.

eg:

http://example.com/Sample/Sample.application?a=1&b=2

Note: I'm not asking about passing the query string parameters to the setup.exe installation file for the application to work the first time when it is installed. Just the passing of query string to the application.


回答1:


D'oh! I needed to enable the same option from the Visual Studio IDE in addition to doing so from MageUI. I don't know how i missed it.



来源:https://stackoverflow.com/questions/3148084/how-can-we-retrieve-query-string-information-in-a-clickonce-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!