Click here to Skip to main content
15,905,781 members
Home / Discussions / C#
   

C#

 
GeneralRe: passwords Pin
Not Active14-Jun-07 3:56
mentorNot Active14-Jun-07 3:56 
GeneralRe: passwords Pin
V.14-Jun-07 4:16
professionalV.14-Jun-07 4:16 
GeneralRe: passwords Pin
V.14-Jun-07 4:16
professionalV.14-Jun-07 4:16 
GeneralRe: passwords Pin
Dave Kreskowiak14-Jun-07 7:12
mveDave Kreskowiak14-Jun-07 7:12 
GeneralRe: passwords Pin
V.14-Jun-07 20:28
professionalV.14-Jun-07 20:28 
Questionadd button to form next maximise minimize buttons Pin
hamid_m14-Jun-07 3:11
hamid_m14-Jun-07 3:11 
AnswerRe: add button to form next maximise minimize buttons Pin
Tarakeshwar Reddy14-Jun-07 3:35
professionalTarakeshwar Reddy14-Jun-07 3:35 
QuestionProblem while Writing to Remote Location in a .netThread Pin
VishalSharmaDev14-Jun-07 3:02
VishalSharmaDev14-Jun-07 3:02 
hi
i am having problem when i am trying to write something on remote location using .net thread.
e.g. i have a central location letsay MachineName|MachineIP/SharedDrive.
and i am creating a thread on click of a button which i need to write some information on that location.

i have also added a node <identity impersonate="true" username="Domain\User" password="*******"> in web.config of my application.

and i have also given credential in <machine.config>--<processmodel enable="true" username="SameInWeb.Config" password="SameInWeb.Config">

but it is giving the following exception:
The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.

below is my method which i am calling on a separate thread.
private void WriteSomeThingToRemoteLocation ()

{
FileStream fileStream = null;
BinaryFormatter binaryFormatter = null;
System.Object systemObject = null;
System.Object obj = new object();
lock ( obj )
{
string _contractLocaterKey = Guid.NewGuid().ToString().Replace( "-", "" );

string fullPath = @"\\MyMachineIP\SharedDrive" + "\\" + _contractLocaterKey + ".dat";
try
{
fileStream = new FileStream( fullPath, FileMode.CreateNew, FileAccess.Write );
binaryFormatter = new BinaryFormatter();

systemObject = new object();
systemObject = "Hello this is testing1";
binaryFormatter.Serialize( fileStream, systemObject );

systemObject = new object();
systemObject = "Hello this is testing2";
binaryFormatter.Serialize( fileStream, systemObject );
}
// catch(Exception ex)
// {
// avoided for getting noticed what happened;
// }
finally
{
if ( fileStream != null )
{
fileStream.Close();
fileStream = null;
}
binaryFormatter = null;
systemObject = null;
}
}
}

please help in this matter as i am stucking in the problem from more than 3 days.

this thing is happening OK :
1. if i call this method directly on another method.
2. if i call this method in a console application .
3. if i call this method on a thread in a console application.

any help would be highly appreciated.

thanks

vishal sharma


Thanks & Regards

Vishal Sharma
vishalsharma556@yahoo.co.in

QuestionWorking with Excel Pin
A M SOMAN14-Jun-07 2:47
A M SOMAN14-Jun-07 2:47 
AnswerRe: Working with Excel Pin
JoeSharp14-Jun-07 2:55
JoeSharp14-Jun-07 2:55 
GeneralRe: Working with Excel Pin
A M SOMAN14-Jun-07 3:10
A M SOMAN14-Jun-07 3:10 
QuestionDatabinding in FormView Pin
souravmoy sau14-Jun-07 2:30
souravmoy sau14-Jun-07 2:30 
AnswerRe: Databinding in FormView Pin
Deepayan Nandi23-Oct-09 10:36
Deepayan Nandi23-Oct-09 10:36 
QuestionCopy a directory somewhere Pin
Russell'14-Jun-07 1:46
Russell'14-Jun-07 1:46 
AnswerRe: Copy a directory somewhere Pin
Manas Bhardwaj14-Jun-07 1:48
professionalManas Bhardwaj14-Jun-07 1:48 
GeneralRe: Copy a directory somewhere Pin
Russell'14-Jun-07 1:52
Russell'14-Jun-07 1:52 
GeneralRe: Copy a directory somewhere Pin
Giorgi Dalakishvili14-Jun-07 1:55
mentorGiorgi Dalakishvili14-Jun-07 1:55 
GeneralRe: Copy a directory somewhere Pin
Russell'14-Jun-07 2:04
Russell'14-Jun-07 2:04 
GeneralRe: Copy a directory somewhere Pin
Giorgi Dalakishvili14-Jun-07 2:12
mentorGiorgi Dalakishvili14-Jun-07 2:12 
GeneralRe: Copy a directory somewhere Pin
Manas Bhardwaj14-Jun-07 1:59
professionalManas Bhardwaj14-Jun-07 1:59 
AnswerRe: Copy a directory somewhere Pin
Shy Agam14-Jun-07 2:13
Shy Agam14-Jun-07 2:13 
AnswerRe: Copy a directory somewhere Pin
Martin#14-Jun-07 2:25
Martin#14-Jun-07 2:25 
AnswerRe: Copy a directory somewhere Pin
David Knechtges14-Jun-07 2:34
David Knechtges14-Jun-07 2:34 
Questionconvert cyrillic from console app to Unicode C# Pin
drweb8614-Jun-07 1:16
drweb8614-Jun-07 1:16 
QuestionHow to compare two Times [modified] Pin
VenkataRamana.Gali14-Jun-07 1:08
VenkataRamana.Gali14-Jun-07 1:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.