Click here to Skip to main content
15,922,419 members
Home / Discussions / C#
   

C#

 
AnswerRe: Parsing each file in directory Pin
Jimmanuel14-Jun-07 3:58
Jimmanuel14-Jun-07 3:58 
AnswerRe: Parsing each file in directory Pin
Rick van Woudenberg14-Jun-07 8:36
Rick van Woudenberg14-Jun-07 8:36 
QuestionFarm Database Pin
sajid.salim.khan14-Jun-07 3:37
sajid.salim.khan14-Jun-07 3:37 
JokeRe: Farm Database Pin
Not Active14-Jun-07 4:00
mentorNot Active14-Jun-07 4:00 
GeneralRe: Farm Database Pin
originSH14-Jun-07 4:03
originSH14-Jun-07 4:03 
GeneralRe: Farm Database Pin
DavidNohejl14-Jun-07 4:50
DavidNohejl14-Jun-07 4:50 
JokeRe: Farm Database Pin
Guffa14-Jun-07 7:57
Guffa14-Jun-07 7:57 
GeneralRe: Farm Database Pin
Paul Conrad14-Jun-07 10:33
professionalPaul Conrad14-Jun-07 10:33 
GeneralRe: Farm Database Pin
Dave Kreskowiak14-Jun-07 7:14
mveDave Kreskowiak14-Jun-07 7:14 
GeneralRe: Farm Database Pin
Not Active14-Jun-07 8:55
mentorNot Active14-Jun-07 8:55 
GeneralRe: Farm Database Pin
Dave Kreskowiak14-Jun-07 9:46
mveDave Kreskowiak14-Jun-07 9:46 
GeneralRe: Farm Database Pin
Paul Conrad14-Jun-07 10:33
professionalPaul Conrad14-Jun-07 10:33 
GeneralRe: Farm Database Pin
Dave Kreskowiak14-Jun-07 16:29
mveDave Kreskowiak14-Jun-07 16:29 
GeneralRe: Farm Database Pin
Paul Conrad14-Jun-07 17:26
professionalPaul Conrad14-Jun-07 17:26 
AnswerRe: Farm Database Pin
Russell Jones14-Jun-07 5:28
Russell Jones14-Jun-07 5:28 
Generalpasswords Pin
V.14-Jun-07 3:25
professionalV.14-Jun-07 3:25 
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 

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.