ClickOnce Nightmares

  • Thread starter Thread starter Rex the Strange
  • Start date Start date
R

Rex the Strange

I'm trying to deploy a clickonce application using the command line (so
that I can have it in a batch process). I have the following
problems/questions. Please, if anyone can help, I'd appreciate it.

I've managed to deploy the application using the instructions by
microsoft, here:

http://msdn2.microsoft.com/en-us/library/xc3tc5xx.aspx

This is all peachy keen. Works fine except...

1 - There is no "setup.exe" file as occurs when deploying through the
IDE. Why is this and can I get one?

2 - It cannot deploy over the network. Only locally (in other words,
installing from \\mycomputer\public fails, but c:\public succeeds).

3 - When it is installed it doesn't give me an icon in the
"Start\Programs" menu nor is it listed in the "Add/Remove Programs"
when installed. I was wondering, somewhat, if it actually installed at
all except that on install it runs (as it has been instructed to do)
and the exe is installed in my user directory.

Please help. What am I missing? If you have any questions feel free to
ask. I need to get this out the door soon so I will be checking this
post regularly.

tia,

rts.
 
Hi,

Check the security permissions of your ClickOnce app. From what I gather,
your app is running ok locally but it is failing from the network location,
this would suggest security issues.
If there are security issues you need to create an .MSI file with the
security permissions that your ClickOnce needs.

As per setup.exe, just copy one from the location where VS2005 has created
it, since it is the same setup.exe (if you check the creation date of the
setup.exe file you will see that it is quite old). I think the setup.exe is
just a bootstrapper to allow you t install .NET 2.0 and other pre-requisites
for your ClickOnce app.

Hope this helps

Fitim Skenderi
 
Check the security permissions of your ClickOnce app. From what I gather,
your app is running ok locally but it is failing from the network location,
this would suggest security issues.
If there are security issues you need to create an .MSI file with the
security permissions that your ClickOnce needs.

Thanks for help. Nice try but no cigar. I checked the security
permissions for all of the files (the two manifest files, the
application file and all of the related directories). They are all set
to full permission for all users. Just to make sure I added myself as a
permissed user with full privileges. No go. Any other suggestions?
Please?
As per setup.exe, just copy one from the location where VS2005 has created
it, since it is the same setup.exe (if you check the creation date of the
setup.exe file you will see that it is quite old). I think the setup.exe is
just a bootstrapper to allow you t install .NET 2.0 and other pre-requisites
for your ClickOnce app.

Not quite sure what you mean here. Can you explain further, please?
Also, what about the icon problem? What do I need to do there?

Thanks,

rts.
 
Is your application on-line only or off-line enabled as well?
What error are you exactly getting when you try to run your ClockOnce app
from network share?

Fitim Skenderi
 
"Cannot retrieve application. Authentication Error" and then, if I
click the "Details..." button, I get a log file which contains the
following (proprietary information removed and replaced with
[deployment path] and [application name])

-------------------------------------------
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.42
System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200)
mscorwks.dll : 2.0.50727.42 (RTM.050727-4200)
dfdll.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)

SOURCES
Deployment url : file://[deployment path]/[application
name].application
Deployment Provider url : file://[deployment path]

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed
later in the log.
* Activation of \\[deployment path]\Query Viewer.application resulted
in exception. Following failure messages were detected:
+ Downloading file://dv1itsoftbuild1/Test Deployment did not succeed.
+ Access to the path '\\[deployment path]' is denied.
+ Access to the path '\\[deployment path]' is denied.
+ Access to the path '\\[deployment path]' is denied.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [10/17/2006 9:48:27 AM] : Activation of \\[deployment path]\Query
Viewer.application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [10/17/2006 9:48:28 AM]
System.Deployment.Application.DeploymentDownloadException (Unknown
subtype)
- Downloading file://dv1itsoftbuild1/Test Deployment did not succeed.
- Source: System.Deployment
- Stack trace:
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
at
System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at
System.Deployment.Application.FileDownloader.Download(SubscriptionState
subState)
at
System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri&
sourceUri, String targetPath, IDownloadNotification notification,
DownloadOptions options, ServerInformation& serverInformation)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification
notification, DownloadOptions options, ServerInformation&
serverInformation)
at
System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore
subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile&
tempFile, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState&
subState, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
activationUri, Boolean isShortcut)
at
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object
state)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\[deployment path]' is denied.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult
asyncResult)
at System.Net.FileWebRequest.GetResponse()
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\[deployment path]' is denied.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri,
FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.WrappedGetResponseCallback(Object
state)
--- Inner Exception ---
System.UnauthorizedAccessException
- Access to the path '\\[deployment path]' is denied.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Net.FileWebStream..ctor(FileWebRequest request, String
path, FileMode mode, FileAccess access, FileShare sharing, Int32
length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri,
FileAccess access, Boolean asyncHint)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.


