System.Security.SecurityException while calling CampaignService.getAllAdWordsCampaigns(1)

20 views
Skip to first unread message

Taco

unread,
Jun 26, 2009, 3:56:53 AM6/26/09
to AdWords API Forum
Hi all,

I am developing an Adwords API application in Visual Studio using C#.

On my local computer it runs fine, but on the hosted servers of
Crystaltech I get the following exception when calling
CampaignService.getAllAdWordsCampaigns(1):

System.Security.SecurityException
Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.

At that time I have already obtained the AdwordsUser and the
CampaignService without problems.

As I thought that maybe the problem is writing a local file on the
server, I tried to actively disable logging the soap trace by adding
this to my Web.Config file:

<configSections>
......
<section name="AdWordsApi"
type="com.google.api.adwords.lib.ApplicationConfiguration"/>
</configSections>

<AdWordsApi>
<add key="LogPath" value="C:\Logs\"/>
<add key="LogToConsole" value="false"/>
<add key="LogToFile" value="false"/>
</AdWordsApi>

However, this doesn't help. Also I get the feeling that logging the
soap trace is disabled by default anyway, so this doesn't do much.

The Application Starting Point on the web server has been set
correctly. And I can update my database from that application, so that
doesn't seem to be the problem either.

It is purely the call to CampaignService.getAllAdWordsCampaigns(1)
that gives me this problem.

Any suggestions to fix this are really, really welcome!

Kind regards,
Taco

AdWords API Advisor

unread,
Jun 30, 2009, 11:45:22 AM6/30/09
to AdWords API Forum
Hello Taco,

You're correct that logging is disabled by default in the .NET client
library. I'm not sure that you'll find an answer to your question
here, as it sounds like the issue is specific to the .NET runtime
environment that your hosting provider is using. Perhaps there is a
technical contact at your hosting provider who would be able to
assist?

Cheers,
-Jeff Posnick, AdWords API Team

Taco

unread,
Jul 4, 2009, 2:53:31 AM7/4/09
to AdWords API Forum
Hi Jeff,

Thank you for your reply. The issue was solved by moving the site from
a regular web server to a High Trust web server. The confusion was
caused by the fact that one of the regular web servers was by accident
configured as High Trust. It worked fine on that server :-)

All is running now - thanks.

Taco
Reply all
Reply to author
Forward
0 new messages