Hello. I got an error on my program. the code is very simple
private void btnsubmit_Click(object sender, System.EventArgs e)
{
string requestLocation =
"http://localhost:90/HTTPSender/BTSHTTPReceive.dll";
Status.Text = "";
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.PreserveWhitespace = true;
XmlNode tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element,
"Activity", "http://que.activity");
xmlDocument.AppendChild(tempXmlNode);
tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Attribute, "type", "");
tempXmlNode.Value = TypeList.SelectedItem.Text;
xmlDocument.DocumentElement.Attributes.Append( (XmlAttribute)tempXmlNode);
tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element, "Location", "");
tempXmlNode.InnerText = Location.Text;
xmlDocument.DocumentElement.AppendChild(tempXmlNod e);
tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element, "Timestamp", "");
DateTime now = DateTime.Now;
tempXmlNode.InnerText = now.ToString("s");
xmlDocument.DocumentElement.AppendChild(tempXmlNod e);
tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element, "Notes", "");
tempXmlNode.InnerText = Notes.Text;
xmlDocument.DocumentElement.AppendChild(tempXmlNod e);
try
{
HttpWebRequest request = (HttpWebRequest)
HttpWebRequest.Create(requestLocation);
request.Method = "POST";
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] requestData = encoding.GetBytes(xmlDocument.OuterXml);
request.ContentType="application/x-www-form-urlencoded";
request.ContentLength = xmlDocument.OuterXml.Length;
Status.Text += "Submitting activity message";
Stream requestStream = request.GetRequestStream();
requestStream.Write(requestData,0,requestData.Leng th);
requestStream.Flush();
requestStream.Close();
HttpWebResponse response = (HttpWebResponse) request.GetResponse();
StreamReader responseData = new StreamReader( response.GetResponseStream());
Status.Text = System.Web.HttpUtility.HtmlEncode( responseData.ReadToEnd()) +
"<br>";
}
catch (WebException wex)
{
Status.Text = "Unable to complete web request. Web Exception error: " +
wex.Message;
}
}
Error de servidor en la aplicación '/HTTPSender'.
----------------------------------------------------------------------------
----
Error de configuración
Descripción: Error durante el procesamiento de un archivo de configuración
requerido para dar servicio a esta solicitud. Revise los detalles de error
específicos siguientes y modifique el archivo de configuración en
consecuencia.
Mensaje de error del analizador: Acceso denegado: 'HTTPSender'.
Error de código fuente:
Línea 196: <add assembly="System.EnterpriseServices, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Línea 197: <add assembly="System.Web.Mobile, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Línea 198: <add assembly="*"/>
Línea 199: </assemblies>
Línea 200: </compilation>
Archivo de origen:
c:\windows\microsoft.net\framework\v1.1.4322\Confi g\machine.config Línea:
198
Rastro al cargar el ensamblado: La información siguiente puede ser útil para
determinar porqué no se cargó el ensamblado 'HTTPSender'.
=== Pre-bind state information ===
LOG: DisplayName = HTTPSender
(Partial)
LOG: Appbase = file:///C:/Proyectos/Pruebas Capitulo 6/HTTPSender
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===
LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: HTTPSender
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/httpsender/ab22a056/75474d75/HTTPSender.DLL.
LOG: Attempting download of new URL
file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET
Files/httpsender/ab22a056/75474d75/HTTPSender/HTTPSender.DLL.
LOG: Attempting download of new URL file:///C:/Proyectos/Pruebas Capitulo
6/HTTPSender/bin/HTTPSender.DLL.
LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: HTTPSender, Version=1.0.2014.24827,
Culture=neutral, PublicKeyToken=null 1 2195
Why don't you try using the GAC tool to install it ..
See this:- http://aspzone.com/articles/152.aspx
Hope it helps
Patrick
"Luis Esteban Valencia" <le********@avansoft.com> wrote in message
news:e7**************@TK2MSFTNGP14.phx.gbl... Hello. I got an error on my program. the code is very simple
private void btnsubmit_Click(object sender, System.EventArgs e)
{
string requestLocation = "http://localhost:90/HTTPSender/BTSHTTPReceive.dll";
Status.Text = "";
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.PreserveWhitespace = true;
XmlNode tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element, "Activity", "http://que.activity");
xmlDocument.AppendChild(tempXmlNode);
tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Attribute, "type", "");
tempXmlNode.Value = TypeList.SelectedItem.Text;
xmlDocument.DocumentElement.Attributes.Append( (XmlAttribute)tempXmlNode);
tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element, "Location", "");
tempXmlNode.InnerText = Location.Text;
xmlDocument.DocumentElement.AppendChild(tempXmlNod e);
tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element, "Timestamp",
""); DateTime now = DateTime.Now;
tempXmlNode.InnerText = now.ToString("s");
xmlDocument.DocumentElement.AppendChild(tempXmlNod e);
tempXmlNode = xmlDocument.CreateNode(XmlNodeType.Element, "Notes", "");
tempXmlNode.InnerText = Notes.Text;
xmlDocument.DocumentElement.AppendChild(tempXmlNod e);
try
{
HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create(requestLocation);
request.Method = "POST";
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] requestData = encoding.GetBytes(xmlDocument.OuterXml);
request.ContentType="application/x-www-form-urlencoded";
request.ContentLength = xmlDocument.OuterXml.Length;
Status.Text += "Submitting activity message";
Stream requestStream = request.GetRequestStream();
requestStream.Write(requestData,0,requestData.Leng th);
requestStream.Flush();
requestStream.Close();
HttpWebResponse response = (HttpWebResponse) request.GetResponse();
StreamReader responseData = new StreamReader(
response.GetResponseStream()); Status.Text = System.Web.HttpUtility.HtmlEncode( responseData.ReadToEnd())
+ "<br>";
}
catch (WebException wex)
{
Status.Text = "Unable to complete web request. Web Exception error: " + wex.Message;
}
}
Error de servidor en la aplicación '/HTTPSender'. --------------------------------------------------------------------------
-- ----
Error de configuración Descripción: Error durante el procesamiento de un archivo de configuración requerido para dar servicio a esta solicitud. Revise los detalles de error específicos siguientes y modifique el archivo de configuración en consecuencia.
Mensaje de error del analizador: Acceso denegado: 'HTTPSender'.
Error de código fuente:
Línea 196: <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> Línea 197: <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> Línea 198: <add assembly="*"/> Línea 199: </assemblies> Línea 200: </compilation>
Archivo de origen: c:\windows\microsoft.net\framework\v1.1.4322\Confi g\machine.config
Línea: 198
Rastro al cargar el ensamblado: La información siguiente puede ser útil
para determinar porqué no se cargó el ensamblado 'HTTPSender'.
=== Pre-bind state information === LOG: DisplayName = HTTPSender (Partial) LOG: Appbase = file:///C:/Proyectos/Pruebas Capitulo 6/HTTPSender LOG: Initial PrivatePath = bin Calling assembly : (Unknown). ===
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Post-policy reference: HTTPSender LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/httpsender/ab22a056/75474d75/HTTPSender.DLL. LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/httpsender/ab22a056/75474d75/HTTPSender/HTTPSender.DLL. LOG: Attempting download of new URL file:///C:/Proyectos/Pruebas Capitulo 6/HTTPSender/bin/HTTPSender.DLL. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Post-policy reference: HTTPSender, Version=1.0.2014.24827, Culture=neutral, PublicKeyToken=null This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Carlos G Benevides |
last post by:
I have a ASP.Net web application that has two assemblies that run
under com+. Under Windows 2000 the two assemblies are added to com+
automatically when instantiated from the web site. For this...
|
by: Brent |
last post by:
Hi, I keep getting this error intermittently. I can compile many times, and
run fine, and then one compile/run of it, out of nowhere I get this. If I
restart the computer it fixes it, but it seems...
|
by: Richard Bysouth |
last post by:
Hi
I am running a site built on asp.net 1.1 on a windows server 2003 (which is
running asp.net 2.0 - shared hosting at my webhost). The site is low traffic
and very simple (mostly static text...
|
by: Jose-san |
last post by:
Hi,
I'm getting this error message when i try to run a asp.net application in my
development workstation:
"A first chance exception of type 'System.IO.FileLoadException' occurred in...
|
by: peter.drienovsky |
last post by:
Hello,
let me describe my problem:
ENVIRONMENT:
..Net 2.0, MSVS 2005, c#, WinXP
SYMPTOMS:
If assembly 'AgentDesktop' IS NOT in the (loading) application folder,
|
by: jambalapamba |
last post by:
hi all
i am loading a html document in my iframe which comes from the same domain, when i am trying to acess the document(html page) in the iframe using java script i am getting access...
|
by: Andy |
last post by:
Thanks Peter,
I thought I'd give an update on this problem. My application had 2
assemblies that contained classed for the Data access and business
logic layer. It was on one of them that I was...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |