Error on WebRequest GetResponse

Error on WebRequest GetResponse

am 10.08.2007 20:02:49 von Avanti

Hi,

I am doing a GetResponse on a WebRequest on a remote machine.

The code looks like:

req = WebRequest.Create(uri);
req.Method = "POST"; // Post method
req.ContentType = "text/xml"; // content type
req.Credentials = CredentialCache.DefaultCredentials;
StreamWriter writer = new
StreamWriter(req.GetRequestStream());

// Write the xml text into the stream
writer.WriteLine(stringret);
writer.Close();

// Send the data to the webserver with the provided
uri
rsp = req.GetResponse();

The Event Viewer is showing an error:

"The description for Event ID ( 1 ) in Source ( Application ) cannot
be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following
information is part of the event: /documents/10/."

Any ideas?

Thanks!

Re: Error on WebRequest GetResponse

am 10.08.2007 22:41:03 von Kristofer Gafvert

Your error message tells you that the computer you are reading the event
log on does not have the necessary messages to be displayed. Have you
tried to view the event log on the other computer? Or is your code writing
to the event log and it is not working properly?

What is "documents/10/"? A folder used for what? It may help in
troubleshooting.

Unfortunately, at this moment, we know nothing about the problem, hence it
is difficult to help. I do however not think the problem is with IIS, but
more of a problem related to your code, hence i think a more proper
newsgroup is a newsgroup related to the code technology you are using.


--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info


avanti wrote:

>Hi,
>
>I am doing a GetResponse on a WebRequest on a remote machine.
>
>The code looks like:
>
> req = WebRequest.Create(uri);
> req.Method = "POST"; // Post method
> req.ContentType = "text/xml"; // content type
> req.Credentials = CredentialCache.DefaultCredentials;
> StreamWriter writer = new
>StreamWriter(req.GetRequestStream());
>
> // Write the xml text into the stream
> writer.WriteLine(stringret);
> writer.Close();
>
> // Send the data to the webserver with the provided
>uri
> rsp = req.GetResponse();
>
>The Event Viewer is showing an error:
>
>"The description for Event ID ( 1 ) in Source ( Application ) cannot
>be found. The local computer may not have the necessary registry
>information or message DLL files to display messages from a remote
>computer. You may be able to use the /AUXSOURCE= flag to retrieve this
>description; see Help and Support for details. The following
>information is part of the event: /documents/10/."
>
>Any ideas?
>
>Thanks!