Can't access to a remote SQL Database through a web service

B

Brian Roisentul

Hello,

I'm developing a web service in c#, and I can't make it access to a
remote sql database.

I entered the correct username and password into the connection string
of the web service, but when I try to access to the db remotely I get
the following exception:

System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: Server was unable to
process request. ---> System.Security.SecurityException: Request for
the permission of type 'System.Data.SqlClient.SqlClientPermission,
System.Data, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed. [...]

Any help will be great!

Thanks,

Brian
 
B

Brian Roisentul

Hi Mark,

Thanks for your quick reply.

I read the page you gave me and added the "context connection=true" to
my connection string, but I don't understand some things...

"...the error you mention is actually what you'd get if you tried to
open a "regular" connection (non-context connection) while your
assembly was registered in the "SAFE" secuirity bucket." by Pablo
Castro


He mentions that my assembly was registered in the "safe" security
bucket.

I don't understand where my assembly is registered...where is the "safe
security bucket"?

Thanks,

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top