-------------------------------------------


It's possible I'm going about this all wrong. Is there a good
walkthrough/tutorial on the web about this stuff (apart from the
aforementioned one)?

rts.
 
It is security issue.
Ok.

1. Goto start menu/control panel/administrative tools and start the
Microsoft .NET Framework 2.0 Configuration
2. Expand "Runtime Security Policy" tree node (left-hand side of the window)
3. Expand "Machine" tree node
4. Exapnd "Code Groups" node
5. Expand "All_Code" node
6. Right-click on "All_Code" node and select "New..."
7. Type in the name of new Code group (it can be your application name)
8. Click on "Next" button
9. From the drop-down combo select "URL" option, and in the URL textbox type
in the network share where your ClickOne app is located (you will see the
examples)
10. Click on the "Next" button
10. select "Use existing permission Set" radio-button, and on the drop-down
select "FullTrust" option
11. Click on button "finish"

Your application shold work without any problems.

Fitim Skenderi



Rex the Strange said:
"Cannot retrieve application. Authentication Error" and then, if I
click the "Details..." button, I get a log file which contains the
following (proprietary information removed and replaced with
[deployment path] and [application name])

-------------------------------------------
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.42
System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200)
mscorwks.dll : 2.0.50727.42 (RTM.050727-4200)
dfdll.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)

SOURCES
Deployment url : file://[deployment path]/[application
name].application
Deployment Provider url : file://[deployment path]

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed
later in the log.
* Activation of \\[deployment path]\Query Viewer.application resulted
in exception. Following failure messages were detected:
+ Downloading file://dv1itsoftbuild1/Test Deployment did not succeed.
+ Access to the path '\\[deployment path]' is denied.
+ Access to the path '\\[deployment path]' is denied.
+ Access to the path '\\[deployment path]' is denied.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [10/17/2006 9:48:27 AM] : Activation of \\[deployment path]\Query
Viewer.application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [10/17/2006 9:48:28 AM]
System.Deployment.Application.DeploymentDownloadException (Unknown
subtype)
- Downloading file://dv1itsoftbuild1/Test Deployment did not succeed.
- Source: System.Deployment
- Stack trace:
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
at
System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at
System.Deployment.Application.FileDownloader.Download(SubscriptionState
subState)
at
System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri&
sourceUri, String targetPath, IDownloadNotification notification,
DownloadOptions options, ServerInformation& serverInformation)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification
notification, DownloadOptions options, ServerInformation&
serverInformation)
at
System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore
subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile&
tempFile, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState&
subState, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
activationUri, Boolean isShortcut)
at
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object
state)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\[deployment path]' is denied.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult
asyncResult)
at System.Net.FileWebRequest.GetResponse()
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\[deployment path]' is denied.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri,
FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.WrappedGetResponseCallback(Object
state)
--- Inner Exception ---
System.UnauthorizedAccessException
- Access to the path '\\[deployment path]' is denied.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Net.FileWebStream..ctor(FileWebRequest request, String
path, FileMode mode, FileAccess access, FileShare sharing, Int32
length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri,
FileAccess access, Boolean asyncHint)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.


-------------------------------------------


