ClickOnce : ApplicationURI is null, but Allow URL parameters to be passed to application is enabled.

J

Joe

Hello,

I am trying to access the ApplicationURI property, but it seems that no
matter what I do, it is null. I have enabled the "Allow URL parameters to
be passed to application", but with no effect.

My test program is really simple:

if (ApplicationDeployment.IsNetworkDeployed) {
if (ApplicationDeployment.CurrentDeployment.ActivationUri == null) {
MessageBox.Show("activationuri is null");
}
} else {
MessageBox.Show("Application is not being run over http://");
}

I am placing the application onto an IIS 6.0 website, and "running" it via
http://server/clickonce.application?username=joe .

The application runs fine, but ActivationUri is always null. If I run it
locally from my own disk or via the debugger, I get the expected result of
"application is not being run over http://".


I have checked the clickonce.application file, and find a line that says
(please note the trustURLParameters attribute):

<deployment install="false" mapFileExtensions="true"
trustURLParameters="true" />


Is the trustURLParameters the only flag the runtime checks to enable this
feature?

Thanks for any information, I am about to resort to writing to file, and
then reading from it on the local system as a workaround :)

Joe
 
L

Linda Liu [MSFT]

Hi Joe,

To enable URL parameters to be passed to application, we should select the
"Allow URL parameters to be passed to application" option when we publish
the application.

To do this, right-click the project item in the Solution Explorer, and
choose Properties. In Property Designer, switch to the "Publish" tab and
click the "Options" button on the publish page. In the "Publish Options"
window, select the checkbox before the "Allow URL parameters to be passed
to application" option. Press OK and re-publish the application.

Please try my suggestion and let me know the result.


Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Amit Shah

Hi,

I have an application which I have published on a shared drive. I have also checked "Allow Url parameters to be passed to application" in the Publish tab of the Project.

Now I have a SQL stored procedure which send out an email with the link of the application. In that link I add parameters. For e.g. file:///M:/common/Net%20Applications/TestParam/UrlParameters.application?Id=1234

When the user clicks on the link in the email, it opens the application, but it does not recognizes the parameters.

Can someone advice what am I doing wrong.

Thanks in advance.

Kind Regards,

Amit Shah

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com/default.aspx?ref=ng
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top