Re: Problemes with custom Webservices and security.
From: Tako (mi_at_e.mail.com)
Date: 12/09/04
- Previous message: p1j: "Re: Sending Email with Attachments in a Webpart"
- In reply to: Noble Lesmana: "RE: Problemes with custom Webservices and security."
- Next in thread: Noble Lesmana: "Re: Problemes with custom Webservices and security."
- Reply: Noble Lesmana: "Re: Problemes with custom Webservices and security."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Dec 2004 09:37:07 +0100
Noble Lesmana wrote:
> Hi,
>
> Before I can do much help with your problem here, I need to see what
> you're trying to do in you finally block. However, I suspect that you
> do something that generates exception in your finally block. When the
> exception is thrown, the ASP.NET will redirect your client to the
> error page. Hence, you will never get the 'return "hello"' line
> executed.
At the end was a problems with the CatchAccessDeniedException from
SPSite class :)
>
> You can try putting another try/catch block inside your finally block.
>
> As for the security issues, I suggest that you enable the
> impersonation of security context. You can add:
>
> <identity impersonate="true"/>
>
> inside the web.config of your web service application.
>
> Then you should disable anonymous access in the IIS setting. Then you
> can use windows authentication to enforce your client to login with
> the security context that has permission to create site.
>
> Thank you.
>
>
> "Tako" wrote:
>
>>
>> I have a very strange problem:
>>
>> I have a client that calls a Webservice, this Webservice calls a
>> DLL that uses de object model to create sites in SPS2003.
>> If the user that uses the client hasnīt rights to create sites
>> then the DLL throws a exception, this exception is catched by the
>> Webservice, but then some strange happens.
>>
>> The code is something like that
>>
>> try
>> call to dll
>> catch
>> somecode A
>> finally
>> somecode B
>> end try
>>
>> return "hello"
>>
>> The call to dll generates a exception that itīs traped by
>> "catch" then "somecode A" is executed, after that the "finally" part
>> is executed ("somecode B") But then the Webservice never executes
>> 'return "hello"', nevers executes code outsite the try statement.
>>
>> Then the client throws a connection exception (http error 401).
>>
>> It seems that the Webservice redirects itself to a page where
>> the user does not have permissions and generates this connection
>> error.
>>
>> Why happens this? I catch the security exception so I donīt know
>> why the SPS redirects the Webserviceīs call to another place
>> Any suggestion?
>>
>> Thank you very much mucho
- Previous message: p1j: "Re: Sending Email with Attachments in a Webpart"
- In reply to: Noble Lesmana: "RE: Problemes with custom Webservices and security."
- Next in thread: Noble Lesmana: "Re: Problemes with custom Webservices and security."
- Reply: Noble Lesmana: "Re: Problemes with custom Webservices and security."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|