It's possible I'm going about this all wrong. Is there a good
walkthrough/tutorial on the web about this stuff (apart from the
aforementioned one)?

rts.

fitim said:
Is your application on-line only or off-line enabled as well?
What error are you exactly getting when you try to run your ClockOnce app
from network share?

Fitim Skenderi
 
Do this on the client side?


fitim said:
It is security issue.
Ok.

1. Goto start menu/control panel/administrative tools and start the
Microsoft .NET Framework 2.0 Configuration
2. Expand "Runtime Security Policy" tree node (left-hand side of the window)
3. Expand "Machine" tree node
4. Exapnd "Code Groups" node
5. Expand "All_Code" node
6. Right-click on "All_Code" node and select "New..."
7. Type in the name of new Code group (it can be your application name)
8. Click on "Next" button
9. From the drop-down combo select "URL" option, and in the URL textbox type
in the network share where your ClickOne app is located (you will see the
examples)
10. Click on the "Next" button
10. select "Use existing permission Set" radio-button, and on the drop-down
select "FullTrust" option
11. Click on button "finish"

Your application shold work without any problems.

Fitim Skenderi



Rex the Strange said:
"Cannot retrieve application. Authentication Error" and then, if I
click the "Details..." button, I get a log file which contains the
following (proprietary information removed and replaced with
[deployment path] and [application name])

-------------------------------------------
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.42
System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200)
mscorwks.dll : 2.0.50727.42 (RTM.050727-4200)
dfdll.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)

SOURCES
Deployment url : file://[deployment path]/[application
name].application
Deployment Provider url : file://[deployment path]

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed
later in the log.
* Activation of \\[deployment path]\Query Viewer.application resulted
in exception. Following failure messages were detected:
+ Downloading file://dv1itsoftbuild1/Test Deployment did not succeed.
+ Access to the path '\\[deployment path]' is denied.
+ Access to the path '\\[deployment path]' is denied.
+ Access to the path '\\[deployment path]' is denied.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [10/17/2006 9:48:27 AM] : Activation of \\[deployment path]\Query
Viewer.application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [10/17/2006 9:48:28 AM]
System.Deployment.Application.DeploymentDownloadException (Unknown
subtype)
- Downloading file://dv1itsoftbuild1/Test Deployment did not succeed.
- Source: System.Deployment
- Stack trace:
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
at
System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at
System.Deployment.Application.FileDownloader.Download(SubscriptionState
subState)
at
System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri&
sourceUri, String targetPath, IDownloadNotification notification,
DownloadOptions options, ServerInformation& serverInformation)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification
notification, DownloadOptions options, ServerInformation&
serverInformation)
at
System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore
subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile&
tempFile, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState&
subState, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
activationUri, Boolean isShortcut)
at
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object
state)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\[deployment path]' is denied.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult
asyncResult)
at System.Net.FileWebRequest.GetResponse()
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\[deployment path]' is denied.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri,
FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.WrappedGetResponseCallback(Object
state)
--- Inner Exception ---
System.UnauthorizedAccessException
- Access to the path '\\[deployment path]' is denied.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Net.FileWebStream..ctor(FileWebRequest request, String
path, FileMode mode, FileAccess access, FileShare sharing, Int32
length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri,
FileAccess access, Boolean asyncHint)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.


-------------------------------------------


It's possible I'm going about this all wrong. Is there a good
walkthrough/tutorial on the web about this stuff (apart from the
aforementioned one)?

rts.

fitim said:
Is your application on-line only or off-line enabled as well?
What error are you exactly getting when you try to run your ClockOnce app
from network share?

Fitim Skenderi


Check the security permissions of your ClickOnce app. From what I
gather,
your app is running ok locally but it is failing from the network
location,
this would suggest security issues.
If there are security issues you need to create an .MSI file with the
security permissions that your ClickOnce needs.

Thanks for help. Nice try but no cigar. I checked the security
permissions for all of the files (the two manifest files, the
application file and all of the related directories). They are all set
to full permission for all users. Just to make sure I added myself as a
permissed user with full privileges. No go. Any other suggestions?
Please?

