|
I don't know on which forum i should post this, so i hope this is the right one since it has to do with windows forms projects..
The problem is the following, i have 2 simple projects (both windows application projects). Both the projects contain 1 form. In one of those forms i placed a button, if you press the button the form of the other project will open. (This is not my actual project, but a simplified version to recreate my problem)
Now i wish to publish my first project (the one with the form with the button), but visual studio keeps generating the following errors
A signing key is required in order to publish this project. Publishing from Visual Studio 2005 will automatically configure a signing key for this project.
and
Cannot publish because a project failed to build.
however, both projects build and run fine when debugging.
if i go to the properties, to the signing tab, and check "Sign the ClickOnce manifests", the same error keeps occuring.
Does anyone have any ideas how to solve this?
|
|
|
|
|
For signing, go to project Properties, Signing tab, and:
1. check Sign the assembly
2. select New for "Choose a strong name key file"
3. fill in the name of the key and psw
Calin
|
|
|
|
|
thanks for the quick reply.
But signing the assembly (for both projects) doesn't seem to solve the problem. the same error occures.
I tried adding test certificates to both projects, now i get an error that the manifest file can not be found...
ps: i'm using visual studio 2005
|
|
|
|
|
I have developed a windows application in C#.net that is running in the background like an antivirus.
But the problem is whenever i try to switch off my computer or try to restart my computer, the computer doesn't turns off/restarts.
And when i individually kills that windows(.exe) application listed out in Processes tab in Windows Task Manager and then tries to switch off the computer or restart it, Everything seems to be fine. How could i enhance or optimize my code so that whenever computer is turned off or is restarted, my application process should be killed automatically. Is there any class in .Net that could possibly find out , when computer is switched off or is restarted, so that i could kill down my application process at that time.
Anyone who could help me out in fixing the bug.
Thanks in Advance!!
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
When Windows wants to shut down it attempts to close all running applications cooperatively and your app must have refused that close request.
Have you coded a FormClosing event handler to stop the application closing?
e.g.
private void Form1_FormClosing(object sender, FormClosingEventArgs e) {
e.Cancel = true;
}
The good news is that you can fix it.
Take a look at the FormClosingEventArgs.CloseReason Property and code something like this.
private void Form1_FormClosing(object sender, FormClosingEventArgs e) {
if (e.CloseReason == CloseReason.WindowsShutDown) {
e.Cancel = false;
} else {
e.Cancel = true;
}
}
Alan.
modified on Thursday, February 12, 2009 11:17 AM
|
|
|
|
|
You are right Alan.
I have coded the same way as u have mentioned, to keep my apps running in the background.
Now i will change the code to your mentioned code.
Thanks for the solution.
Anyways is there any method where i can start my application and put the notification icon in system tray silently in the background, whenever computer is switched on or is restarted. It is similar to Gtalk or anti- virus starting their application whenever computer is turned on or is restarted.
And also Alan, i want my application to behave like system process, so that
no one could possibly kill that process from windows task manager processes list, except when computer is switched off. I have seen that you can cannot kill anti-virus processes from windows task manager.
How do one convert their application into system processes ensuring that the application could not be killed by administrator of computer(except when comp is switched off).
Looking for a solution to this Alan!
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
Vishnu Nath wrote: I have seen that you can cannot kill anti-virus processes from windows task manager.
You mean that you don't know how to kill that antivirus proces - that doesn't mean that it's not possible. I'm killing the Norton-scanner prior to each build, since Visual Studio requires the resources.
Vishnu Nath wrote: could not be killed by administrator of computer
I'd consider that a ransom-situation. The administrator owns the damn machine, and should have some control over what it does. Such programs are "malware" and Norton (or Avast, or MacAfee if they still exist) will try to remove it.
There's a huge difference in limiting the enduser and in limiting the administrator. Be carefull not to mix up both user-types
I are troll
|
|
|
|
|
You are right.
Thanks for your valuable advice and an important guidance to my project.
Thanks a Lot!!
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
Hi,
I think here you can run a small windows service related to your application, but am not sure about it.
or can try IPC concept.
regards,
ashok
|
|
|
|
|
Alan has given out me correct solution to my problem.
And now i dont face any problem in shutting down my PC after rectifying my code.
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
hi i am using a window form on vs 2005 with c#
i programically add in the items thru listbox.items.add()
however i am trying to add a values(which is hidden from the user)
as listbox.items.add("text") only add the text in but i cant seem to add a value in
anyone know how?
modified on Thursday, February 12, 2009 7:37 AM
|
|
|
|
|
neodeaths wrote: however i am trying to add values to it as well *e.g hidden values)
Can you edit this sentence to explain your requirement a little better. It's the "as well *e.g hidden values)" that has me baffled.
Alan
|
|
|
|
|
|
A bit but I'm still not sure I'm there completely. Do you want to add an item to the list box but not have it displayed, i.e. have an invisible item.
I must have misunderstood as that doesn't make a lot of sense to me.
Perhaps you mean that you have added some items to the list box but they are not being displayed. Is that it?
Alan.
|
|
|
|
|
iam trying to hide a value from the user but still show certain infomation thats y iam doing the items adding programmically
|
|
|
|
|
The ListBox is an user interface element and it's function is to display items. You can't selectively hide certain items.
What you can do is store all your items in a list and then only add the items that you want the user to see to the ListBox.
Alan.
|
|
|
|
|
I'm quite happy to assist you with programming but I don't want to have spend time interpreting your text speak such as "y iam".
So please make it easy for people to help you!
Alan.
|
|
|
|
|
|
How to get/store all VSS(Visual Source Safe) user names inside the windows DataGridView control or inside a physical table in database ?
Please reply.
Thanks
Raj Ram
raj
|
|
|
|
|
Hi there,
Try by referencing Microsoft.VisualStudio.SourceSafe.Interop.dll
You may use IVSSDatabase class which has Users property.
Calin
|
|
|
|
|
I have developed a windows Application/Tool in C#.Net which is about to be released as a Beta version.
I need to add an Auto Update Feature to my Tool similar to FireFox Software Update.
This Feature should be able to notify End User about the new Version's availability and allow them to Update their Tool.However while updating the Tool, it should only update the required Files(.dll or .exe).The Tool always runs in the background, so without impacting the current process it should update the Tool. I have looked out for many solution but they simply don't meet my requirements.
It would be helpfull, if any one of you come out with the solution.
Thanks in Advance!
Aspiring Techie,
Vishnu Nath
|
|
|
|
|
|
Hi Guys,
Sorry if I am posting this in the wrong Forum. I have an web app that makes use of the ReportViewer control. In this control I am calling a Remote SQL 2005 Report. This app works fine if I run in from IIS. I can export without any issues.
We added this app into a Portal which is a Windows App and uses the Web Browser Control to display aspx pages. The page and the report displays just fine, but when I try to export the report using the Export link on the ReportViewer toolbar I get the following Error Message:
ASP.NET session has expired. Can anyone please give me guidance as to what I must do to be able to get this report exportable.
Your help is greatly appreciated.
Elizma
|
|
|
|
|
Try the ASP.NET forum, you will get better responses.
|
|
|
|
|
I have a grid with date data displaying as YY/MM/DD inside it with update functionality.
I want to check that user cant enter date with any other format.
|
|
|
|