clickonce deployment issues
I'm working on a project deployed with clickonce, and i'm running through several issues.

There are 2 components in my software solution : a desktop client which needs .Net framework 3.5 to run, and a server (asp.net application) which lists available documents and provides a way to install the desktop client with clickonce.

My first problem is the prerequisites' one : i need a way to install the 3.5 framework prior to the client installation. Visual studio creates a setup.exe which takes care of that, but in order to make it work, it has to be run directly (instead of linking to the .application file), and the deployment url has to be known when creating the clickonce manifest.

So i have two more problems : there is apparently no way to run the client application with query string arguments after installing it with setup.exe, so instead of having a server displaying the documents list linking to url like ".../client.application?document=doc1" i can only have a link to setup.exe.

The other problem is worst : the server is intended to be used in relatively small private networks, and not on a single web server . The problem is : i do not know the deployment URL of the clickonce client at build time, so the setup.exe cannot run properly when the "install from a web site" option is checked. For now, the workaround is to have an offline installer which contains the setup.exe, prerequisites and the clickonce deployment files in a big zip file.

An user with the proper framework version can still use the .application link with querystring to the document to install/update the client and open the document. An user without the framework gets an error message ("system update required blablabla 3.5.0.0 blabla GAC"), and has to download the zip file, extracts it to his local machine and run the setup.exe to install the framework, then the client. And after that he has to go back to the documents list and use the link to launch the client with proper arguments.

Needless to say, i'm not very proud of this strategy, which ruins all clickonce deployment advantages.

My questions are : is it possible to get rid of the prerequisites issue in a more elegant way ? Is there a simple way to modify the installation url of the clickonce application when deploying the server in a network (like writing the url in a config file or something) ?

I'm new to clickonce deployment, and i haven't understand yet what and how i can do with it. 

Any suggestion is welcome.
clickonce deployment issues
===

I'm working on a project deployed with clickonce, and i'm running through several issues.

There are 2 components in my software solution : a desktop client which needs .Net framework 3.5 to run, and a server (asp.net application) which lists available documents and provides a way to install the desktop client with clickonce.

My first problem is the prerequisites' one : i need a way to install the 3.5 framework prior to the client installation. Visual studio creates a setup.exe which takes care of that, but in order to make it work, it has to be run directly (instead of linking to the .application file), and the deployment url has to be known when creating the clickonce manifest.

So i have two more problems : there is apparently no way to run the client application with query string arguments after installing it with setup.exe, so instead of having a server displaying the documents list linking to url like ".../client.application?document=doc1" i can only have a link to setup.exe.

The other problem is worst : the server is intended to be used in relatively small private networks, and not on a single web server . The problem is : i do not know the deployment URL of the clickonce client at build time, so the setup.exe cannot run properly when the "install from a web site" option is checked. For now, the workaround is to have an offline installer which contains the setup.exe, prerequisites and the clickonce deployment files in a big zip file.

An user with the proper framework version can still use the .application link with querystring to the document to install/update the client and open the document. An user without the framework gets an error message ("system update required blablabla 3.5.0.0 blabla GAC"), and has to download the zip file, extracts it to his local machine and run the setup.exe to install the framework, then the client. And after that he has to go back to the documents list and use the link to launch the client with proper arguments.

Needless to say, i'm not very proud of this strategy, which ruins all clickonce deployment advantages.

My questions are : is it possible to get rid of the prerequisites issue in a more elegant way ? Is there a simple way to modify the installation url of the clickonce application when deploying the server in a network (like writing the url in a config file or something) ?

I'm new to clickonce deployment, and i haven't understand yet what and how i can do with it. 

Any suggestion is welcome.