As per setup.exe, just copy one from the location where VS2005 has
created
it, since it is the same setup.exe (if you check the creation date of
the
setup.exe file you will see that it is quite old). I think the
setup.exe
is
just a bootstrapper to allow you t install .NET 2.0 and other
pre-requisites
for your ClickOnce app.

Not quite sure what you mean here. Can you explain further, please?
Also, what about the icon problem? What do I need to do there?

Thanks,

rts.



Hope this helps

Fitim Skenderi

I'm trying to deploy a clickonce application using the command line
(so
that I can have it in a batch process). I have the following
problems/questions. Please, if anyone can help, I'd appreciate it.

I've managed to deploy the application using the instructions by
microsoft, here:

http://msdn2.microsoft.com/en-us/library/xc3tc5xx.aspx

This is all peachy keen. Works fine except...

1 - There is no "setup.exe" file as occurs when deploying through
the
IDE. Why is this and can I get one?

2 - It cannot deploy over the network. Only locally (in other words,
installing from \\mycomputer\public fails, but c:\public succeeds).

3 - When it is installed it doesn't give me an icon in the
"Start\Programs" menu nor is it listed in the "Add/Remove Programs"
when installed. I was wondering, somewhat, if it actually installed
at
all except that on install it runs (as it has been instructed to do)
and the exe is installed in my user directory.

Please help. What am I missing? If you have any questions feel free
to
ask. I need to get this out the door soon so I will be checking this
post regularly.

tia,

rts.
 
Nope. Still not working. And besides, I can't get my users to do this
in order to install the application. I need another option that doesn't
require manipulating the client machine.

fitim said:
It is security issue.
Ok.

1. Goto start menu/control panel/administrative tools and start the
Microsoft .NET Framework 2.0 Configuration
2. Expand "Runtime Security Policy" tree node (left-hand side of the window)
3. Expand "Machine" tree node
4. Exapnd "Code Groups" node
5. Expand "All_Code" node
6. Right-click on "All_Code" node and select "New..."
7. Type in the name of new Code group (it can be your application name)
8. Click on "Next" button
9. From the drop-down combo select "URL" option, and in the URL textbox type
in the network share where your ClickOne app is located (you will see the
examples)
10. Click on the "Next" button
10. select "Use existing permission Set" radio-button, and on the drop-down
select "FullTrust" option
11. Click on button "finish"

Your application shold work without any problems.

Fitim Skenderi



Rex the Strange said:
"Cannot retrieve application. Authentication Error" and then, if I
click the "Details..." button, I get a log file which contains the
following (proprietary information removed and replaced with
[deployment path] and [application name])

-------------------------------------------
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.42
System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200)
mscorwks.dll : 2.0.50727.42 (RTM.050727-4200)
dfdll.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)

SOURCES
Deployment url : file://[deployment path]/[application
name].application
Deployment Provider url : file://[deployment path]

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed
later in the log.
* Activation of \\[deployment path]\Query Viewer.application resulted
in exception. Following failure messages were detected:
+ Downloading file://dv1itsoftbuild1/Test Deployment did not succeed.
+ Access to the path '\\[deployment path]' is denied.
+ Access to the path '\\[deployment path]' is denied.
+ Access to the path '\\[deployment path]' is denied.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [10/17/2006 9:48:27 AM] : Activation of \\[deployment path]\Query
Viewer.application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [10/17/2006 9:48:28 AM]
System.Deployment.Application.DeploymentDownloadException (Unknown
subtype)
- Downloading file://dv1itsoftbuild1/Test Deployment did not succeed.
- Source: System.Deployment
- Stack trace:
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
at
System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at
System.Deployment.Application.FileDownloader.Download(SubscriptionState
subState)
at
System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri&
sourceUri, String targetPath, IDownloadNotification notification,
DownloadOptions options, ServerInformation& serverInformation)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification
notification, DownloadOptions options, ServerInformation&
serverInformation)
at
System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore
subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile&
tempFile, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState&
subState, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
activationUri, Boolean isShortcut)
at
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object
state)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\[deployment path]' is denied.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult
asyncResult)
at System.Net.FileWebRequest.GetResponse()
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\[deployment path]' is denied.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri,
FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.WrappedGetResponseCallback(Object
state)
--- Inner Exception ---
System.UnauthorizedAccessException
- Access to the path '\\[deployment path]' is denied.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Net.FileWebStream..ctor(FileWebRequest request, String
path, FileMode mode, FileAccess access, FileShare sharing, Int32
length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri,
FileAccess access, Boolean asyncHint)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.


-------------------------------------------


It's possible I'm going about this all wrong. Is there a good
walkthrough/tutorial on the web about this stuff (apart from the
aforementioned one)?

rts.

fitim said:
Is your application on-line only or off-line enabled as well?
What error are you exactly getting when you try to run your ClockOnce app
from network share?

Fitim Skenderi


Check the security permissions of your ClickOnce app. From what I
gather,
your app is running ok locally but it is failing from the network
location,
this would suggest security issues.
If there are security issues you need to create an .MSI file with the
security permissions that your ClickOnce needs.

Thanks for help. Nice try but no cigar. I checked the security
permissions for all of the files (the two manifest files, the
application file and all of the related directories). They are all set
to full permission for all users. Just to make sure I added myself as a
permissed user with full privileges. No go. Any other suggestions?
Please?

As per setup.exe, just copy one from the location where VS2005 has
created
it, since it is the same setup.exe (if you check the creation date of
the
setup.exe file you will see that it is quite old). I think the
setup.exe
is
just a bootstrapper to allow you t install .NET 2.0 and other
pre-requisites
for your ClickOnce app.

Not quite sure what you mean here. Can you explain further, please?
Also, what about the icon problem? What do I need to do there?

Thanks,

rts.



Hope this helps

Fitim Skenderi

I'm trying to deploy a clickonce application using the command line
(so
that I can have it in a batch process). I have the following
problems/questions. Please, if anyone can help, I'd appreciate it.

I've managed to deploy the application using the instructions by
microsoft, here:

http://msdn2.microsoft.com/en-us/library/xc3tc5xx.aspx

This is all peachy keen. Works fine except...

1 - There is no "setup.exe" file as occurs when deploying through
the
IDE. Why is this and can I get one?

2 - It cannot deploy over the network. Only locally (in other words,
installing from \\mycomputer\public fails, but c:\public succeeds).

3 - When it is installed it doesn't give me an icon in the
"Start\Programs" menu nor is it listed in the "Add/Remove Programs"
when installed. I was wondering, somewhat, if it actually installed
at
all except that on install it runs (as it has been instructed to do)
and the exe is installed in my user directory.

Please help. What am I missing? If you have any questions feel free
to
ask. I need to get this out the door soon so I will be checking this
post regularly.

tia,

rts.
 
EUREKA!!

It turns out that my parameters for mage.exe were wrong, particularly
the installurl parameter which I had set to a directory whereas it
should have pointed to the deployment manifest.

Now it will install, creates the icon in Setup/Programs and is listed
in the Add/Remove Programs dialog. Now I'm facing problems with the
application having particular access permissions (notably, writing to
the registry). I get a dialog with:

"Application attempted to perform an operation not allowed by the
security policy"

Still, an improvement. This is, I think what fitim skenderi was talking
about. Still, I can't get my end users to change their machines (don't
ask me why, I just can't) so there must be something I can change to
allow this. After all, none of this happens if you deploy using the
IDE's publish function (which is how I managed to find this - I
compared the IDE manifests against my self generated ones, in case
anyone was wondering).

Any ideas, people?

rts.
 
Eureka, again!

Setting -trustlevel to fulltrust takes care of this!

Now, icons and updates...

There does not appear to be a mage command line option for setting the
app to check for updates before running. This would be a nice feature.
Also, I have no icon - that will be a matter for an icon file being
provided (easy enough, I would imagine).

It would nice to set the filenames to use the .deploy convention but,
again, there doesn't seem to be a command line option in mage.exe for
that. Any thoughts?
 
