ErrorMessage: The request failed with HTTP status 405: Method not

hi:

Why does the procedure present the mistake? 

ErrorMessage: The request failed with HTTP status 405: Method not allo

procedure Code:
procedure function:CRMAccount.CreateAndRetrieve
string strServer = "computer";
	// virtualDirectory should be set with the name of the Microsoft CRM
	// virtual directory on the platform Web server
	string virtualDirectory = "computer";
	string strDir = "http://" + strServer + "/" + virtualDirectory + "/";

	// BizUser proxy object
Microsoft.CRM.Proxy.BizUser bizUser = new Microsoft.CRM.Proxy.BizUser ();
bizUser.Credentials = System.Net.CredentialCache.DefaultCredentials;
bizUser.Url = strDir + "BizUser.srf";

// CRMAccount proxy object
Microsoft.CRM.Proxy.CRMAccount account = new Microsoft.CRM.Proxy.CRMAccount 
();
account.Credentials = System.Net.CredentialCache.DefaultCredentials;
account.Url = strDir + "CRMAccount.srf";

string strErrorMsg;
try
{
				Microsoft.CRM.Proxy.CUserAuth userAuth = bizUser.WhoAmI();

				// Set up the XML string for the account
				string strAccountXml = "<account>";
				strAccountXml += "<name>Account Number 2</name>";
				strAccountXml += "<accountnumber>A0193</accountnumber>";
				strAccountXml += "<websiteurl>www.adventure-works.com</websiteurl>";
				strAccountXml += "<ownerid type=\"" + 
Microsoft.CRM.Flags.ObjectType.otSystemUser.ToString() +"\">";
				strAccountXml += userAuth.UserId + "</ownerid>";
				strAccountXml += "</account>";

string strNewAccountXml = account.CreateAndRetrieve(userAuth, strAccountXml);
		}
catch (System.Web.Services.Protocols.SoapException err)
{
	// Process the platform error here
strErrorMsg = ("ErrorMessage: " + err.Message + " " + err.Detail.OuterXml + 
" Source: " + err.Source );
	}
catch (Exception err)
{
	// Process other errors here
	strErrorMsg = ("ErrorMessage: " + err.Message );
}

0
Utf
1/13/2005 6:31:03 AM
crm 35858 articles. 1 followers. Follow

1 Replies
593 Views

Similar Articles

[PageSpeed] 4

Do you know which statement is resulting in the error?

Matt Parks
MVP - Microsoft CRM

----------------------------------------
----------------------------------------
On Wed, 12 Jan 2005 22:31:03 -0800, cao <cao@discussions.microsoft.com> wrote:

hi:

Why does the procedure present the mistake? 

ErrorMessage: The request failed with HTTP status 405: Method not allo

procedure Code:
procedure function:CRMAccount.CreateAndRetrieve
string strServer = "computer";
	// virtualDirectory should be set with the name of the Microsoft CRM
	// virtual directory on the platform Web server
	string virtualDirectory = "computer";
	string strDir = "http://" + strServer + "/" + virtualDirectory + "/";

	// BizUser proxy object
Microsoft.CRM.Proxy.BizUser bizUser = new Microsoft.CRM.Proxy.BizUser ();
bizUser.Credentials = System.Net.CredentialCache.DefaultCredentials;
bizUser.Url = strDir + "BizUser.srf";

// CRMAccount proxy object
Microsoft.CRM.Proxy.CRMAccount account = new Microsoft.CRM.Proxy.CRMAccount 
();
account.Credentials = System.Net.CredentialCache.DefaultCredentials;
account.Url = strDir + "CRMAccount.srf";

string strErrorMsg;
try
{
				Microsoft.CRM.Proxy.CUserAuth userAuth =
bizUser.WhoAmI();

				// Set up the XML string for the account
				string strAccountXml = "<account>";
				strAccountXml += "<name>Account Number
2</name>";
				strAccountXml +=
"<accountnumber>A0193</accountnumber>";
				strAccountXml +=
"<websiteurl>www.adventure-works.com</websiteurl>";
				strAccountXml += "<ownerid type=\"" + 
Microsoft.CRM.Flags.ObjectType.otSystemUser.ToString() +"\">";
				strAccountXml += userAuth.UserId + "</ownerid>";
				strAccountXml += "</account>";

string strNewAccountXml = account.CreateAndRetrieve(userAuth, strAccountXml);
		}
catch (System.Web.Services.Protocols.SoapException err)
{
	// Process the platform error here
strErrorMsg = ("ErrorMessage: " + err.Message + " " + err.Detail.OuterXml + 
" Source: " + err.Source );
	}
catch (Exception err)
{
	// Process other errors here
	strErrorMsg = ("ErrorMessage: " + err.Message );
}

0
Matt
1/13/2005 8:12:44 PM
Reply:

Similar Artilces:

Operation Failed #13
Every time I open up my Outlook from Office 2000 (on Windows 2003 OS) it gives me the error "Operation Failed", then it shuts down. Why is this happening and how do I fix it? Dear, Try to re-create the profile -- (Please respond to this question Was this post helpful to you?) Hope this helps you more Regards APK "Shabam" wrote: > Every time I open up my Outlook from Office 2000 (on Windows 2003 OS) it > gives me the error "Operation Failed", then it shuts down. Why is this > happening and how do I fix it? > > > ...

Failed to hide column with message "cannot shift object off sheet"
Hi, I've a Excel 2000 worksheet that has 173 columns (A to FQ) with comments in a number of cells. I can't hide columns (say E:BW) with error message "cannot shift object off sheet". I searched into Microsoft Knowledgebase and found article 211769. I followed the resolution but stopped at step "3." where I can't find "Comment" of Format menu. Can anyone tell me how to resolve this problem? Thanks, Frankie What is in columns FR through IV? If nothing, columns FR:IV and Right-click on a selected columns header - select "Delete. -- HTH...

Reminders Fail on Messages Sorted to Favorite Folder -- HELP
I've got favorite folders and rules created so incoming and outgoing mail sorts itself into folders to help me keep track. However, I've found that any incoming message in one of these folders for which I set up an alert/reminder -- will fail to notify me with a reminder. Alerts set on messages in the inbox work no problem -- it's only the alert failure on messages sorted to a specific box that fail. Any help with this GREATLY appreciated! Paul <lindy_ngo_spam_corp@bellsouth.net> wrote: > I've got favorite folders and rules created so incoming and outgoing &...

ODBC failed with Perform translation for character data checked
on Win XP SP 2, while stting up ODBC connection, if failed Perform translation for character data is checked. SQL driver verison is 2000.85.1117.00 Interestingly, all other machines (XP SP2 and same sql driver version) worked fined except this particular machine. pls advice. Hi Lo The "Perform translation for character data" and "Use regional settings when outputting currency, numbers dates and times" should be unchecked. I have seen these options cause specific functionality to fail, while the rest of the application appears to work. For example, having the r...

http://support.microsoft.com/?id=318228
does anyone know if the changes described in this article require a reboot? http://support.microsoft.com/?id=318228 Thanks! I cant speak from experience, but I would guess the answer is no. But you may need to restart the Exchange services. -- Martin Blackstone MVP - Exchange http://www.swinc.com/resource/exchange.htm http://www.swinc.com/resource/e2kfaq_appxc.htm "Adam Fazio" <Adam Fazio@discussions.microsoft.com> wrote in message news:A55B9C3F-78D0-497D-BA76-A6F57C13C213@microsoft.com... > does anyone know if the changes described in this article require a reboot? ...

Method to identify printer for docmd.printout
I would like to send a report automatically via e-mail. I can do this if Iselect one of the available formats (XLS, etc) but I would like to direct itto a pseudo-printer to create a PDF file. I have found no way to have Accessidentify a printer (other than the default printer). If a module exists toidentify a specific printer as default that would be nice - I could switchto, printout, switch back. Or if there is a way to have the printout go to aPDF format that would be a very good solution.I'd like to avoid the need for the user to manually shift default printers,do the print to it, then...

New Task Requests Not Resource Leveling Properly
We are running Project Server 2007 and Project Profesional 2007 with the latest server packs. A user requests a "New Task" from their "My Tasks" PWA page. The Project Manager accepts this NewTask and it gets added to the Project Schedule. If the Project Manager then Resource Levels the schedule, that "New Task" gets moved out in time for no apparent reason. It is as if extra delay has been added without the knowledge of the Project Manager. Any clues or reasons on why this is happening? Answered same post yesterday: Is the new task linked to ...

Outlook 2000
Aloha! I unfortunately, deleted a dll file on my computer. It happend when cleaning it up after a virus attack. Outlook 2000 is not installing again correctly. While attemtig it I get the error message: Failed to register a VB Script DLL. Reinstall or run Regsvr32.exe Vbscript.dll to self register. The key "DisplayName" is either missing or has an incorrect value. [File c:\Program Files\Microsoft Office\Office\Forms\1033\CNFRES.CFG, Section Description] The article which was to solve the issue is here. http://support.microsoft.com/?kbid=271141 I already followed the steps in it;...

I clicked HTTP server what does incoming mail mean?
what do i type in incoming mail for HTTP server? "Diana" <Diana@discussions.microsoft.com> wrote in message news:2D52686D-B5D6-4C49-899F-6D3D5C2079B9@microsoft.com... > what do i type in incoming mail for HTTP server? Do you mean SMTP server? If so ask your Internet Service Provider. the server url - it only works for hotmail, msn and Exchange OWA addresses. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ ...

Error msg. "Failed to grant access to regenerated view" when adding field to schema using deployment mgr.
Hi, I'm running into a error simply creating a new field in the schema for LEADS. The error tells me to go to the event viewer, which in turn tells me the following: Failed to grant access to the regenerated view Lead after inserting new attribute CFSepassword. Is the system trying to add the field to a view in addition to the table? How can I proceed with this? Any help would be appreciated. Phillip ...

Looking for client-side method (Outlook 2007/Exchange 2007) for users to delete
Good Morning, We have Outlook 2007 clients on Exchange 2007. Client side registry has dumpster turned on for all mailbox folders. Exchange is configured with 21 days dumpster retention. This configuration is working well for us. But we also would like to give specific users, the ability to quickly and easily purge the contents of all their folder dumpsters, at their discretion. These users do this now, but it is all manual. They use the 'Recover Deleted Items' dialog and permanently delete the contents of the dumpster from there, but this is only possible on o...

Storport WMI receives NULL srb->DataPath for first request
I am adding WMI support to my storport driver and used the sample code in the DDK iSCSI driver as a foundation. My driver is simply trying to support the HBA API and does not have any unique data to provide. There is no MOF for my driver and I am simply using the GUID provided in Windows header files to describe the data that can be retrieved from my driver. The first time I executed my code I got a BSOD. After tracing through the code, I determined that the srb->DataPath was NULL and that pointer was being used inside scsiwmi.lib while processing the WMI request. I replaced ...

Debug Assertion Failed #3
I have the following code in my thread: while (true) { FData * pData = new FData(); ..... ..... ..... if (something==true) { Sleep(1000); delete pData ; continue; } } i get Debug Assertion Failed because of the delete pData. Why? Regards, Mystique Assuming pData is properly allocated, deleting should not cause the assert. You dont show the line of code where the assert is coming from. Are you using pData after it has been deleted? ----- Ajay Kalra ajaykalra@yahoo.com Mystique wrote: > i get Debug Assertion Failed because of t...

Can't send email
Using Outlook 2002. Had Outlook 2003 installed and removed. Since then, I have not been able to send or receive email. Did all the basics including creating a new pst file. When I run the "Test Account" feature, everything tests out fine except for the email address. I get the error message "...unable to send test Message. Please verify the E-mail address field." I have done so and retyped the email address several times with no success. By contrast, I entered the same information into Outlook Express and it retrieves the mail immediately. Would appreciate some he...

Failed to publish report to MS Office Word or Excel
I received this error when trying to export/convert an Access form to excel, other PCs at the same office works just fine. All PCs running Access 2003 in WIn/XP. The Error is: "Microsoft Access Cannot complete the output operation". The Visual Basic code you entered contains a syntax error or the Output procedures are not available. Make sure there isn't a syntax error in your code. If the syntax is correct, run Setup to reinstall Microsoft Office Access. If you want to preserve your security or custom settings, back up the Microsoft Office Access workgroup information file...

Anyoone seen NDR generated where the Sender name is the failed recipient?
I have a really odd problem where someone will send an email via Outlook to another local user and will get an NDR returned from the Exchange 2003 server. Message tracking shows the message was delivered but the NDR lists the senders (ie their own) name and there is no time stamp as shown below ------------------------------ The following recipient(s) could not be reached: <Sender Name> on The recipient has been deleted or has no e-mail address. ------------------------------ It's happening to a number of individuals on infrequent occassions and I cannot find reference to this ...

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' 80040e4d
Hi I get the above message when i try to add a user using the deployment manager. Does anyone have any idea how i can solve this or what causes this. Thx Under which account are you running the deployment manager? Is it the same user that installed the CRM system? Where are you running the deployment manager from? Have you changed anything in the security settings of the /mscrmservices webapplication (directory)? Rob Bakkers, Avanade Netherlands "Cypress" wrote: > Hi > > I get the above message when i try to add a user using the deployment manager. > Does anyon...

System.Net.WebException: The request failed with HTTP status 403: Forbidden
I have crm 3.0 installed on Windows server 2003 with sp1 and I have problem. When I opennnig the crm web site I see error... please help... Microsoft CRM Unhandled Error Details: Server Error in '/' Application. -------------------------------------------------------------------------- The request failed with HTTP status 403: Forbidden. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: ...

System Job Stuck Waiting
We are working on an Internet facing deployment of CRM 4.0. The routine system jobs are stuck waiting. Originally we were getting an error related to unable to connect to the public IP address of the server. After updating all of the URLs in the DeploymentProperty database to point to the public domain name that error was replaced by this one. Both have error code 80044306 (-2,147,204,346) but now we are getting an HTTP 401 error. We've tried renaming the organization's friendly name - removing spaces but still no luck. The ASYNC service is running as Network Service and we tr...

E2K3 OWA "Bad Request (Invalid Hostname)"
When I try to logon to my OWA server, doesn't matter it it's the FE or BE server, I get the account login pop-up. After I type in the 'domain\username' and 'password' I get a page that shows only "Bad Request (Invalid Hostname)". That is all that shows up in the window and I have 'Show friendly HTTP error messages' unchecked. I can't find the reason for the error or what the meaning is. Below is a little background of the environment. I have an Exchange 5.5 server that is hosting 99% of our mailboxes. OWA access is availab...

Discussion Notification Failed
When choosing to notify of replies for a post in the discusions it says "Notification failed. Please try later." This has been going on for about a week or two. Has anyone else ran into this problem? I have had the same problem for a couple of weeks myself. -- Robert "Chris - Mfg GP" wrote: > When choosing to notify of replies for a post in the discusions it says > "Notification failed. Please try later." This has been going on for about a > week or two. Has anyone else ran into this problem? I get a popup each time for the past couple of we...

Recall Message Failed
Hi, I treid to recall a sent message but failed and I keep receiving the recall failed notification. How do I stop this? Thanks MWGP ...

Having to manually change resources when requesting a meeting
Using Exchange 2003, Outlook 2003, Calendar, request a meeting: we set up each resource room as we would set up a user on exchange, so that the room is notified of the schedule. I address the email to the room and each attendee, set the time, etc. but, then I have to go onto the scheduling tab and change the room to the green icon "resource" because by default it is listed with a red icon as an "attendee" Please help me solve this dilemma. Thank you, as always, and Merry Christmas MG Invite the resource as a resource in the first place. Use the TO: button to vi...

status validation help
Hello, I need some help coding this one... I have 3 fields in a form Amount, Date, and Status. If the user inputs an Amount then they must enter a "Date" in order for the database to accept a Complete "Status". The Status field has several drop down choices, Open, Pending, Complete, etc. Any help would be greatly appriciated!! Thanks, ~Gabe On Thu, 3 Jun 2010 16:22:09 -0700, Gabe <Gabe@discussions.microsoft.com> wrote: >Hello, I need some help coding this one... > >I have 3 fields in a form Amount, Date, and Status. If the user inpu...

Meeting requests duplicating themselves in Outlook 2003
Hi guys, I've been trawling the internet to be able to sort this problem and it seems to be a glitch in Outlook, but i am wondering if by some miricale someone has managed to find a fix for it. The problem: One user out of over 200 is having this problem that when she accpets a meeting request and it is subsequently updated the update is sent to her and it creates a duplicate meeting in her caldendar without deleting the original. The user has tested this with another meeting of which 2 updates have been made inlcuding one in which the meeting changes the day of which it is on and it ha...