|
You still haven't really explained why. Why do you want to copy the file?
And what happens if the app is installed on another system or otherwise separate from the source?
Include the file name in a config file?
Could you include the source as a resource in the app?
Or in an install package?
|
|
|
|
|
it is an utility I use only during the developing, only to copy the file containing the specific class to a specific directory. I don have to distribute it.
This is way: I don ' want to look for the class and do copy and paste of the file manually
|
|
|
|
|
Sounds like a lot of hard work for no particular benefit. You can probably do this more easily within Visual Studio during your build processing.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
If you're using the functionality of this class again and again, why not put it into a class library and reference that instead? That way you don't have to copy/paste.
|
|
|
|
|
|
we need to create a application which has a pin button on title bar.
if its clicked the application should get hide on top of the desktop as like connection bar in remote desktop application.
can some one pls tell me how to do that... mearly searched for 1 week but still could't find. connection bar example []
|
|
|
|
|
How to write dataset to mpp file
|
|
|
|
|
Hi fellows, a question from my side again! Would really need your expertise!
Is therer a way (maybe with Reflection) to get the definition of a Function?
Description:
I have a self defined Function (yeah I know dynamic, but here it's really neccessary, would take too long to explain):
dynamic func = new Func<int,int>((int i)=>{return 2*i;});
Chance to get to display the part {return 2*i;} programatically? (something like
MessageBox.Show("Function Code: {0}", functionCode);
(int i)=>{return 2*i;} would be fine as well, just if it makes any difference
Thank's in advance!
|
|
|
|
|
|
Thank you for the link, although it seems what I need to achieve cannot be done - at least not with C#. Looks like I have to save the function definition in an attribute.
D'oh
|
|
|
|
|
I want to get an exception when I am running a program on virtual machine. I use VIX API and RunProgramInGuest...
try
{
vmx.RunProgramInGuest(@"C:\Windows\system32\My
Program.exe", "", true, false, false);
}
catch {....?}
Thank you
|
|
|
|
|
I'm not sure you can just catch exception from another process just like that if MyProgram.exe isn't aware of what you want to do.
To be honest, this scenario isn't much different on catching exception from another process on other physical machine or even on the same machine.
If you have control over MyProgram.exe you can write its default error handler to notify your main application on any exception. For hints look there http://lmgtfy.com/?q=inter+process+communication[^] and especially on http://msdn.microsoft.com/en-us/library/windows/desktop/aa365574(v=vs.85).aspx[^]
Hope this helps.
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
You may want to read this[^] article. Pay particular attention to the section "Transforming Error Codes into Exceptions".
|
|
|
|
|
Hi Newbie here,
I've starting using C# a while ago and started a nice project to help my company maintiance PC profiles.
This application i'm writing connects to AD and retrieves a users email and with the push of a button changes a users profile to <username>.old so he can login agian with a fresh windows profile.
I want to protect the communication with AD and the application by puttin the password in a secure string.
And i was looking for some feedback if i have done this correctly.
The follwing code bit shows the secure string and Authenticate a bit of the Authenticate process.
Any suggestions or critisism is welcome.
Thanks in advance.
private void btnLogIn_Click(object sender, EventArgs e)
{
string PwProtect = txtPassword.Text;
char[] PasswordChars = PwProtect.ToCharArray();
SecureString Password = new SecureString();
foreach (char c in PasswordChars)
Password.AppendChar(c);
if (Authenticate(txtLogIn.Text, txtPassword.Text))
{
gbxProfiel.Show();
txtPassword.Clear();
return;
}
|
|
|
|
|
From your code snippet you are putting the password into the SecureString .
But then you are not using it any further is there any code that is missing from your example?
But according to this msdn article: SecureString[^]. You are assigning the characters to the string correctly.
Edit: Good article that I have just read on converting the secure string back to a string
http://blogs.msdn.com/b/fpintos/archive/2009/06/12/how-to-properly-convert-securestring-to-string.aspx[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Thank you for the response ,
Looked at the article you put in your reply and figured it out it works and the passwords protected.
|
|
|
|
|
Hi Experts,
I am searching for a way to edit app.config connection strings using .msi file. Since it needs to be installed by other people. I dont want others to explicitly go into file and edit the server address and db username and password.
I want to have a nice interface or an .msi file would be a very good option. Can someone guide me with a starting point on this issue.
Your help is highly appreciated.
|
|
|
|
|
Is not app.config part of application assembly? Modifying it would be modifying assembly. Would be easier to just add separate configuration file?
No more Mister Nice Guy... >: |
|
|
|
|
|
I don't think the installer is the right place for this. Instead, on startup, if you haven't got the settings you need, direct the user to the 'database settings' dialogue.
|
|
|
|
|
sathish17 wrote: Can someone guide me with a starting point on this issue
Google using the following phrase
microsoft installer custom action
|
|
|
|
|
Check this link
www.codeproject.com/Tips/446121/Adding-connection-string-during-installation
|
|
|
|
|
RESPECTED SIR/FRIENDS
I AM NEW IN C#.NET & SQL 2005, REPORT DESIGN IN CRYSTAL 10
WHEN REPORT VIEWER CHOOSE FILE RPITEMLST.RPT THEN "Load Report Failed" ERROR COME. PLEASE HELP ME.
|
|
|
|
|
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
Edit your question and fix it.
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
RESPECTED SIR/FRIENDS
I AM NEW IN C#.NET & SQL 2005 , I AM DEVELOPING WEBBASE APPLICATION , BELOW ERROR COME WHEN DATA SET ADD PLEASE HELP ME. THANKING YOU IN ADVANCE.
---------------------------
Microsoft Visual Studio
---------------------------
Failed to open a connection to the database"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"Check the connection and try again.
---------------------------
OK Help
---------------------------
---------------------------
Microsoft Visual Studio
---------------------------
This server version is not supported. You must have Microsoft SQL Server 2005 or later.
---------------------------
OK
---------------------------
|
|
|
|
|
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.
Edit your question and fix it.
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|