Oh, I also discovered that Microsoft's documentation regarding mage.exe
is incorrect. It claims:

-I, -Install willInstall
(Deployment manifests only) Indicates whether or not the ClickOnce
application should install onto the local machine, or whether it should
run from the Web. Installing an application gives that application a
presence in the Windows Start menu. Valid values are "true" or "t", and
"false" or "f". If unspecified, the default value is "true".

Err, actually, the default value is "false." That was part of my
problem. Be sure to use:

-Install true

in your mage command line.

hth
rts
 
Alrighty then, here's the latest update in the ClickOnce saga:

There is no option for checking for updates before the application runs
if you're using Mage.exe. You can do it with MageUI.exe, but that's a
GUI interface and totally defeats the purpose of what we're trying to
do here. Similarly, you can't get the .deploy mechanism happening with
mage.exe, alone.

So, in your build process, find an xslt processor (I used msxsl - free
from microsoft - search msdn for it) and parse the the xsl which dfirka
supplies at


http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=750938&SiteID=1

into your deployment manifest (which is, after all, simply an xml
file).

There's another one there for icon assignation - will post on success
of that following testing.

hth
rts.
 
If you are using local resource or database connection from your ClickOnce
app, you have no other choice but to give your assembly enough right to
execute. One way of doing it is to create an .MSI installation file with the
right security settings for your assembly, then your clients prior to using
your app need to install the settings. If your app is used locally (on the
LAN) you could create a logon script that will automatically install the
necessary security settings when the user logs in.

Another way is to get a certificate from VeriSign or Thawte and sign your
assembly and the deployment manifest with the trusted certificate.

Hope this helps

Fitim Skenderi


Rex the Strange said:
Nope. Still not working. And besides, I can't get my users to do this
in order to install the application. I need another option that doesn't
require manipulating the client machine.

fitim said:
It is security issue.
Ok.

1. Goto start menu/control panel/administrative tools and start the
Microsoft .NET Framework 2.0 Configuration
2. Expand "Runtime Security Policy" tree node (left-hand side of the
window)
3. Expand "Machine" tree node
4. Exapnd "Code Groups" node
5. Expand "All_Code" node
6. Right-click on "All_Code" node and select "New..."
7. Type in the name of new Code group (it can be your application name)
8. Click on "Next" button
9. From the drop-down combo select "URL" option, and in the URL textbox
type
in the network share where your ClickOne app is located (you will see the
examples)
10. Click on the "Next" button
10. select "Use existing permission Set" radio-button, and on the
drop-down
select "FullTrust" option
11. Click on button "finish"

Your application shold work without any problems.

Fitim Skenderi



Rex the Strange said:
"Cannot retrieve application. Authentication Error" and then, if I
click the "Details..." button, I get a log file which contains the
following (proprietary information removed and replaced with
[deployment path] and [application name])

-------------------------------------------
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.42
System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200)
mscorwks.dll : 2.0.50727.42 (RTM.050727-4200)
dfdll.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)

SOURCES
Deployment url : file://[deployment path]/[application
name].application
Deployment Provider url : file://[deployment path]

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed
later in the log.
* Activation of \\[deployment path]\Query Viewer.application resulted
in exception. Following failure messages were detected:
+ Downloading file://dv1itsoftbuild1/Test Deployment did not succeed.
+ Access to the path '\\[deployment path]' is denied.
+ Access to the path '\\[deployment path]' is denied.
+ Access to the path '\\[deployment path]' is denied.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [10/17/2006 9:48:27 AM] : Activation of \\[deployment path]\Query
Viewer.application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [10/17/2006 9:48:28 AM]
System.Deployment.Application.DeploymentDownloadException (Unknown
subtype)
- Downloading file://dv1itsoftbuild1/Test Deployment did not succeed.
- Source: System.Deployment
- Stack trace:
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
at
System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at
System.Deployment.Application.FileDownloader.Download(SubscriptionState
subState)
at
System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri&
sourceUri, String targetPath, IDownloadNotification notification,
DownloadOptions options, ServerInformation& serverInformation)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification
notification, DownloadOptions options, ServerInformation&
serverInformation)
at
System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore
subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile&
tempFile, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState&
subState, IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
activationUri, Boolean isShortcut)
at
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object
state)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\[deployment path]' is denied.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult
asyncResult)
at System.Net.FileWebRequest.GetResponse()
at
System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem
next)
--- Inner Exception ---
System.Net.WebException
- Access to the path '\\[deployment path]' is denied.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri,
FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.WrappedGetResponseCallback(Object
state)
--- Inner Exception ---
System.UnauthorizedAccessException
- Access to the path '\\[deployment path]' is denied.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Net.FileWebStream..ctor(FileWebRequest request, String
path, FileMode mode, FileAccess access, FileShare sharing, Int32
length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri,
FileAccess access, Boolean asyncHint)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.


