|
|
DefaultCredentials fail
I am unable to run in an ASP.NET web application the
sample code from the SDK to use the MSCRMServices. The
sample's logon procedure is
bizUser.Credentials =
System.Net.CredentialCache.DefaultCredentials;
try {
Microsoft.Crm.Platform.Proxy.CUserAuth _cUserAuth =
bizUser.WhoAmI();
I get this error: "SOAP Server Application Faulted
<detail><error><code>80040225</code><description>The
specified user is either disabled or is not a member of
any business unit.</description><file>d:\crm\build\3297
\src\platform\security\crmsecurity\secmain.cpp</file><line>
2281</line></error></detail>"
My ASP.NET server is not the CRM server. The virtual
directory is set for only Integrated windows
authentication (anonymous access is disabled). CRM is the
MSDN download version 1.2.
I can run the SOAP calls OK if I create credentials using
bizUser.Credentials = new NetworkCredential
("user","pwd", "domain");
However, for my application, I need to identify and use
the CRM security context of the logged-on user.
|
|
0
|
|
|
|
Reply
|
Michael
|
1/7/2004 5:55:06 PM |
|
I found the solution. You have to add
<identity impersonate="true" />
to the <system.web> section of the asp.net app's
web.config file.
There's a good article on MSDN that helped:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnnetsec/html/secnetch10.asp
>-----Original Message-----
>I am unable to run in an ASP.NET web application the
>sample code from the SDK to use the MSCRMServices. The
>sample's logon procedure is
>
>bizUser.Credentials =
>System.Net.CredentialCache.DefaultCredentials;
>try {
>Microsoft.Crm.Platform.Proxy.CUserAuth _cUserAuth =
>bizUser.WhoAmI();
>
>I get this error: "SOAP Server Application Faulted
><detail><error><code>80040225</code><description>The
>specified user is either disabled or is not a member of
>any business unit.</description><file>d:\crm\build\3297
>\src\platform\security\crmsecurity\secmain.cpp</file><line
>
>2281</line></error></detail>"
>
>My ASP.NET server is not the CRM server. The virtual
>directory is set for only Integrated windows
>authentication (anonymous access is disabled). CRM is the
>MSDN download version 1.2.
>
>I can run the SOAP calls OK if I create credentials using
>bizUser.Credentials = new NetworkCredential
>("user","pwd", "domain");
>
>However, for my application, I need to identify and use
>the CRM security context of the logged-on user.
>
>.
>
|
|
0
|
|
|
|
Reply
|
Michael
|
1/7/2004 7:37:55 PM
|
|
|
1 Replies
202 Views
(page loaded in 0.039 seconds)
|
|
|
|
|
|
|
|
|