|
I have installed an application using clickonce.
The user is running the application on wini xp pro machine.
Not sure why the user sometimes gets the following message when trying to open the application.
In case it makes any difference, the application is written in .net 2.0
Any thoughts please?
Here is the error message:
Cannot Start Application
Cannot continue. The application is improperly formatted.
Contact the application vendor for assistance.
OK Details…
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:///C:/Documents%20and%20Settings/engelber/Start%20Menu/Programs/xyz%20Europe/PricingAnalytics.appref-ms
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Documents and Settings\engelber\Start Menu\Programs\xyz Europe\PricingAnalytics.appref-ms resulted in exception. Following failure messages were detected:
+ Exception reading manifest from http://ldn03a01/PricingAnalytics/PricingAnalytics.application: the manifest may not be valid or the file could not be opened.
+ The 'link' start tag on line 20 does not match the end tag of 'head'. Line 222, position 3.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [10/12/2007 07:05:54] : Activation of C:\Documents and Settings\engelber\Start Menu\Programs\xyz Europe\PricingAnalytics.appref-ms has started.
* [10/12/2007 07:05:54] : Performing necessary update check as specified by the deployment.
ERROR DETAILS
Following errors were detected during this operation.
* [10/12/2007 07:05:54] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from http://ldn03a01/PricingAnalytics/PricingAnalytics.application: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifest(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState subState)
at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, TempFile& deployFile)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Xml.XmlException
- The 'link' start tag on line 20 does not match the end tag of 'head'. Line 222, position 3.
- Source: System.Xml
- Stack trace:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlTextReaderImpl.Skip()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XmlCharCheckingReader.Read()
at System.Xml.XsdValidatingReader.Read()
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
|
|
|
|
|
either *.application (e.g. Shell.application) or *.exe.manifest (e.g. Shell.exe.manifest) is invalid. So, try to fix those files by using megaui tool or republish your application.
|
|
|
|
|
Hi,
How do I create the aspx page on the fly? is there any better solution.
|
|
|
|
|
1 - ask in the ASP.NET forum
2 - why do you want to, and what do you mean by 'on the fly' ? ASP.NET allows you to use things like literal controls to generate any HTML you like. You can also create controls themselves on the fly, but if you do, you'll have to work hard to get events from them.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Use file manipulation function to create a file and write contents into that following ASP.NET syntax. This newly created page won't have a code-behind file. You need to write server side scripts in ASPX page itself. But this method is tough for doing changes to the page.
|
|
|
|
|
What am I doing wrong in this snippet of code? I can't seem to figure out how to make this work:
using System;
public class DebugFive2
{
public static void Main()
{
const string pass1 = home;
const string pass2 = house;
const string pass3 = mouse;
string password;
Console.Write("Please enter your password ");
password = Console.ReadLine();
while(password != pass1 || password != pass2 || password != pass3)
Console.WriteLine("Invalid password. Please enter again. ");
password = Console.ReadLine();
Console.WriteLine("Valid password");
}
}
Any help would be greatly appreciated
|
|
|
|
|
First: you should get an compiler error with the consts - use const string pass1 = "home"; for example
Second: in your while-loop you are just using the Writeline (no block) - use this:
<br />
{<br />
Consoloe.WriteLine(....<br />
password = ....<br />
}<br />
Then your problem is with the ORs (||):
You iterate the while-loop as long the password is not pass1 OR not pass2 OR not pass3 and as pass1 != pass2 != pass3 you will satisfy this contition no matter what the input is - so just use && instead of || (substituting OR with AND) and it will work.
|
|
|
|
|
Thanks CKnig, that definitely cleared things up for me. I appreciate your help!
|
|
|
|
|
Hello everyone,
I have a WebBrowser Control in Windows Application. As the user Navigate using the Web Browser Control if the site tries to open a new Window using script I get the following error.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I also tried the code given here http://www.codeproject.com/KB/cpp/ExtendedWebBrowser.aspx[^] and same error was given.
I am using Visual Studio C# 2008.
Can anyone tell me what is going on and how I can sort this out?
Thank you very much for your help and have a great day.
Khoramdin
modified on Sunday, December 09, 2007 11:07:25 PM
|
|
|
|
|
What does the debugger say. If an error is reproducable in this way you can be lucky.
The reasons are many: Overwritten memory, buffer overrun, unlocked pointer, pointer to a pined managed object were the pn is freed, but the pointer is still in use...
Repro the error in the debugger and watch the call stack.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Vri SSK wrote: What does the debugger say. If an error is reproducable in this way you can be lucky.
The reasons are many: Overwritten memory, buffer overrun, unlocked pointer, pointer to a pined managed object were the pn is freed, but the pointer is still in use...
Repro the error in the debugger and watch the call stack.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=148108&SiteID=1[^]
|
|
|
|
|
|
Did it occur to you to just remove the line and see what happened ? Either way, this is better written as f.WriteLine("*"); instead of two statements. That should also make clear what's going on.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi there,
I’m working on smart client application and i use WCF as main communication service.
Most of the times I use single Dataset to transmit data from the client to server (service) and vice-versa.
My dataset would contain only one table with single record (as i have normalised pulling large data in single dataset).This record had a column which stored actual file date (byte array). This is working fine for < 1MB data.
Never before I have come across transmitting large data via WCF (large data-size being approximately more than 2MB and defiantly less than 10MB). And this is something i need to implement but i have very little idea.
I have started looking on net for solution but none of them seems to be working for me.
Well i have done the following
client side
Binding being
<system.servicemodel>
<bindings>
<wshttpbinding>
<binding name="WSHttpBinding_IAttachmentService" closetimeout="00:10:00">
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="500000" maxReceivedMessageSize="1000000"
messageEncoding="Mtom" useDefaultWebProxy="true" allowCookies="false">
<readerquotas maxdepth="32" maxstringcontentlength="8192">
maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliablesession ordered="true" inactivitytimeout="00:10:00" enabled="false" />
<security mode="Message">
<transport clientcredentialtype="Windows" proxycredentialtype="None" realm="" />
<message clientcredentialtype="Windows" negotiateservicecredential="true">
algorithmSuite="Default" establishSecurityContext="true" />
</message></security>
</readerquotas></binding>
</wshttpbinding>
</bindings>
</system.servicemodel>
server side
Binding being
<binding name="Binding_IAttachmentService" closetimeout="00:10:00">
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="500000" maxReceivedMessageSize="65536"
messageEncoding="Mtom" useDefaultWebProxy="true" allowCookies="false">
<readerquotas maxdepth="32" maxstringcontentlength="8192" maxarraylength="16384">
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliablesession ordered="true" inactivitytimeout="00:10:00">
enabled="false" />
<security mode="Message">
<transport clientcredentialtype="Windows" proxycredentialtype="None">
realm="" />
<message clientcredentialtype="Windows" negotiateservicecredential="true">
algorithmSuite="Default" establishSecurityContext="true" />
</message></transport></security>
</reliablesession></readerquotas></binding>
please let me know if there is something I’m missing to change on dataset or on my service proxy level or on service itself. I was thinking dataset by default is serializable and so i need not wrap it to WCF DataContract. if thats not the case then is there an alternative solution to my problem.
It would be very helpful if someone throw some light on me.
regds,
pavan
|
|
|
|
|
My experience is that you have to set maxReceivedMessageSize and maxArrayLength to be at least your maximum buffer size. If these are smaller than the actual send length the connection gets reset (I don't have the exact error message handy). I only specify these on the client side, but I don't think having them on the server side will hurt anything.
Using native data types (e.g. byte[]) vs. wrapping in a DataContract shouldn't make any difference.
I hope that helps.
Bob
|
|
|
|
|
i get two errors 'ProtocolException' and 'The remote server returned an error: (415) Unsupported Media Type'
|
|
|
|
|
Dear All
We have been struggling to set expiry date to power point files with following code. Though there is no syntactical error in it, it fails to set expiry date for given file.
<br />
Microsoft.Office.Interop.PowerPoint.Presentation presentation;<br />
<br />
Microsoft.Office.Interop.PowerPoint.ApplicationClass oPPT = new Microsoft.Office.Interop.PowerPoint.ApplicationClass();<br />
<br />
presentation = oPPT.Presentations.Open(pptFileName.ToString(), Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse);<br />
<br />
presentation.Application.Activate();<br />
<br />
presentation.Permission.Enabled = true;<br />
<br />
presentation.Permission.Add("real_alias@real_site.com", MsoPermission.msoPermissionRead, dtExpireDate);<br />
<br />
presentation.Close();<br />
<br />
presentation = null;<br />
<br />
oPPT = null;<br />
We have done similar thing with excel and word files successfully and still are clueless for doing the same to Infopath file.
Please guide
Regards
Sachin
modified on Sunday, December 09, 2007 9:00:07 PM
|
|
|
|
|
I've tried looking into this. Have you figured out what is going on?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
I'm using a webbrowser control and have set it to navigate to a given page, eg codeproject.com. Once it has loaded the page, how can i access the images that were downloaded on that page?
|
|
|
|
|
They are stored in the temporary files, but there's no real way for you to work out which file is what image. If you're examining the HTML anyhow, you'd find it easier to just download them again in your code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am currently doing that, by extracting the url from the src of the image combined with the page url, but as i am on dialup and they are large images, it seems pointless to download it twice.
In the cache (C:\Documents and Settings\[User]\Temporary Internet Files), there are columns with the headings Name, Internet Address, Type, and Last Accessed.
Is there anyway i can go through the list of files, and search for one with the correct Internet Address property, then import this into my project to display?
eg:
<br />
Dir directory = "C:\Documents and Settings\[User]\Temporary Internet Files";<br />
foreach(File f in directory)<br />
{<br />
if(f.Internet Address == imgAddr)<br />
{<br />
LoadIntoApp(f);<br />
}<br />
}<br />
|
|
|
|
|
The File class has no concept of these things, as you have probably found. If you can access them at all, it would be via some sort of shell/pinvoke operation. Even then, if there's more than one image in a page ( and there always is ), how will you know which is which ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I think i have found a way to do it. Had a look at the code i would need to use to access the cache and it looked way too nasty.
So i constructed a simple function which searches recursively through all the directories in the cache, including the hidden ones, looking for files with the same name as the image i just downloaded in the webbrowser. It then takes the one with the most recent creation date and gives me the full path to it.
A simple and inelegant hack, but it works =).
Posted below if it can help anyone.
<br />
private void SearchCache(string filename) <br />
{<br />
string filetype = filename.Substring(filename.LastIndexOf('.')+1).ToLower();<br />
filename = filename.Substring(0, (filename.LastIndexOf('.')));<br />
<br />
DateTime nowDT = DateTime.Now;<br />
DateTime latestFileDT = new DateTime();<br />
string filePath = "";<br />
<br />
string cachePath = @"C:\Documents and Settings\[UserName]\Temporary Internet Files\Content.IE5";<br />
<br />
DirectoryInfo cacheDir = new DirectoryInfo(cachePath);<br />
<br />
string regexPattern = "^"+filename+@"\[?(\d+)*\]?."+filetype+"$";<br />
Regex r = new Regex(regexPattern, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled);<br />
<br />
foreach (DirectoryInfo d in cacheDir.GetDirectories())<br />
{<br />
foreach(FileInfo f in d.GetFiles())<br />
{<br />
if (r.IsMatch(f.Name))<br />
{<br />
if (f.CreationTime > latestFileDT)<br />
{<br />
latestFileDT = f.CreationTime;<br />
filePath = f.FullName;<br />
}<br />
}<br />
}<br />
}<br />
}<br />
|
|
|
|
|
Hello everyone,
I am trying to learn the basics of databases but i found myself deep in an hole now:
System.InvalidCastException was unhandled
Message="Specified cast is not valid."
Source="System.Data"
StackTrace:
at System.Data.SqlClient.SqlBuffer.get_Int32()
at System.Data.SqlClient.SqlDataReader.GetInt32(Int32 i)
at Winner.Database.votos() in I:\Documents\Server\Winner\Winner\Database.cs:line 48
at Winner.Form1.Form1_Load(Object sender, EventArgs e) in I:\Documents\Server\Winner\Winner\Form1.cs:line 21
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Winner.Program.Main() in I:\Documents\Server\Winner\Winner\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
That is the exception i am getting trying to show all the data from a table in sql.
This is how i am doing it:
SqlCon = new SqlConnection(ConnString);
SqlCmd = new SqlCommand();
SqlCmd.CommandText = "Select * From party";
SqlCmd.Connection = SqlCon;
SqlCon.Open();
dataReader = SqlCmd.ExecuteReader();
int i = 0;
int temp = 0;
while ((dataReader != null) && dataReader.Read())
{
temp = dataReader.GetInt32(1);
Votos[i] = temp;
i++;
}
What am i doing wrong???
Thanks all in advance!
Luis E Tineo S
|
|
|
|
|
Do you realise that 1 is the second column ? Have you tried using the debugger to work out what the data type in that column is ? It's always better to specify the column names you want, then you'd also know their order for sure, and you'd know what the second column was.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|