RE: Failure to set credentials
From: Steven Cheng[MSFT] (stcheng_at_online.microsoft.com)
Date: 07/21/05
- Next message: Joe Kaplan \(MVP - ADSI\): "Re: The server is not operational"
- Previous message: Ben: "Re: Forms authentication"
- In reply to: Philip Colmer: "Failure to set credentials"
- Next in thread: Philip Colmer: "Re: Failure to set credentials"
- Reply: Philip Colmer: "Re: Failure to set credentials"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 21 Jul 2005 02:45:41 GMT
Hi Philip,
Welcome to .NET newsgroup.
As for the INFO PATH form setting credentials for webservice proxy problem,
here are some of my suggestions:
First, I agree with you that this is a security problem and more exactly,
it's a .net's CAS problem. To make problem more clear, I suggest you try
the following things:
1. As you mentioned that the form work well when running from your local
computer. If so, is the local computer the develop machine of that form?
Please try copy the form to some other machine and run it to see whether it
also works as on your local machine.
2. If the infopath form also works on other machine (running from local), I
think it's likely due to the seuciryt restriction for the downloaded
infopath form from SPS FORM library. We'll need to do some further research
on the LOCAL .NET CAS setting for remote component.
If there're anything unclear or other new findings, please feel free to
post here.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Philip Colmer" <pcolmer@newsgroup.nospam>
| Subject: Failure to set credentials
| Date: Wed, 20 Jul 2005 15:25:11 +0100
| Lines: 41
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| Message-ID: <uz9jXbTjFHA.3540@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| NNTP-Posting-Host: host-news.chadwyck.co.uk 195.22.151.243
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:6030
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
|
| I've written a web service that returns some user-specific information.
I'm
| calling that web service from an InfoPath form as managed code:
|
| MsgBox("Calling WhoAmI service", MsgBoxStyle.OKOnly, "OnLoad")
| Try
| svc.Credentials =
| System.Net.CredentialCache.DefaultCredentials()
| MsgBox("Set service credentials", MsgBoxStyle.OKOnly,
| "OnLoad")
| Try
| _Initials = svc.GetInitials("")
| MsgBox("Got '" & _Initials & "'", MsgBoxStyle.OKOnly,
| "OnLoad")
| Catch ex As Exception
| MsgBox("Failed to get initials: " & ex.ToString,
| MsgBoxStyle.OKOnly, "OnLoad")
| End Try
| Catch ex As Exception
| MsgBox("Failed to set credentials: " & ex.ToString,
| MsgBoxStyle.OKOnly, "OnLoad")
| End Try
| svc.Dispose()
| MsgBox("Disposed of service object", MsgBoxStyle.OKOnly,
| "OnLoad")
|
| If I've got the form on my computer, it works fine - it sets the
| credentials, gets my initials back from the web service & disposes of the
| object. If, however, I publish the form to a SharePoint forms library and
| open the form from there, the call to svc.Credentials fails with:
|
| System.Security.SecurityException: Request for the permission of type
| System.Security.Permissions. EnvironmentPermission, mscorlib,
| Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
|
| The web service is configured to use integrated windows authentication.
|
| Can anyone tell me how to resolve this, please?
|
| --Philip
|
|
|
- Next message: Joe Kaplan \(MVP - ADSI\): "Re: The server is not operational"
- Previous message: Ben: "Re: Forms authentication"
- In reply to: Philip Colmer: "Failure to set credentials"
- Next in thread: Philip Colmer: "Re: Failure to set credentials"
- Reply: Philip Colmer: "Re: Failure to set credentials"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|