473,326 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Access denied

Hello,

I'm developing a windows application using a web service from
Sharepoint(please let me know if I'm posting in the right group).

The problem is that when I try to use any Sharepoint Portal object's
method, I get the following exception:

"System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: Server was unable to
process request. ---System.UnauthorizedAccessException: Access is
denied"

If I access to a "Hello World" method it works.

Any ideas?

Thanks,

Brian

Nov 6 '06 #1
2 4996
It is my impression (i.e. as far as I remember!), that the WS exposed by WSS
are requiring you to sign the request using your Windows Credentials to be
allowed access.

Set the proxy.Credentials = CredentialCache.UseDefault;

That will associate your client's credentials (your app) to the httprequest
behind the asmx webservices exposed by WSS.
--
rgds.
/Claus Konrad
MCSD.NET (C#)
"Brian Roisentul" wrote:
Hello,

I'm developing a windows application using a web service from
Sharepoint(please let me know if I'm posting in the right group).

The problem is that when I try to use any Sharepoint Portal object's
method, I get the following exception:

"System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: Server was unable to
process request. ---System.UnauthorizedAccessException: Access is
denied"

If I access to a "Hello World" method it works.

Any ideas?

Thanks,

Brian

Nov 6 '06 #2

Hello Claus,

Thanks for your quick response.

I've already signed the Windows Credentials but nothing happens.

In this application I'm working with a lot of web service that use
Sharepoint and all work fine.

I wanted to know what do I have to set in my web service's Web Site:

* Do I have to use the DefaultAppPool, or Sharepoint's instead?

* About the Directory Security tab info:

. Do I have to check the "Basic Authentication" option?
. Do I need to enable the anonymous access option?

The following code is an simple example I wrote to see if it worked,
but It throws me the exception I posted before.

------------------------------------------------------------------

string Url="http://localhost:120/sites/mySite/default.aspx";

SPWeb site = new SPSite(Url).OpenWeb();

return site.CurrentUser.LoginName;

------------------------------------------------------------------

If I build a windows application and run this code, it works fine. But
if I expose it as a web service from another computer, even though I
use Network Credentials to authenticate(It works fine for the other web
services), it doesn't work either.

If you have any ideas or questions, just let me know please.

Thanks,

Brian

Nov 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: calfdog | last post by:
Hello, Does anyone know a workaround for calling fireEvent. With the latest from Microsoft OS XP2 and Hot fixes to IE it now gives an "access denied" error in Python when called. Here is what...
0
by: Steve | last post by:
Hi, Yesterday I signed up for another dedicated linux server with the hosting company I use and I am having problems getting MySQL 4.1.3 working on it. I've tried just about everything I can...
9
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
16
by: Brad | last post by:
After compiling my asp.net project I'm receiving a "BC31011 - Access is denied" error when attempting to run or debug. The only thing that seems to resolve problem is IISReset. After a reset my...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
3
by: Shailesh Humbad | last post by:
I figured out what was causing the "Access is Denied" error when calling functions from referenced DLLs in my service. I've tried to be very detailed, so bear with me. It turns out that...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
8
by: Jeremy Ames | last post by:
I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in...
0
by: Andy | last post by:
Thanks Peter, I thought I'd give an update on this problem. My application had 2 assemblies that contained classed for the Data access and business logic layer. It was on one of them that I was...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.