473,804 Members | 3,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Method not allowed

Hello I got this program and this error.
Unable to complete web request. Web Exception error: Error en el servidor
remoto: (405) Método no permitido

Its supposed to send xml messages to a biztalk assembly and then it should
drop them on a folder. but I got that error.

Questions.
1. The VirtualFolder HTTPReceiver must be integrated or anonymous
authentication in IIS Manager.
2. Should I Imporsonate on the web.config.
3. Should I give any more permissions?

private void btnsubmit_Click (object sender, System.EventArg s e)

{

string requestLocation =
"http://192.168.1.132:9 0/HTTPReceiver/BTSHTTPReceive. dll";
Status.Text = "";

XmlDocument xmlDocument = new XmlDocument();

xmlDocument.Pre serveWhitespace = true;

XmlNode tempXmlNode = xmlDocument.Cre ateNode(XmlNode Type.Element,
"Activity", "http://que.activity");

xmlDocument.App endChild(tempXm lNode);

tempXmlNode = xmlDocument.Cre ateNode(XmlNode Type.Attribute, "type", "");

tempXmlNode.Val ue = TypeList.Select edItem.Text;

xmlDocument.Doc umentElement.At tributes.Append ( (XmlAttribute)t empXmlNode);

tempXmlNode = xmlDocument.Cre ateNode(XmlNode Type.Element, "Location", "");

tempXmlNode.Inn erText = Location.Text;

xmlDocument.Doc umentElement.Ap pendChild(tempX mlNode);

tempXmlNode = xmlDocument.Cre ateNode(XmlNode Type.Element, "Timestamp" , "");

DateTime now = DateTime.Now;

tempXmlNode.Inn erText = now.ToString("s ");

xmlDocument.Doc umentElement.Ap pendChild(tempX mlNode);

tempXmlNode = xmlDocument.Cre ateNode(XmlNode Type.Element, "Notes", "");

tempXmlNode.Inn erText = Notes.Text;

xmlDocument.Doc umentElement.Ap pendChild(tempX mlNode);

try

{

HttpWebRequest request = (HttpWebRequest )
HttpWebRequest. Create(requestL ocation);

request.Method = "POST";

// request.PreAuth enticate=true;

//

request.Credent ials = new NetworkCredenti al("btservices" , "vaz.711", "se");

// CredentialCache .DefaultCredent ials;
ASCIIEncoding encoding = new ASCIIEncoding() ;

byte[] requestData = encoding.GetByt es(xmlDocument. OuterXml);

request.Content Type="applicati on/x-www-form-urlencoded";

request.Content Length = xmlDocument.Out erXml.Length;

Status.Text += "Submitting activity message";

Stream requestStream = request.GetRequ estStream();

requestStream.W rite(requestDat a,0,requestData .Length);

requestStream.F lush();

requestStream.C lose();

HttpWebResponse response;

response= (HttpWebRespons e) request.GetResp onse();
StreamReader responseData = new StreamReader( response.GetRes ponseStream());

Status.Text = System.Web.Http Utility.HtmlEnc ode( responseData.Re adToEnd()) +
"<br>";

}

catch (WebException wex)

{

Status.Text = "Unable to complete web request. Web Exception error: " +
wex.Message;

}
}
Nov 19 '05 #1
0 1283

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
13832
by: Rob | last post by:
THis is my code. What im trying to accomplish is the user fills out the form then when they hit submit it displays what the entered on the samne page but i get this error message when I hit submit Method Not Allowed The requested method POST is not allowed for the URL /rob.html. Here is the code. Any helpis greatly appreciated I cant figure this out at all i have tried so many different combinations.
1
5908
by: qwejohn | last post by:
Hello, I had posted this question in the twisted mailing list but did not got a solution ; I hope that the python Gurus of this forum can help me a bit. I am trying the exmaple in the python docs - http://twistedmatrix.com/users/warner/doc-latest/web/howto/using-twistedweb.xhtml Configuring and Using the Twisted.Web Server - Twisted Web Development.
2
11331
by: Alex Vinokur | last post by:
========================================= Windows 2000 CYGWIN_NT-5.0 1.3.22(0.78/3/2) GNU gcc version 3.2 20020927 (prerelease) ========================================= Here is some program which is compiled and works fine. ############################################
1
2310
by: | last post by:
A friend of mine has a website that is ASP. I know nothing about ASP. He switched hosting and now his "contact us" form does not work. When you hit submit it gives an error "Error 405 Method not allowed" that "post" method is not allowed? I looked at the code which is: <form action="send_email.asp" method="post" onSubmit="return checkform();"> . Its there a file or application missing with the new hosting company? Any help would be greatly...
3
1957
by: Edward Diener | last post by:
According to the CLS specification, the accessibility of the methods for adding, removing, and raising an event must be identical. There appear to be a few problems with this: 1) According to the Managed C++ specifications, if one declares a public event without any attempt to provide one's own event access methods, clearly the most common case, the compiler generates public add_ and remove_ methods for the event and a protected raise_...
2
20178
by: GlennLanier | last post by:
Hello, I've searched the forums and can't find an answer -- if it i there, kindly point me in that direction. I would like to simulate a browser POSTing a FORM and be able to pars the response. I have the following code in my Page_Load (litResponse is defined a <ASP:Literal>):
5
50744
by: rk325 | last post by:
Yes, I've seen many posts about this type of error, and none of the solutions people applied worked for me. So please read this one carefully and help me if you can. I have a web service application installed in a Windows 2000 SP4 Domain control server. It is running IIS 5.0. I can access the WS from its own web page, and, when I access it from the server where it is installed, I can run its methods. However, I cannot access this WS...
0
2930
by: John | last post by:
Hi, I am getting this error message The remote server returned an error: (405) Method Not Allowed. while trying to execute the following code: Dim myReq As HttpWebRequest = WebRequest.Create("http://127.0.0.1/virtualdirectory/")
0
1344
by: =?Utf-8?B?bGlzc2JwcA==?= | last post by:
I recently made a change to my application to secure web service communication via SSL over port 443. It appears that most of the users are not having any sort of issue with the change, however there are a few that are getting a "405 Method Not Allowed" exception. I never had any report of the method not allowed exception when communications where over port 80 via HTTP. I'm not sure where to look or what to change as the only thing...
11
1860
nomad
by: nomad | last post by:
Hello everyone: I have a question to ask you. I'm make a quiz and I get this error Method Not Allowed The requested method POST is not allowed for the URL /quiz/quizaction.phtml. -------------------------------------------------------------------------------- Apache/1.3.37 Server at continuingedventure.com Port 80
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10580
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3821
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.