Sharepoint Portal Server 2003 and Web Methods
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Sharepoint Portal Server 2003 and Web Methods

 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server
Author Message
josh
Guest





Posted: Wed Jan 12, 2005 9:16 am    Post subject: Sharepoint Portal Server 2003 and Web Methods Reply with quote

Hi All,

I have just written a web part that upon an event calls a web method
however, when that action is triggered Sharepoint Portal Server 2003 throws
a security error.

Does anyonw know how to relax the security settings on SPS2003?

Thanks.

Josh

THE ERROR:
"System.Security.SecurityException: Request for the permission of type
System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 failed. at
System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken) at
System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames,
Int32 unrestrictedOverride) at
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap,
StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand()
at System.Net.HttpRequestCreator.Create(Uri Uri) at
System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) at
System.Net.WebRequest.Create(Uri requestUri) at
System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri) at
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri
uri) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at SMSWebPart.janus.Service1.sendSMS(String
phone, String message) at SMSWebPart.WebPart1.btnSubmit_Clicked(Object
sender, EventArgs e)"
Back to top
Marco
Guest





Posted: Thu Jan 13, 2005 3:01 am    Post subject: RE: Sharepoint Portal Server 2003 and Web Methods Reply with quote

This is code access security error and the proper way to get this solved is
to create a custom trust level for your virtual server.

You can find more about setting trust level on msdn in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_sp2003_ta/html/sharepoint_wsscodeaccesssecurity.asp

Marco

"josh" wrote:

Quote:
Hi All,

I have just written a web part that upon an event calls a web method
however, when that action is triggered Sharepoint Portal Server 2003 throws
a security error.

Does anyonw know how to relax the security settings on SPS2003?

Thanks.

Josh

THE ERROR:
"System.Security.SecurityException: Request for the permission of type
System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 failed. at
System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken) at
System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken,
CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames,
Int32 unrestrictedOverride) at
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap,
StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand()
at System.Net.HttpRequestCreator.Create(Uri Uri) at
System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) at
System.Net.WebRequest.Create(Uri requestUri) at
System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri) at
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri
uri) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at SMSWebPart.janus.Service1.sendSMS(String
phone, String message) at SMSWebPart.WebPart1.btnSubmit_Clicked(Object
sender, EventArgs e)"


Back to top
josh
Guest





Posted: Thu Jan 13, 2005 5:59 am    Post subject: Re: Sharepoint Portal Server 2003 and Web Methods Reply with quote

Thanks for you help,

I actually solved my problem by giving the assembly a strong name and then
delploying the web part into the Global Assembly Cache
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB