The request failed with HTTP status 401: Unauthorized.


I want to test the CrmIncident.Retrieve method ,but i get this message

The request failed with HTTP status 401: Unauthorized.

bool result =  false ;
			// strServer should be set with the name of the platform Web server
			string strServer = "success";
			// virtualDirectory should be set with the name of the Microsoft CRM
			// virtual directory on the platform Web server
			string virtualDirectory = "mscrmservices";
			string strDir = "http://" + strServer + "/" + virtualDirectory +
			// BizUser proxy object
			Microsoft.Crm.Platform.Proxy.BizUser bizUser = new
Microsoft.Crm.Platform.Proxy.BizUser ();
			System.Net.ICredentials credentials = new

			bizUser.Credentials = credentials ;
			bizUser.Url = strDir + "BizUser.srf";
			// CRMIncident proxy object
			Microsoft.Crm.Platform.Proxy.CRMIncident  incident = new
			incident.Credentials =
			incident.Url = strDir + "CRMIncident.srf";
			string strErrorMsg = "";
			string strIncidentId = oId;
				Microsoft.Crm.Platform.Proxy.CUserAuth userAuth = bizUser.WhoAmI();

				// Set up the columns that you want to retrieve
				// Set up the columns that you want to retrieve
				string strColumnSetXml = "<columnset>";
				strColumnSetXml += "<column>incidentid</column>";
				// Put the incidents in order by contract
				strColumnSetXml += "<ascend>contractid</ascend>";
				// Filter the incidents
				strColumnSetXml += "<filter column='title' operator='like'
value='incident1,incident1)*' />";
				strColumnSetXml += "</columnset>";

				// Now retrieve the incidents
				strErrorMsg = incident.Retrieve(userAuth, strIncidentId,
			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 );

the message in subject line is the exception errormessage,what am I
doing wrong,the crm server is on a domain controller ,i have put my
machine on the domain where my project is an project

is something wrong in code,web.config,or settings on server....??

Please Help,



9/22/2005 3:38:27 PM
crm 35858 articles. 1 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 7


Similar Artilces:

http accounts won't work
They used to work on my other system till HD went. Installed everything new and two or more hotmail accounts won't work. it times out or "A connection to the server could not be established. is now in offline mode" if you go to file to connect to the hotmail account then it times out. I have set this up with windows xp service pack 1 and 2. any help would be appreciated. ...

Request for help with VBScript...
Hi Forum, I have tried to write a VBScript (to be called using "cscript z:\folder\script.vbs") as a tool/utility to time email delivery. Basically it sends two emails, one to an email gateways providers echo service, and another to itself. The scripts purpose is to record delivery delay timings, as part of an excercise to determine and record quality of performance and service. Its pretty simple at the moment, and I would like to make it more detailed, and I would like to get it to run as a scheduled task either on a workstation or on a server. I have several problems wit...

Request.form stops working after clicking on page with Integrated
Hello, I am using asp on a Windows 2003 server, with IIS 6.0, for a large organization. I need to collect user names for some pages on the website (which are restricted to a certain number of users), and am using request.servervariables(LOGON_USER) to get those names. To do this, I have turned off "enable anonymous access" and turned on Integrated Windows authentication for a gateway page (i.e. just for one page in the whole website). I can't use Integrated Windows authentication for the whole site because then some important users who are outside the fore...

Attempt to execute COM object failed. Help!
Working on my first customization for RMS, so hopefully I'm not asking completely stupid questions... I've searched here for a point in the right direction but didn't find anything that helped. I'm sure it's something trivial. We have a developer engaged to do a number of things, so this is more for my own knowledge of how this works and what capabilities we have. Anyways, here goes: RMS v2.0, all patches applied. VS 2008, developing in vb.NET POS is installed on the same machine as VS if it makes a difference. I've created a simple class which displays a form and wa...

Charter email account fails upon setup (SMTP error)
I have just had Charter internet installed at our house today. I have entered all of Charter's fairly simple settings (ports 110/25, no encryption, no authentication). Every time I run the 'Test Account Settings' I get the following error: Send test e-mail message: Outlook cannot connect to your outgoing (SMTP) e-mail server. If you continue to receive this message, contact your server administrator or Internet service provider (ISP). I am connected directly to my Charter cable modem via ethernet when this happens, so I have ruled out any other network issues (c...

Help with RPC over HTTP #3
I can't get Outlook to connect and everything is configured correctly. Error is that Outlook is unavailable and/or username password is wrong. 1. Created a local certificate. Made a local 'test' web site SSL and certificate works. 2. Tried to connect to and received HTTP Error 401.3 - Unauthorized: Access is denied due to an ACL set on the requested resource. Internet Information Services (IIS) 3. Authentication is basic 4. Https:// gives blank screen with yellow padlock in browser The only irregularity I notice is w...

Dear Sir/Madam I am a student of Warsaw School of Economics. I write a master's thesis about a opinion on managers. I would like to ask you to fill in the survey (link below) by you and as many members of your group as possible. It will help me to write my thesis. It takes only up to 7 minutes to fill it in. The survey: If you could please also forward this mail to other members of the group. I will be rally grateful for your help. Yours sincerely ...

Error: failed to create windows users/groups or add the sql loggin
I'm trying to install MS POS 2.0 on SBS 2003 But after install I get this error: Error details: failed to create windows users/groups or add the sql loggins. This is from the after database install wizard. So I cannot start the program without finishing this wizard. Do you know where is the problem? Thanks beba wrote: > Do you know where is the problem? > > Thanks Restore database manually via osql/sqlcmd or sql management studio.. do you have the privileges to restore a database on your sql server? or the admin rights? cod "cod" wrote: > beba wrot...

Help Requested with Pivot Table
Hi, I've created a pivot table. It looks like this: Item1 Sum of Total 9 Count of Names 2 Average of Total 4.5 Item2 Sum of Total 12 Count of Names 3 Average of Total 4 Item3 Sum of Total 3 Count of Names 1 Average of Total 3 ....... You get the idea. 1) I find this to be a very awkward way to present the data. It would make much more sense to present it as follows: Name Sum of Count of Average of Total Names Total Item1 9 2 4.5 Item2 1...

CRM 3.0 : install exchange connector failed
Hello, i have an issue with the installation of the exchange connector , the steps of the installation are the following 1) installation program is run under the domain administrator account 2) the install program requests the CRM server address (ie http:srv-001:5555) 3) the user name (DOMAIN/USER) is requested by the installation program where the user name is a CRM user 4) The install program has a connection issue with the CRM server : the application cannot connect to the crm user, check that the user is a CRM user (SOAP Server Application Faultled) Could you please provide me some...

Status bar shows "Sending message 1 of 3" when there are no messages in the outbox
Hi: I am noticing that my status bar shows "Sending Message 1 of 3", even though I have not composed nor have any messages in the outbox folder. I remember I have a person I correspond with that asks for a "return receipt" everytime I receive one of his emails. Could this be the source of the problem? Is there anyway to remove the "Sending Message 1 of 3 " message or correct the problem so that this message no longer appears? I don't know where outlook is getting the message that I have messages to send outbound. Thanks, Harry ...

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...

Request timed out
We have an aspx page that uploads photos (up to 6) and we are getting a "request timed out" error. Is it possible to simply increase a setting for that page only, and if so, how is that done. Thanks. -- David ...

Latest 10 updates failed to install,error code;0x80070005
when i logged on to my system today,10 updates were ready to be installed clicked on the tray to install,system informed me all 10 had failed on checking the update filed the was 0x80070005,please advise how to overcome this problem 1) And the edition of Windows installed and it's Service Pack level is _________ ? 2) a. What is the installed security software (antivirus/security suite/3rd party firewall/pop up or cookie blocker/etc) ? b. Is the antivirus' subscription current; if yes, when was the last time the system was scanned for the presence of malware ? ...

Request for Services.
To Whom it May Concern: ( I am noticing through this document the request for Windows 98 SERVICE from Mi Services. The reazon about it is, the DCF (FINANCE) program on his organization locations. I would like to be included in your mailing list and, to receive newsletters update fr om yours. Thanks This is a peer-to-peer newsgroup for issues regarding Windows updates. This is not anywhere close to a place to request services. "fbell1222" <> wrote in message news:F14EDA90-EC60-4661-9D69-0D84B...

Remove a Failed Exchange 5.5 server after migration to Exchange 2000
The "old" Exch 5.5 hardware was beginning to fail. A new Exch2k box was introduced and all mailboxes were successfully migrated. During what was to be a brief coexistence, the expected failure of the old hardware took place. The organization is stable and functioning. However, I would like to remove the “grayed-out” reference to the old Exch 5.5 server from the organization prior to migrating to Exchange 2003. Any ideas? "The BergerMan" <> wrote: >The "old" Exch 5.5 hardware was beginning to fail. A new Exch2k bo...

Meeting requests cause bounced email
Is there some exchange setting which allows all meeting requests to be carbon-copied to a specific user? Everyone at work keeps getting bounce backs from an ex-employee everytime they create a meeting request. I checked that users mailbox settings and he's not in any groups and no seems to be forwarding his or her mail to him. This is really weird and my searches haven't brought anything up. Any ideas? Delegates? Alternate Recipient? wrote: > Is there some exchange setting which allows all meeting requests to be > carbon-copied to a specific user? Eve...

Sporadically losing session state when redirecting from http to ht
Hello: I have an issue with an ecommerce website that is losing session for some users. The session data is being lost when the user is redirected from http to https. What is really puzzling me here is that the issue only happens for a small percentage of users. About 4 or 5 five users has experienced the problem. The rest of the 250+ users didn’t have any problems placing orders using the website. The users with the problem are not connected in any way; they all are in different places with different systems. I’ve tried logging in as the problem users and placing or...

error: failed to provision your initial business
Hi All, during installing CRM 1.2 from the CD we are receiving the following error msg: Failed to install microsoft customer relationship management server. Failed to provosion your initial business Failed to create root business Catastropic failure (8000FFFF) we are using win2000 adv srv sql2000 and crm 1.2 any ideas ?? did anyone else got this error ? I searched MS support site and KB but no use ! thanks in advance Regds ...

MBFPackager Failed to load
When trying to install Business Portal 3.0 for GP 9, I got the error - "Failed Loading Packager Data Element (PD_GP_COMMON) for Install Feature (BusinessPortal)." Error detail: "Command Line Used: "C:\spssites\xx\bin\MbfPackager.exe" Import /d:"C:\Program Files\Microsoft Dynamics\Business Portal\Utilities\PackagerData\Common" /i:Replace /l:"c:\temp\BusinessPortal\MbfPackager.Import.NoMerge.Common.xml"" Any idea what could cause this? Thanks, Tareef Do you have SQL Server Reporting Services installed in the default web site? -- Ch...

prevent public Meeting Request auto-added to User Calendar
In this small office I set up common resources/rooms as calendars in public folders. Users are Authors by default. When a User creates a meeting request in one of these calendars, and another User opens the item, it gets automatically added to that User's personal Calendar, even if they are not an invitee, even if they close it immediately without accept/decline/tentative. I realize this is probably expected behavior. I tried turning off "Process requests and responses" but it still happens. Is there any way of preventing this from happening, especially without impactin...

HTTP e-mail on Outlook 2000
I have been trying to set up a HTTP e-mail address (Hotmail account) to run through Outlook express. I use Microsoft Outlook at work and prefer it to outlook express. The problem is that it asks me to add new account > type name> type e-mail address> then it asks for the server and gives me 2 options POP3 and IMAP, but when i tried reading up about it there should be a third option HTTP, this does not appear to exist. How can i do this? Thanks in advance Leila On 10/22/2003 5:01 PM, Leila wrote: > I have been trying to set up a HTTP e-mail address > (Hotmail acco...

request notification without requesting for receipt
I have Microsoft Outlook 2003. Is there a way to be notified when recipients open your sent mail without asking for a receipt from recipient On Wed, 29 Jun 2005 10:34:02 -1000, outragous <> wrote: > I have Microsoft Outlook 2003. Is there a way to be notified when > recipients > open your sent mail without asking for a receipt from recipient You could ask the recipient to call you when they get the message. :-) Otherwise, no. That's what the read receipts are for. -- -Ben- Ben M. Schorr, MVP-OneNote/Outlook Operations Coordinato...

Numbering figures by chapter: styles help requested
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Hello, <br><br>I have a document with multiple chapters, each of which has multiple figures. I'm trying to create a style that will allow me to format my figure captions as follows: <br> &quot; <br> Figure 1.1. This is the first caption of my first figure in Chapter 1 <br> Figure 1.2. This is... <br> .... <br><br>Figure 2.1. This is the first caption of my first figure in Chapter 2 <br> Figure 2.2. <br> .... <br> &quot; <br&g...

EV_RXCHAR event received, but ReadFile sometimes failed to read a byte from serial port
Hi, All I have a machine connected to PC using serial port. PC sends request to the machine and the machine responds. My code is copied below (most code are from MSDN "serial communication in win32") When debug the code, I found that EV_RXCHAR is received. but when I issue the ReadFile, it sometimes (NOT ALWAYS) failed to read a byte, the read operation time out. Don't know why, please help me. BOOL ProcessEvent(HANDLE hComm,DWORD dwCommEvent, RESPONSE *response) { BOOL fRING, fRLSD, fRXCHAR, fRXFLAG, fTXEMPTY; BOOL fBREAK, fCTS, fDSR, fERR; OVERLAPPED osReader = {0}; u...