-------------------------------------------


It's possible I'm going about this all wrong. Is there a good
walkthrough/tutorial on the web about this stuff (apart from the
aforementioned one)?

rts.

fitim skenderi wrote:
Is your application on-line only or off-line enabled as well?
What error are you exactly getting when you try to run your ClockOnce
app
from network share?

Fitim Skenderi


Check the security permissions of your ClickOnce app. From what I
gather,
your app is running ok locally but it is failing from the network
location,
this would suggest security issues.
If there are security issues you need to create an .MSI file with
the
security permissions that your ClickOnce needs.

Thanks for help. Nice try but no cigar. I checked the security
permissions for all of the files (the two manifest files, the
application file and all of the related directories). They are all
set
to full permission for all users. Just to make sure I added myself
as a
permissed user with full privileges. No go. Any other suggestions?
Please?

As per setup.exe, just copy one from the location where VS2005 has
created
it, since it is the same setup.exe (if you check the creation date
of
the
setup.exe file you will see that it is quite old). I think the
setup.exe
is
just a bootstrapper to allow you t install .NET 2.0 and other
pre-requisites
for your ClickOnce app.

Not quite sure what you mean here. Can you explain further, please?
Also, what about the icon problem? What do I need to do there?

Thanks,

rts.



Hope this helps

Fitim Skenderi

I'm trying to deploy a clickonce application using the command
line
(so
that I can have it in a batch process). I have the following
problems/questions. Please, if anyone can help, I'd appreciate
it.

I've managed to deploy the application using the instructions by
microsoft, here:

http://msdn2.microsoft.com/en-us/library/xc3tc5xx.aspx

This is all peachy keen. Works fine except...

1 - There is no "setup.exe" file as occurs when deploying through
the
IDE. Why is this and can I get one?

2 - It cannot deploy over the network. Only locally (in other
words,
installing from \\mycomputer\public fails, but c:\public
succeeds).

3 - When it is installed it doesn't give me an icon in the
"Start\Programs" menu nor is it listed in the "Add/Remove
Programs"
when installed. I was wondering, somewhat, if it actually
installed
at
all except that on install it runs (as it has been instructed to
do)
and the exe is installed in my user directory.

Please help. What am I missing? If you have any questions feel
free
to
ask. I need to get this out the door soon so I will be checking
this
post regularly.

tia,

rts.
 
Hi,

basically I am facing the same or at least similar problems:

1. I could not find any mage.exe option influencing the "update"
strategy (check before running the app, check afterwards, etc. etc.)

2. Also when trying to apply a minVersion I always get the error that
the specified version (e. g. 2.0.0.0 or also "2.0.0.0") is not valid

3. I successfully am able to provide all manifests for a version
1.0.0.0. When a user hits the install button on the "deployment" html
page the app gets installed. However when generating the files for a
version 2.0.0.0 and putting those into the deployment folder, the
application does not update itself when run.

Any ideas?
Thank you very much in advance,
Michael
 
I found that many of the options that are available in MageUI or in the
IDE build utility are not available in the command line mage.exe. The
only option is to add these manually into the XML script. See my later
posts for info on this.

hth
rts
 
Back
Top