I 'm calling a web service using this code:
ReportingService service = new ReportingService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
I was getting an "Access Denied" everytime, but it works when I use this
code :
ReportingService service = new ReportingService();
service.Credentials = new
NetworkCredential("myLogin","myPassword","myDomaine");
I have enabled impersonation by adding <identity impersonate="true" /> to my
web config and we are using windows authentication.What else should I add in
order to get it up and workin?
ThanksHi,
I think you're under IIS. So, you've got to check if you have disabled
'Anonymous Authentication' for your website. You can do this in IIS
Administration. Open the properties box for your WebSite, and go to
'Folder security" and click "modify". I work only with french versions
of IIS, sorry if the properties names i wrote are wrong.
Hope it helps.|||I think it impersonates asp.net wp account or network_service account.
Actually the best way is create a user with no privilages, and from report
mager give that user just "browse" right, and use that user within your
code.
"David DOS SANTOS" <david.dosantos@.gmail.com> wrote in message
news:1117102512.934187.161630@.o13g2000cwo.googlegroups.com...
> Hi,
> I think you're under IIS. So, you've got to check if you have disabled
> 'Anonymous Authentication' for your website. You can do this in IIS
> Administration. Open the properties box for your WebSite, and go to
> 'Folder security" and click "modify". I work only with french versions
> of IIS, sorry if the properties names i wrote are wrong.
> Hope it helps.
>|||The problem is that They have installed reporting services and our asp.net
application in the **same box** (which I know is not a good idea,but why I
don't know).Therefore that problem should not exist because as you mentioned
that's for the time you have reporting services and your app in two
different places.
I think I found the problem ,the person who has this problem is opening
another thread(than the asp.net thread) to call the webservice and the
reason he get the second logon page is that the token is not transfered from
the main thread to his newly-opened thread.
Can you guide me to something which shows the advantagesa dn disadvantages
of having RS and the main application in the same box?
Thanks|||I have been running in that configuration for over 2 years now without
many problems. In our case, we have a custom portal that provides rich
parameter-entry and improved report navigation which calls the Sql
Reporting Services webservice to render reports.
The only downside I have run across is the different performance
characteristics of our ASP.NET application as compared to Sql Reporting
Services. As a result, we had to scale-up our servers a bit higher
than for typical ASP.NET applications. However, this still allows us
to run with only 2 servers (2 load-balanced ASP.NET/Sql Reporting
servers) instead of 4 (2 load-balanced ASP.NET servers, and 2
loadbalanced Sql Reporting servers).
Technicically this is not even a problem, but just a decision of how
you want to scale your environment.
~Lance
Thursday, February 9, 2012
Access denied problem when calling Webserivce
Labels:
access,
calling,
code,
credentials,
database,
denied,
microsoft,
mysql,
oracle,
reportingservice,
server,
service,
sql,
web,
webserivce
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment