My application works fine on my development machines which already have the Framework installed, but trusting the prequestite feature to install the framework or Windows Installer on machines which need the pre-req. install fails.
The browser reports CGI Error: The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: (...with no more info...)
I've had no look in searching the solution that applies to my situation.
A feature of possible interest is that each time I publish a new version of the application the host server reports an unhandled exception.
System.ArgumentNullException was unhandled Message="Path cannot be null.\r\nParameter name: path" Source="mscorlib" ParamName="path" StackTrace: 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) at System.Deployment.Application.Logger.CreateLogFileStream() at System.Deployment.Application.Logger.FlushLogs() at System.Deployment.Application.Logger.FlushCurrentThreadLogs() at System.Deployment.Application.ApplicationActivator.DisplayActivationFailureReason(Exception exception) at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state) at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
Any help appreciated. | | Kevin Prendergast Thursday, March 30, 2006 8:17 PM | For what its worth, I think I've figured out my problem (which was IIS configuration)
I'm on XP pro (SP2) with IIS 5 and VS2005Pro.
Perhaps I should've paid more attention, but I had Scripts and Executables set on the web site (which I thought they said was correct, somewhere). When Iset that to, "scripts only", the client browser will download the setup.exe and run it. With that, there is obviously a bunch of "security noise" ("are you sure?", "this could be malicious?", etc), but after that it works fine. We have a "virginized" machine that we use for this sort of testing (ensuring that setups work) and it does download and install the prerequistes from the appropriate locations. The .NET 2.0 Framework got installed and then the application launched. The one thing to be sure of is that IF you are posting to IIS on your own machine (in Project Properties/Publish, your publish location is http://localhost/<SomeDir>) then you need to set the Installation URL to your external IP/Name. I had mistyped my IP address and it took me a while to figure out why .NET was getting installed but it failed tolaunch the application. It seems to me that if you don't put anything in the Installation URL, it should use whatever URL was used to launch the setup.exe.
Incidentally, I also added a ReportViewer to my app. I had to manually add it to the prerequisites, but once that was done, it installed that automatically, too.
I hope this helps.
-Troy | | TroyB Thursday, April 20, 2006 2:10 PM | I'm really stuck on this one. Can anybody recommend a solution? - Or even report that the same is happening to them?
I see that this problem is going to prevent me from migrating an ASP application to a much nicer Smart Client implementation.
Best Regards. | | Kevin Prendergast Tuesday, April 04, 2006 3:20 PM | Kevin, are you seeing problems with the boostrapper and installing the .NET Framework on the client or with using ClickOnce to install/update the app after the .NET Framework is installed.
From your question at the start of the post it looks like you're running into problem with installing .NET Framework pre-req, but the attached log text appears to be from ClickOnce engine which implies that .NET Framework is already installed.
Can you providemore details on your scenario and the full ClickOnce log and we can try narrowing down the problem.
Regards, Sameer
| | Sameer Bhangar - MSFT Friday, April 07, 2006 1:11 AM | I'd say it was the bootstrapper failing to install the .Net Framework. I have a machine "A"with the Framework installed and I can happily publish updates to the server "B" which are then loaded and run on machine "A".
But on machine "C" which doesn't have the Framework installed, I visit the publish site of Machine "B", I get the ClickOnce install button, which when clicked leads to the CGI Error, The specified CGI application misbehaved... page.
So I conclude the ClickOnce deployment is working fine once the framework is installed, but the bootstrapper / Framework installation is the bit with a problem.
I've repeated the tests this morning to capture the problem.
- When the CGI Error Occurs the Server produces the following exception
System.ArgumentNullException was unhandled Message="Path cannot be null.\r\nParameter name: path" Source="mscorlib" ParamName="path" StackTrace: 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) at System.Deployment.Application.Logger.CreateLogFileStream() at System.Deployment.Application.Logger.FlushLogs() at System.Deployment.Application.Logger.FlushCurrentThreadLogs() at System.Deployment.Application.ApplicationActivator.DisplayActivationFailureReason(Exception exception) at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state) at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
- The Application Log in the server records the following events.
The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: Unable to open shim database version registry key - v2.0.50727.00000.
EventType clr20r3, P1 dfsvc.exe, P2 2.0.50727.42, P3 4333af20, P4 mscorlib, P5 2.0.0.0, P6 4333ab80, P7 3450, P8 29, P9 system.argumentnullexception, P10 NIL.
- I can't locate the ClickOnce Log file. I've created a registry key [HKCU\Software\Microsoft\Windows\CurrentVersion\Deployment] "LogFilePath" on the Server and Client machines "A" & "B" which have the framework installed. I've looked for the log on machine "C". Does this indicate something more fundamentally wrong?
Finally, the log text that I previously attached was from the server, Machine "B" and occured as the project was published from the development machine to the server. At face value it didn't appear to cause me any direct problems, but not being an expert I can't judge where the root cause lies. However, this exception no longer occurs, probably due to me changing one of thesettings along the way.
Please let me know what you think I should do next.
Best Regards. KP. | | Kevin Prendergast Friday, April 07, 2006 10:03 AM | The part that confuses me is why is your CGI app that's running on server loading ClickOnce classes and methods. These should be loaded by client code only, not on server.
To narrow this down I think the first thing you need to do is get the .NET Framework 2.0 installed correctly on machine "C". Without this ClickOnce won't really work. The ClickOnce log comes into playafter launching .application link which is after the framework is installed. If you already have some build of the .NET Framework 2.0 installed, uninstall it and then try and install it again using Setup.exe or dotnetfx.exe package. Once the .NET Framework 2.0 is installed correctly then navigate to the .application file directly and check what happens.
Couple of questions: - Also, how are you activating the ClickOnceapp, are you using the default Publish.htm page that's generated by VS? - What is this server sideCGI app doing? How is this related to the Winforms ClickOnce app that you're trying to run on client machine?
If you continue to have failures while installing the .NET Frameworkredist I'd suggestposting the details tothe "Visual Studio Setup and Installation" forum(http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=26&SiteID=1), someone there should be able to provide more info on redist setup issues.
Regards, Sameer | | Sameer Bhangar - MSFT Friday, April 07, 2006 8:42 PM | Sameer, I won't be able to take action until Monday now, however I would predict that a manual install of the Framework on machine "C" will allow successfull ClickOnce updates. I say this based upon my experiences on the first client Machine "A" which works fine based upon a manual Framework install. I have no reason to doubt that machine "C" will accept the framework.
It is my understanding that the bootstrapper / ClickOnce should manage the Framework install on a machine if required. Have I misunderstood the capability?
To answer your questions:
I'm attempting to install the application by using the Install button of the publish.htm page. I've got a Virtual Directory on the server and set the default page for the site as publish.htm. Where I have the application installed, Machine "A", I use the start icon on the start menu. I have observed on Machine "A"that I can satisfactorily uninstall and reinstall the program through the control panel, providing I keep the Framework installed.
As far as what the server CGI app is doing I can't really say. I suspect that this is the nub of the problem because your description and query implies that there shouldn't / doesn't need to be a server side CGI app.I'd say my scenario is quite straight forwards, I have a WinForm application that I publish to the server and attempt to deploy using ClickOnce via the server's IIS.
I'll check the response with a manual framework install on machine C next week. Does the server CGI app issue suggust an alternative approach?
Thanks for your support. | | Kevin Prendergast Saturday, April 08, 2006 7:07 AM | Change your click once project property inIIS that is Execute Permissions to scripts and executables.then it will work fine.
ok.........
Bye
Kumar.N.N.V.S. | | KumarNNVS Saturday, April 08, 2006 1:58 PM | this problem came to me before and I have solved it
the problem because the client machine has no the prerequisties software as crystalreport
and u had add the crystal report in ur refrence even u haven't use
try to delete it from refrence.
i wish to have same problem to sove it :) | | Romantic_touch Saturday, April 08, 2006 3:26 PM | I'll report back Monday on findings...Cheers. | | Kevin Prendergast Saturday, April 08, 2006 9:05 PM | I have so far....
- Removed unused references from the project, republished and attempted an install to a machine without the Framework already installed. Install fails, still with the same CGI error.
- Checked the Execute Permission for the project in IIS. This was already on Scripts & Executables.
I'm now going to manually install the framework on the machine and my money says that click once will work. I'll report later.
Thanks for interest. | | Kevin Prendergast Monday, April 10, 2006 1:38 PM | Sameer, I have installed the Framework 2.0 onto machine "C" from dotnetfx.exe. Going to the publish page and clicking Install resulted in my application being installed on the machine.
It's interesting to observe the publish page actually takes into account the presence of the Framework 2.0 because there is no mention of it on a pre-requisites list, there's just the Install button.
I have then removed my application and the Framework 2.0. When I re-visit the publish page the Framework is identified as an installation pre-requisite. I click install and I get the CGI error again.
So to me it's not the instalation of the Framework, its the bootstrap / clickonce control of the instalation that's letting me down. You'll notice there's been some other suggetions posted on this thread. (Removing unused references and checking execute permission) These have had no success either.
I intend to create a new empty project (just a simple form) and deploy this by ClickOnce. This would isolate my application of the deployment environment as the cause.
Any other thoughts?
Best Regards. | | Kevin Prendergast Monday, April 10, 2006 2:08 PM | Going back to basics I've just tried a very simple project with no requirements other than the .Net Framework 2.0.
I continue to experience the CGI error from machines which do not have the Framework installed. Once framework 2.0 is in place then the ClickOnce works a dream.
Any further ideas? | | Kevin Prendergast Monday, April 10, 2006 2:24 PM | (Going on holiday for a week.) | | Kevin Prendergast Wednesday, April 12, 2006 3:19 PM | I am trying to figure this one out as well. I have tried a ClickOnce deployment on 7 machines...some inside my network (always referenced through the external IP), some outside my network. Various versions of the .NET framework installed (and one with no .NET framework installed). The one constant seems to be the lack of the .NET 2.0 framework.
If this technology is to thrive, it *must* be no more than one* extra click (hitting the install button and possibly the *subsequent security alerts) than going to a web page. Even in an intranet situation, if there are too many steps, there will be problems.
(Incidentally, the common result on the non-2.0 machines is a CGI error with no error decription. At the very least, it should say, "You must install the .NET 2.0 framework" and provide a link to it, but I thought that was the whole point of the prequisites part of ClickOnce)
If anyone has any recomendations, comments, or advice, I would appreciate it. I would *much* rather write an easily deployable WinForms app than an ASP.NET app (at least for this job).
| | TroyB Friday, April 14, 2006 1:52 AM | Come on then Microsoft, there's at least 2 of us with the same problem now. Surely that justifies a full service pack. :-)
Anybody?
| | Kevin Prendergast Thursday, April 20, 2006 9:10 AM | For what its worth, I think I've figured out my problem (which was IIS configuration)
I'm on XP pro (SP2) with IIS 5 and VS2005Pro.
Perhaps I should've paid more attention, but I had Scripts and Executables set on the web site (which I thought they said was correct, somewhere). When Iset that to, "scripts only", the client browser will download the setup.exe and run it. With that, there is obviously a bunch of "security noise" ("are you sure?", "this could be malicious?", etc), but after that it works fine. We have a "virginized" machine that we use for this sort of testing (ensuring that setups work) and it does download and install the prerequistes from the appropriate locations. The .NET 2.0 Framework got installed and then the application launched. The one thing to be sure of is that IF you are posting to IIS on your own machine (in Project Properties/Publish, your publish location is http://localhost/<SomeDir>) then you need to set the Installation URL to your external IP/Name. I had mistyped my IP address and it took me a while to figure out why .NET was getting installed but it failed tolaunch the application. It seems to me that if you don't put anything in the Installation URL, it should use whatever URL was used to launch the setup.exe.
Incidentally, I also added a ReportViewer to my app. I had to manually add it to the prerequisites, but once that was done, it installed that automatically, too.
I hope this helps.
-Troy | | TroyB Thursday, April 20, 2006 2:10 PM | I'll check this out when I'm back on Monday.
Cheers. | | Kevin Prendergast Thursday, April 20, 2006 2:15 PM | I have set Scripts Only instead of Scripts & Executables and despite the security noise the framework prequisite was installed on a Virgin machine when the user has admin rights.
If you don't have admin access then the framework install fails, and so the Click Once deployment also fails.
So it looks like Click Once can only match the deployment advantage of an ASP type solution once the first install has been performed by a priviliged user - which in my book is a major disadvantage.
I was recently able to capture senior management attention through an trial 'internet site' I set up. The click once technology will deprive me of such opportunities in the future unless everybody has the pre-requesites already installed.
Anyway, thanks for everybody's contribution.
Cheers. | | Kevin Prendergast Monday, April 24, 2006 9:02 AM |
Hi,
Just to double check, you said:
"Checked the Execute Permission for the project in IIS. This was already on Scripts & Executables."
Does this mean that you left it as "Scripts & Executables" ?
If so, then according to what TroyB posted earlier, it should be just "scripts only", so you could drop the "Executables" and see if that helps.
Cheers
| | Kevy Sunday, April 30, 2006 7:08 PM | I confirm that with Scripts Only selected the Click once installation process works fine, subject to the user getting through the 'security noise'.
...but to install the framework the user must have admin privilidges ... which is a bit of a pain ... but this is only required for the first install..
Cheers. | | Kevin Prendergast Tuesday, May 02, 2006 9:44 AM | I also just had the exact same problem, with the added wrinkle that the machine I am attempting to deploy to is a Win2K machine, of which we still have many. I am removing and reinstalling .NET 2.0 now, and I will post back results shortly.
| | Monte At Oaklawn Tuesday, September 30, 2008 3:39 PM | I don't know if it was setting the permissions in IIS or reinstalling .NET 2.0, but it worked.
| | Monte At Oaklawn Tuesday, September 30, 2008 5:21 PM |
Hi,
Just to double check, you said:
"Checked the Execute Permission for the project in IIS. This was already on Scripts & Executables."
Does this mean that you left it as "Scripts & Executables" ?
If so, then according to what TroyB posted earlier, it should be just "scripts only", so you could drop the "Executables" and see if that helps.
Cheers
I was also facing th same problem but it got resolve d onceI changed Execute Premissions to "Script Only" instead of "Script & Executeable". Thanks! for good post - Proposed As Answer byNilsonMezza Monday, August 17, 2009 7:24 PM
-
| | Pawan Shukla Friday, June 19, 2009 8:25 AM | I was also facing that same problem butI'v got it resolved bychanging Execute Premissions to "Script Only" instead of "Script & Executeable".
For some reason, that I don't know why, the server tried to processsetup.exe in the server side. It creates a folder under C:\WINNT\Temp for each attempt to install prerequisites(?!).
At the moment I changed the permission, no more errors occurs.
Thanks to everybody for the help. | | NilsonMezza Monday, August 17, 2009 7:35 PM |
|