Hi,
Based on my understanding, you have a WPF Windows Application project and
publish the application via ClickOnce. Your problem is that after you
install the WPF application on a client machine and active the WPF
application via a URL with changed parameters, you get a prompt indicating
that the application was deployed from a different location. If I'm off
base, please feel free to let me know.
I performed a test on this issue but didn't reproduce the problem. The
following are the steps of my test:
1. Create a WPF Windows Application project and add a TextBox on the
Window1.xaml. In the Window1.xaml.cs file, write down the following code:
public partial class Window1 : System.Windows.Window
{
public Window1()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler(Window1_Loaded);
}
void Window1_Loaded(object sender, RoutedEventArgs e)
{
if (ApplicationDeployment.IsNetworkDeployed)
{
string url =
AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData[
0];
string queryString = (new Uri(url)).Query;
this.textBox1.Text = queryString;
}
}
}
2. Right click the WPF project in the Solution Explorer and choose
Propeties. In the Project Designer, switch to the 'Publish' tab.
3. Type '
http://localhost/WPFApplication/' in the 'Publishing Location'
textbox.
4. Click the Options button. In the Publish Options dialog, select the
checkbox before the 'Allow URL parameters to be passed to application'
option.
5. Publish the application and install it on the local machine.
6. Open IE and type
'
http://localhost/WPFApplication/WPFApplication.application?name=value' in
the address bar and press the Enter key.
The WPF application launches and shows '?name=value' in the TextBox.
7. Close the application and change the query string in IE address bar and
press the Enter key.
The WPF application launches again and shows the new query string in the
TextBox.
Is there any difference between your application and mine? You may also
have a try creating a new simple WPF Windows Application project to see if
the problem still exists.
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.