RE: Problemes with custom Webservices and security.
From: Noble Lesmana (Lesmana_at_discussions.microsoft.com)
Date: 12/06/04
- Next message: Kintamani: "Re: SharePoint Programming Book?"
- Previous message: Noble: "RE: Database access from Sharepoint web part"
- In reply to: Tako: "Problemes with custom Webservices and security."
- Next in thread: Tako: "Re: Problemes with custom Webservices and security."
- Reply: Tako: "Re: Problemes with custom Webservices and security."
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 5 Dec 2004 23:19:04 -0800
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.
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
>
>
>
- Next message: Kintamani: "Re: SharePoint Programming Book?"
- Previous message: Noble: "RE: Database access from Sharepoint web part"
- In reply to: Tako: "Problemes with custom Webservices and security."
- Next in thread: Tako: "Re: Problemes with custom Webservices and security."
- Reply: Tako: "Re: Problemes with custom Webservices and security."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|